Type system progress on bus design
This commit is contained in:
parent
2d5cf48c54
commit
da761f6e4e
2 changed files with 61 additions and 18 deletions
13
bs/Bus.bs
13
bs/Bus.bs
|
@ -3,5 +3,18 @@ package Bus(a) where
|
|||
import Types
|
||||
import BusTypes
|
||||
|
||||
interface (TestType :: * -> *) t = {}
|
||||
-- doSomething :: t -> Action
|
||||
|
||||
mkTestType :: (Bits t n, Arith t, Eq t) => Module (TestType t)
|
||||
mkTestType = do
|
||||
return $ interface TestType {}
|
||||
|
||||
mkTestTop :: Module Empty
|
||||
mkTestTop = do
|
||||
testType :: TestType (UInt 5)
|
||||
testType <- mkTestType
|
||||
return $ interface Empty { }
|
||||
|
||||
a :: UInt 5
|
||||
a = 3
|
||||
|
|
Reference in a new issue