4 -- hwand :: a -> a -> a
6 -- hwxor :: a -> a -> a
9 -- -- Prettyprint a signal. We're not extending Show here, since show must
10 -- -- return a valid haskell syntax
11 -- displaysig :: a -> String
13 hwand :: Bit -> Bit -> Bit
14 hwor :: Bit -> Bit -> Bit
15 hwxor :: Bit -> Bit -> Bit
18 -- Prettyprint Bit signal. We're not extending Show here, since show must
19 -- return Bit valid haskell syntax
20 displaysig :: Bit -> String
22 --instance Signal Bit where
23 High `hwand` High = High
30 High `hwxor` Low = High
31 Low `hwxor` High = High
41 data Bit = High | Low | DontCare
42 deriving (Show, Eq, Read)
44 -- A function to prettyprint a bitvector
46 --displaysigs :: (Signal s) => [s] -> String
47 displaysigs :: [Bit] -> String
48 displaysigs = (foldl (++) "") . (map displaysig)
52 -- An infinite streams of highs or lows
56 -- vim: set ts=8 sw=2 sts=2 expandtab: