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
No longer any need to explicitly load module interface in 'toCore'
[matthijs/master-project/cλash.git]
/
Bits.hs
diff --git
a/Bits.hs
b/Bits.hs
index cea48cc0c457f1d3772eb75f3f2276d1957c251f..435b04e1efc5cb0292b345111f5584a694cf2521 100644
(file)
--- a/
Bits.hs
+++ b/
Bits.hs
@@
-1,9
+1,10
@@
-{-# LANGUAGE FlexibleContexts,GADTs,ExistentialQuantification,LiberalTypeSynonyms #-}
+{-# LANGUAGE FlexibleContexts,GADTs,ExistentialQuantification,LiberalTypeSynonyms
,TemplateHaskell
#-}
module Bits where
module Bits where
-import qualified Data.Param.FSVec as FSVec
-import qualified Data.TypeLevel as TypeLevel
+import qualified Data.Param.TFVec as TFVec
+import qualified Types
+import Language.Haskell.TH.Lift
--class Signal a where
-- hwand :: a -> a -> a
--class Signal a where
-- hwand :: a -> a -> a
@@
-46,6
+47,8
@@
displaysig Low = "0"
data Bit = High | Low
deriving (Show, Eq, Read)
data Bit = High | Low
deriving (Show, Eq, Read)
+$(deriveLift1 ''Bit)
+
-- A function to prettyprint a bitvector
--displaysigs :: (Signal s) => [s] -> String
-- A function to prettyprint a bitvector
--displaysigs :: (Signal s) => [s] -> String
@@
-58,6
+61,6
@@
type Stream a = [a]
lows = Low : lows
highs = High : highs
lows = Low : lows
highs = High : highs
-type BitVec len =
FSVec.FS
Vec len Bit
+type BitVec len =
TFVec.TF
Vec len Bit
-- vim: set ts=8 sw=2 sts=2 expandtab:
-- vim: set ts=8 sw=2 sts=2 expandtab: