X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=Bits.hs;h=cea48cc0c457f1d3772eb75f3f2276d1957c251f;hb=8f26d216ad75c8e6cb017ae8b0f5e6f1cd62f505;hp=c0717bff475bf107e5117c5e9cb6f441787e144d;hpb=d49dfd213e2cd384bceb38dc70eb122711d4f996;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/Bits.hs b/Bits.hs index c0717bf..cea48cc 100644 --- a/Bits.hs +++ b/Bits.hs @@ -1,5 +1,10 @@ +{-# LANGUAGE FlexibleContexts,GADTs,ExistentialQuantification,LiberalTypeSynonyms #-} + module Bits where +import qualified Data.Param.FSVec as FSVec +import qualified Data.TypeLevel as TypeLevel + --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 -data Bit = High | Low | DontCare +data Bit = High | Low deriving (Show, Eq, Read) -- A function to prettyprint a bitvector @@ -53,4 +58,6 @@ type Stream a = [a] lows = Low : lows highs = High : highs +type BitVec len = FSVec.FSVec len Bit + -- vim: set ts=8 sw=2 sts=2 expandtab: