X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=clash%2FData%2FParam%2FInteger.hs;h=a57c0aa0f853b5e8f9a2bbf39747ef7ccf872b12;hb=30969fa41ee30295f00cf089f4ee4385bb709871;hp=b4b1ec8a9a5e89bb40fa2bde5e0f225413a7e1e2;hpb=ef7d876bddac1ebf8ae72dfac9aff33023650f53;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/clash/Data/Param/Integer.hs b/clash/Data/Param/Integer.hs index b4b1ec8..a57c0aa 100644 --- a/clash/Data/Param/Integer.hs +++ b/clash/Data/Param/Integer.hs @@ -2,12 +2,18 @@ module Data.Param.Integer ( Signed(..) , Unsigned(..) , Index (..) + , HWBits(..) ) where import Types +import qualified Data.Bits as B newtype (NaturalT nT) => Signed nT = Signed Integer newtype (NaturalT nT) => Unsigned nT = Unsigned Integer -newtype (NaturalT upper) => Index upper = Index Integer \ No newline at end of file +newtype (PositiveT upper) => Index upper = Index Integer + +class (B.Bits a) => HWBits a where + shiftL :: a -> a -> a + shiftR :: a -> a -> a