Add shiftL and shiftR operators for signed and unsigned. Update name of shiftl and...
[matthijs/master-project/cλash.git] / clash / Data / Param / Integer.hs
1 module Data.Param.Integer
2   ( Signed(..)
3   , Unsigned(..)
4   , Index (..)
5   , HWBits(..)
6   ) where
7
8 import Types
9 import qualified Data.Bits as B
10
11 newtype (NaturalT nT) => Signed nT = Signed Integer
12
13 newtype (NaturalT nT) => Unsigned nT = Unsigned Integer
14
15 newtype (PositiveT upper) => Index upper = Index Integer
16
17 class (B.Bits a) => HWBits a where
18   shiftL :: a -> a -> a
19   shiftR :: a -> a -> a