projects
/
matthijs
/
master-project
/
cλash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'cλash' of http://git.stderr.nl/matthijs/projects/master-project
[matthijs/master-project/cλash.git]
/
Bits.hs
diff --git
a/Bits.hs
b/Bits.hs
index 845105d02a49cd4d3966405a316ff021dc4e96fb..b50430af9644553c657e6d6bb5ff5f95e1d69ad8 100644
(file)
--- a/
Bits.hs
+++ b/
Bits.hs
@@
-1,5
+1,10
@@
+{-# LANGUAGE FlexibleContexts,GADTs,ExistentialQuantification,LiberalTypeSynonyms #-}
+
module Bits where
module Bits where
+import qualified Data.Param.TFVec as TFVec
+import qualified Types
+
--class Signal a where
-- hwand :: a -> a -> a
-- hwor :: a -> a -> a
--class Signal a where
-- hwand :: a -> a -> a
-- hwor :: a -> a -> a
@@
-38,7
+43,7
@@
displaysig High = "1"
displaysig Low = "0"
-- The plain Bit type
displaysig Low = "0"
-- The plain Bit type
-data Bit = High | Low
-- | DontCare
+data Bit = High | Low
deriving (Show, Eq, Read)
-- A function to prettyprint a bitvector
deriving (Show, Eq, Read)
-- A function to prettyprint a bitvector
@@
-53,4
+58,6
@@
type Stream a = [a]
lows = Low : lows
highs = High : highs
lows = Low : lows
highs = High : highs
+type BitVec len = TFVec.TFVec len Bit
+
-- vim: set ts=8 sw=2 sts=2 expandtab:
-- vim: set ts=8 sw=2 sts=2 expandtab: