X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=Bits.hs;h=435b04e1efc5cb0292b345111f5584a694cf2521;hb=c0b63b2aae039cecafb06bbcf63e50ee0359709b;hp=b50430af9644553c657e6d6bb5ff5f95e1d69ad8;hpb=c5bde4d7862c7df2b4bad183088f77a43d8b5a2c;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/Bits.hs b/Bits.hs index b50430a..435b04e 100644 --- a/Bits.hs +++ b/Bits.hs @@ -1,9 +1,10 @@ -{-# LANGUAGE FlexibleContexts,GADTs,ExistentialQuantification,LiberalTypeSynonyms #-} +{-# LANGUAGE FlexibleContexts,GADTs,ExistentialQuantification,LiberalTypeSynonyms,TemplateHaskell #-} module Bits where import qualified Data.Param.TFVec as TFVec import qualified Types +import Language.Haskell.TH.Lift --class Signal a where -- hwand :: a -> a -> a @@ -46,6 +47,8 @@ displaysig Low = "0" data Bit = High | Low deriving (Show, Eq, Read) +$(deriveLift1 ''Bit) + -- A function to prettyprint a bitvector --displaysigs :: (Signal s) => [s] -> String