data-dword 0.3 → 0.3.1
raw patch · 3 files changed
+100/−146 lines, 3 filesdep ~template-haskellPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: template-haskell
API changes (from Hackage documentation)
- Data.DoubleWord: instance BinaryWord Int128
- Data.DoubleWord: instance BinaryWord Int160
- Data.DoubleWord: instance BinaryWord Int192
- Data.DoubleWord: instance BinaryWord Int224
- Data.DoubleWord: instance BinaryWord Int256
- Data.DoubleWord: instance BinaryWord Int96
- Data.DoubleWord: instance BinaryWord Word128
- Data.DoubleWord: instance BinaryWord Word160
- Data.DoubleWord: instance BinaryWord Word192
- Data.DoubleWord: instance BinaryWord Word224
- Data.DoubleWord: instance BinaryWord Word256
- Data.DoubleWord: instance BinaryWord Word96
- Data.DoubleWord: instance Bits Int128
- Data.DoubleWord: instance Bits Int160
- Data.DoubleWord: instance Bits Int192
- Data.DoubleWord: instance Bits Int224
- Data.DoubleWord: instance Bits Int256
- Data.DoubleWord: instance Bits Int96
- Data.DoubleWord: instance Bits Word128
- Data.DoubleWord: instance Bits Word160
- Data.DoubleWord: instance Bits Word192
- Data.DoubleWord: instance Bits Word224
- Data.DoubleWord: instance Bits Word256
- Data.DoubleWord: instance Bits Word96
- Data.DoubleWord: instance Bounded Int128
- Data.DoubleWord: instance Bounded Int160
- Data.DoubleWord: instance Bounded Int192
- Data.DoubleWord: instance Bounded Int224
- Data.DoubleWord: instance Bounded Int256
- Data.DoubleWord: instance Bounded Int96
- Data.DoubleWord: instance Bounded Word128
- Data.DoubleWord: instance Bounded Word160
- Data.DoubleWord: instance Bounded Word192
- Data.DoubleWord: instance Bounded Word224
- Data.DoubleWord: instance Bounded Word256
- Data.DoubleWord: instance Bounded Word96
- Data.DoubleWord: instance Constructor C1_0Int128
- Data.DoubleWord: instance Constructor C1_0Int160
- Data.DoubleWord: instance Constructor C1_0Int192
- Data.DoubleWord: instance Constructor C1_0Int224
- Data.DoubleWord: instance Constructor C1_0Int256
- Data.DoubleWord: instance Constructor C1_0Int96
- Data.DoubleWord: instance Constructor C1_0Word128
- Data.DoubleWord: instance Constructor C1_0Word160
- Data.DoubleWord: instance Constructor C1_0Word192
- Data.DoubleWord: instance Constructor C1_0Word224
- Data.DoubleWord: instance Constructor C1_0Word256
- Data.DoubleWord: instance Constructor C1_0Word96
- Data.DoubleWord: instance Data Int128
- Data.DoubleWord: instance Data Int160
- Data.DoubleWord: instance Data Int192
- Data.DoubleWord: instance Data Int224
- Data.DoubleWord: instance Data Int256
- Data.DoubleWord: instance Data Int96
- Data.DoubleWord: instance Data Word128
- Data.DoubleWord: instance Data Word160
- Data.DoubleWord: instance Data Word192
- Data.DoubleWord: instance Data Word224
- Data.DoubleWord: instance Data Word256
- Data.DoubleWord: instance Data Word96
- Data.DoubleWord: instance Datatype D1Int128
- Data.DoubleWord: instance Datatype D1Int160
- Data.DoubleWord: instance Datatype D1Int192
- Data.DoubleWord: instance Datatype D1Int224
- Data.DoubleWord: instance Datatype D1Int256
- Data.DoubleWord: instance Datatype D1Int96
- Data.DoubleWord: instance Datatype D1Word128
- Data.DoubleWord: instance Datatype D1Word160
- Data.DoubleWord: instance Datatype D1Word192
- Data.DoubleWord: instance Datatype D1Word224
- Data.DoubleWord: instance Datatype D1Word256
- Data.DoubleWord: instance Datatype D1Word96
- Data.DoubleWord: instance DoubleWord Int128
- Data.DoubleWord: instance DoubleWord Int160
- Data.DoubleWord: instance DoubleWord Int192
- Data.DoubleWord: instance DoubleWord Int224
- Data.DoubleWord: instance DoubleWord Int256
- Data.DoubleWord: instance DoubleWord Int96
- Data.DoubleWord: instance DoubleWord Word128
- Data.DoubleWord: instance DoubleWord Word160
- Data.DoubleWord: instance DoubleWord Word192
- Data.DoubleWord: instance DoubleWord Word224
- Data.DoubleWord: instance DoubleWord Word256
- Data.DoubleWord: instance DoubleWord Word96
- Data.DoubleWord: instance Enum Int128
- Data.DoubleWord: instance Enum Int160
- Data.DoubleWord: instance Enum Int192
- Data.DoubleWord: instance Enum Int224
- Data.DoubleWord: instance Enum Int256
- Data.DoubleWord: instance Enum Int96
- Data.DoubleWord: instance Enum Word128
- Data.DoubleWord: instance Enum Word160
- Data.DoubleWord: instance Enum Word192
- Data.DoubleWord: instance Enum Word224
- Data.DoubleWord: instance Enum Word256
- Data.DoubleWord: instance Enum Word96
- Data.DoubleWord: instance Eq Int128
- Data.DoubleWord: instance Eq Int160
- Data.DoubleWord: instance Eq Int192
- Data.DoubleWord: instance Eq Int224
- Data.DoubleWord: instance Eq Int256
- Data.DoubleWord: instance Eq Int96
- Data.DoubleWord: instance Eq Word128
- Data.DoubleWord: instance Eq Word160
- Data.DoubleWord: instance Eq Word192
- Data.DoubleWord: instance Eq Word224
- Data.DoubleWord: instance Eq Word256
- Data.DoubleWord: instance Eq Word96
- Data.DoubleWord: instance Generic Int128
- Data.DoubleWord: instance Generic Int160
- Data.DoubleWord: instance Generic Int192
- Data.DoubleWord: instance Generic Int224
- Data.DoubleWord: instance Generic Int256
- Data.DoubleWord: instance Generic Int96
- Data.DoubleWord: instance Generic Word128
- Data.DoubleWord: instance Generic Word160
- Data.DoubleWord: instance Generic Word192
- Data.DoubleWord: instance Generic Word224
- Data.DoubleWord: instance Generic Word256
- Data.DoubleWord: instance Generic Word96
- Data.DoubleWord: instance Hashable Int128
- Data.DoubleWord: instance Hashable Int160
- Data.DoubleWord: instance Hashable Int192
- Data.DoubleWord: instance Hashable Int224
- Data.DoubleWord: instance Hashable Int256
- Data.DoubleWord: instance Hashable Int96
- Data.DoubleWord: instance Hashable Word128
- Data.DoubleWord: instance Hashable Word160
- Data.DoubleWord: instance Hashable Word192
- Data.DoubleWord: instance Hashable Word224
- Data.DoubleWord: instance Hashable Word256
- Data.DoubleWord: instance Hashable Word96
- Data.DoubleWord: instance Integral Int128
- Data.DoubleWord: instance Integral Int160
- Data.DoubleWord: instance Integral Int192
- Data.DoubleWord: instance Integral Int224
- Data.DoubleWord: instance Integral Int256
- Data.DoubleWord: instance Integral Int96
- Data.DoubleWord: instance Integral Word128
- Data.DoubleWord: instance Integral Word160
- Data.DoubleWord: instance Integral Word192
- Data.DoubleWord: instance Integral Word224
- Data.DoubleWord: instance Integral Word256
- Data.DoubleWord: instance Integral Word96
- Data.DoubleWord: instance Ix Int128
- Data.DoubleWord: instance Ix Int160
- Data.DoubleWord: instance Ix Int192
- Data.DoubleWord: instance Ix Int224
- Data.DoubleWord: instance Ix Int256
- Data.DoubleWord: instance Ix Int96
- Data.DoubleWord: instance Ix Word128
- Data.DoubleWord: instance Ix Word160
- Data.DoubleWord: instance Ix Word192
- Data.DoubleWord: instance Ix Word224
- Data.DoubleWord: instance Ix Word256
- Data.DoubleWord: instance Ix Word96
- Data.DoubleWord: instance Num Int128
- Data.DoubleWord: instance Num Int160
- Data.DoubleWord: instance Num Int192
- Data.DoubleWord: instance Num Int224
- Data.DoubleWord: instance Num Int256
- Data.DoubleWord: instance Num Int96
- Data.DoubleWord: instance Num Word128
- Data.DoubleWord: instance Num Word160
- Data.DoubleWord: instance Num Word192
- Data.DoubleWord: instance Num Word224
- Data.DoubleWord: instance Num Word256
- Data.DoubleWord: instance Num Word96
- Data.DoubleWord: instance Ord Int128
- Data.DoubleWord: instance Ord Int160
- Data.DoubleWord: instance Ord Int192
- Data.DoubleWord: instance Ord Int224
- Data.DoubleWord: instance Ord Int256
- Data.DoubleWord: instance Ord Int96
- Data.DoubleWord: instance Ord Word128
- Data.DoubleWord: instance Ord Word160
- Data.DoubleWord: instance Ord Word192
- Data.DoubleWord: instance Ord Word224
- Data.DoubleWord: instance Ord Word256
- Data.DoubleWord: instance Ord Word96
- Data.DoubleWord: instance Read Int128
- Data.DoubleWord: instance Read Int160
- Data.DoubleWord: instance Read Int192
- Data.DoubleWord: instance Read Int224
- Data.DoubleWord: instance Read Int256
- Data.DoubleWord: instance Read Int96
- Data.DoubleWord: instance Read Word128
- Data.DoubleWord: instance Read Word160
- Data.DoubleWord: instance Read Word192
- Data.DoubleWord: instance Read Word224
- Data.DoubleWord: instance Read Word256
- Data.DoubleWord: instance Read Word96
- Data.DoubleWord: instance Real Int128
- Data.DoubleWord: instance Real Int160
- Data.DoubleWord: instance Real Int192
- Data.DoubleWord: instance Real Int224
- Data.DoubleWord: instance Real Int256
- Data.DoubleWord: instance Real Int96
- Data.DoubleWord: instance Real Word128
- Data.DoubleWord: instance Real Word160
- Data.DoubleWord: instance Real Word192
- Data.DoubleWord: instance Real Word224
- Data.DoubleWord: instance Real Word256
- Data.DoubleWord: instance Real Word96
- Data.DoubleWord: instance Show Int128
- Data.DoubleWord: instance Show Int160
- Data.DoubleWord: instance Show Int192
- Data.DoubleWord: instance Show Int224
- Data.DoubleWord: instance Show Int256
- Data.DoubleWord: instance Show Int96
- Data.DoubleWord: instance Show Word128
- Data.DoubleWord: instance Show Word160
- Data.DoubleWord: instance Show Word192
- Data.DoubleWord: instance Show Word224
- Data.DoubleWord: instance Show Word256
- Data.DoubleWord: instance Show Word96
- Data.DoubleWord: instance Typeable Int128
- Data.DoubleWord: instance Typeable Int160
- Data.DoubleWord: instance Typeable Int192
- Data.DoubleWord: instance Typeable Int224
- Data.DoubleWord: instance Typeable Int256
- Data.DoubleWord: instance Typeable Int96
- Data.DoubleWord: instance Typeable Word128
- Data.DoubleWord: instance Typeable Word160
- Data.DoubleWord: instance Typeable Word192
- Data.DoubleWord: instance Typeable Word224
- Data.DoubleWord: instance Typeable Word256
- Data.DoubleWord: instance Typeable Word96
+ Data.DoubleWord: instance Data.BinaryWord.BinaryWord Data.DoubleWord.Int128
+ Data.DoubleWord: instance Data.BinaryWord.BinaryWord Data.DoubleWord.Int160
+ Data.DoubleWord: instance Data.BinaryWord.BinaryWord Data.DoubleWord.Int192
+ Data.DoubleWord: instance Data.BinaryWord.BinaryWord Data.DoubleWord.Int224
+ Data.DoubleWord: instance Data.BinaryWord.BinaryWord Data.DoubleWord.Int256
+ Data.DoubleWord: instance Data.BinaryWord.BinaryWord Data.DoubleWord.Int96
+ Data.DoubleWord: instance Data.BinaryWord.BinaryWord Data.DoubleWord.Word128
+ Data.DoubleWord: instance Data.BinaryWord.BinaryWord Data.DoubleWord.Word160
+ Data.DoubleWord: instance Data.BinaryWord.BinaryWord Data.DoubleWord.Word192
+ Data.DoubleWord: instance Data.BinaryWord.BinaryWord Data.DoubleWord.Word224
+ Data.DoubleWord: instance Data.BinaryWord.BinaryWord Data.DoubleWord.Word256
+ Data.DoubleWord: instance Data.BinaryWord.BinaryWord Data.DoubleWord.Word96
+ Data.DoubleWord: instance Data.Bits.Bits Data.DoubleWord.Int128
+ Data.DoubleWord: instance Data.Bits.Bits Data.DoubleWord.Int160
+ Data.DoubleWord: instance Data.Bits.Bits Data.DoubleWord.Int192
+ Data.DoubleWord: instance Data.Bits.Bits Data.DoubleWord.Int224
+ Data.DoubleWord: instance Data.Bits.Bits Data.DoubleWord.Int256
+ Data.DoubleWord: instance Data.Bits.Bits Data.DoubleWord.Int96
+ Data.DoubleWord: instance Data.Bits.Bits Data.DoubleWord.Word128
+ Data.DoubleWord: instance Data.Bits.Bits Data.DoubleWord.Word160
+ Data.DoubleWord: instance Data.Bits.Bits Data.DoubleWord.Word192
+ Data.DoubleWord: instance Data.Bits.Bits Data.DoubleWord.Word224
+ Data.DoubleWord: instance Data.Bits.Bits Data.DoubleWord.Word256
+ Data.DoubleWord: instance Data.Bits.Bits Data.DoubleWord.Word96
+ Data.DoubleWord: instance Data.Bits.FiniteBits Data.DoubleWord.Int128
+ Data.DoubleWord: instance Data.Bits.FiniteBits Data.DoubleWord.Int160
+ Data.DoubleWord: instance Data.Bits.FiniteBits Data.DoubleWord.Int192
+ Data.DoubleWord: instance Data.Bits.FiniteBits Data.DoubleWord.Int224
+ Data.DoubleWord: instance Data.Bits.FiniteBits Data.DoubleWord.Int256
+ Data.DoubleWord: instance Data.Bits.FiniteBits Data.DoubleWord.Int96
+ Data.DoubleWord: instance Data.Bits.FiniteBits Data.DoubleWord.Word128
+ Data.DoubleWord: instance Data.Bits.FiniteBits Data.DoubleWord.Word160
+ Data.DoubleWord: instance Data.Bits.FiniteBits Data.DoubleWord.Word192
+ Data.DoubleWord: instance Data.Bits.FiniteBits Data.DoubleWord.Word224
+ Data.DoubleWord: instance Data.Bits.FiniteBits Data.DoubleWord.Word256
+ Data.DoubleWord: instance Data.Bits.FiniteBits Data.DoubleWord.Word96
+ Data.DoubleWord: instance Data.Data.Data Data.DoubleWord.Int128
+ Data.DoubleWord: instance Data.Data.Data Data.DoubleWord.Int160
+ Data.DoubleWord: instance Data.Data.Data Data.DoubleWord.Int192
+ Data.DoubleWord: instance Data.Data.Data Data.DoubleWord.Int224
+ Data.DoubleWord: instance Data.Data.Data Data.DoubleWord.Int256
+ Data.DoubleWord: instance Data.Data.Data Data.DoubleWord.Int96
+ Data.DoubleWord: instance Data.Data.Data Data.DoubleWord.Word128
+ Data.DoubleWord: instance Data.Data.Data Data.DoubleWord.Word160
+ Data.DoubleWord: instance Data.Data.Data Data.DoubleWord.Word192
+ Data.DoubleWord: instance Data.Data.Data Data.DoubleWord.Word224
+ Data.DoubleWord: instance Data.Data.Data Data.DoubleWord.Word256
+ Data.DoubleWord: instance Data.Data.Data Data.DoubleWord.Word96
+ Data.DoubleWord: instance Data.DoubleWord.Base.DoubleWord Data.DoubleWord.Int128
+ Data.DoubleWord: instance Data.DoubleWord.Base.DoubleWord Data.DoubleWord.Int160
+ Data.DoubleWord: instance Data.DoubleWord.Base.DoubleWord Data.DoubleWord.Int192
+ Data.DoubleWord: instance Data.DoubleWord.Base.DoubleWord Data.DoubleWord.Int224
+ Data.DoubleWord: instance Data.DoubleWord.Base.DoubleWord Data.DoubleWord.Int256
+ Data.DoubleWord: instance Data.DoubleWord.Base.DoubleWord Data.DoubleWord.Int96
+ Data.DoubleWord: instance Data.DoubleWord.Base.DoubleWord Data.DoubleWord.Word128
+ Data.DoubleWord: instance Data.DoubleWord.Base.DoubleWord Data.DoubleWord.Word160
+ Data.DoubleWord: instance Data.DoubleWord.Base.DoubleWord Data.DoubleWord.Word192
+ Data.DoubleWord: instance Data.DoubleWord.Base.DoubleWord Data.DoubleWord.Word224
+ Data.DoubleWord: instance Data.DoubleWord.Base.DoubleWord Data.DoubleWord.Word256
+ Data.DoubleWord: instance Data.DoubleWord.Base.DoubleWord Data.DoubleWord.Word96
+ Data.DoubleWord: instance Data.Hashable.Class.Hashable Data.DoubleWord.Int128
+ Data.DoubleWord: instance Data.Hashable.Class.Hashable Data.DoubleWord.Int160
+ Data.DoubleWord: instance Data.Hashable.Class.Hashable Data.DoubleWord.Int192
+ Data.DoubleWord: instance Data.Hashable.Class.Hashable Data.DoubleWord.Int224
+ Data.DoubleWord: instance Data.Hashable.Class.Hashable Data.DoubleWord.Int256
+ Data.DoubleWord: instance Data.Hashable.Class.Hashable Data.DoubleWord.Int96
+ Data.DoubleWord: instance Data.Hashable.Class.Hashable Data.DoubleWord.Word128
+ Data.DoubleWord: instance Data.Hashable.Class.Hashable Data.DoubleWord.Word160
+ Data.DoubleWord: instance Data.Hashable.Class.Hashable Data.DoubleWord.Word192
+ Data.DoubleWord: instance Data.Hashable.Class.Hashable Data.DoubleWord.Word224
+ Data.DoubleWord: instance Data.Hashable.Class.Hashable Data.DoubleWord.Word256
+ Data.DoubleWord: instance Data.Hashable.Class.Hashable Data.DoubleWord.Word96
+ Data.DoubleWord: instance GHC.Arr.Ix Data.DoubleWord.Int128
+ Data.DoubleWord: instance GHC.Arr.Ix Data.DoubleWord.Int160
+ Data.DoubleWord: instance GHC.Arr.Ix Data.DoubleWord.Int192
+ Data.DoubleWord: instance GHC.Arr.Ix Data.DoubleWord.Int224
+ Data.DoubleWord: instance GHC.Arr.Ix Data.DoubleWord.Int256
+ Data.DoubleWord: instance GHC.Arr.Ix Data.DoubleWord.Int96
+ Data.DoubleWord: instance GHC.Arr.Ix Data.DoubleWord.Word128
+ Data.DoubleWord: instance GHC.Arr.Ix Data.DoubleWord.Word160
+ Data.DoubleWord: instance GHC.Arr.Ix Data.DoubleWord.Word192
+ Data.DoubleWord: instance GHC.Arr.Ix Data.DoubleWord.Word224
+ Data.DoubleWord: instance GHC.Arr.Ix Data.DoubleWord.Word256
+ Data.DoubleWord: instance GHC.Arr.Ix Data.DoubleWord.Word96
+ Data.DoubleWord: instance GHC.Classes.Eq Data.DoubleWord.Int128
+ Data.DoubleWord: instance GHC.Classes.Eq Data.DoubleWord.Int160
+ Data.DoubleWord: instance GHC.Classes.Eq Data.DoubleWord.Int192
+ Data.DoubleWord: instance GHC.Classes.Eq Data.DoubleWord.Int224
+ Data.DoubleWord: instance GHC.Classes.Eq Data.DoubleWord.Int256
+ Data.DoubleWord: instance GHC.Classes.Eq Data.DoubleWord.Int96
+ Data.DoubleWord: instance GHC.Classes.Eq Data.DoubleWord.Word128
+ Data.DoubleWord: instance GHC.Classes.Eq Data.DoubleWord.Word160
+ Data.DoubleWord: instance GHC.Classes.Eq Data.DoubleWord.Word192
+ Data.DoubleWord: instance GHC.Classes.Eq Data.DoubleWord.Word224
+ Data.DoubleWord: instance GHC.Classes.Eq Data.DoubleWord.Word256
+ Data.DoubleWord: instance GHC.Classes.Eq Data.DoubleWord.Word96
+ Data.DoubleWord: instance GHC.Classes.Ord Data.DoubleWord.Int128
+ Data.DoubleWord: instance GHC.Classes.Ord Data.DoubleWord.Int160
+ Data.DoubleWord: instance GHC.Classes.Ord Data.DoubleWord.Int192
+ Data.DoubleWord: instance GHC.Classes.Ord Data.DoubleWord.Int224
+ Data.DoubleWord: instance GHC.Classes.Ord Data.DoubleWord.Int256
+ Data.DoubleWord: instance GHC.Classes.Ord Data.DoubleWord.Int96
+ Data.DoubleWord: instance GHC.Classes.Ord Data.DoubleWord.Word128
+ Data.DoubleWord: instance GHC.Classes.Ord Data.DoubleWord.Word160
+ Data.DoubleWord: instance GHC.Classes.Ord Data.DoubleWord.Word192
+ Data.DoubleWord: instance GHC.Classes.Ord Data.DoubleWord.Word224
+ Data.DoubleWord: instance GHC.Classes.Ord Data.DoubleWord.Word256
+ Data.DoubleWord: instance GHC.Classes.Ord Data.DoubleWord.Word96
+ Data.DoubleWord: instance GHC.Enum.Bounded Data.DoubleWord.Int128
+ Data.DoubleWord: instance GHC.Enum.Bounded Data.DoubleWord.Int160
+ Data.DoubleWord: instance GHC.Enum.Bounded Data.DoubleWord.Int192
+ Data.DoubleWord: instance GHC.Enum.Bounded Data.DoubleWord.Int224
+ Data.DoubleWord: instance GHC.Enum.Bounded Data.DoubleWord.Int256
+ Data.DoubleWord: instance GHC.Enum.Bounded Data.DoubleWord.Int96
+ Data.DoubleWord: instance GHC.Enum.Bounded Data.DoubleWord.Word128
+ Data.DoubleWord: instance GHC.Enum.Bounded Data.DoubleWord.Word160
+ Data.DoubleWord: instance GHC.Enum.Bounded Data.DoubleWord.Word192
+ Data.DoubleWord: instance GHC.Enum.Bounded Data.DoubleWord.Word224
+ Data.DoubleWord: instance GHC.Enum.Bounded Data.DoubleWord.Word256
+ Data.DoubleWord: instance GHC.Enum.Bounded Data.DoubleWord.Word96
+ Data.DoubleWord: instance GHC.Enum.Enum Data.DoubleWord.Int128
+ Data.DoubleWord: instance GHC.Enum.Enum Data.DoubleWord.Int160
+ Data.DoubleWord: instance GHC.Enum.Enum Data.DoubleWord.Int192
+ Data.DoubleWord: instance GHC.Enum.Enum Data.DoubleWord.Int224
+ Data.DoubleWord: instance GHC.Enum.Enum Data.DoubleWord.Int256
+ Data.DoubleWord: instance GHC.Enum.Enum Data.DoubleWord.Int96
+ Data.DoubleWord: instance GHC.Enum.Enum Data.DoubleWord.Word128
+ Data.DoubleWord: instance GHC.Enum.Enum Data.DoubleWord.Word160
+ Data.DoubleWord: instance GHC.Enum.Enum Data.DoubleWord.Word192
+ Data.DoubleWord: instance GHC.Enum.Enum Data.DoubleWord.Word224
+ Data.DoubleWord: instance GHC.Enum.Enum Data.DoubleWord.Word256
+ Data.DoubleWord: instance GHC.Enum.Enum Data.DoubleWord.Word96
+ Data.DoubleWord: instance GHC.Generics.Generic Data.DoubleWord.Int128
+ Data.DoubleWord: instance GHC.Generics.Generic Data.DoubleWord.Int160
+ Data.DoubleWord: instance GHC.Generics.Generic Data.DoubleWord.Int192
+ Data.DoubleWord: instance GHC.Generics.Generic Data.DoubleWord.Int224
+ Data.DoubleWord: instance GHC.Generics.Generic Data.DoubleWord.Int256
+ Data.DoubleWord: instance GHC.Generics.Generic Data.DoubleWord.Int96
+ Data.DoubleWord: instance GHC.Generics.Generic Data.DoubleWord.Word128
+ Data.DoubleWord: instance GHC.Generics.Generic Data.DoubleWord.Word160
+ Data.DoubleWord: instance GHC.Generics.Generic Data.DoubleWord.Word192
+ Data.DoubleWord: instance GHC.Generics.Generic Data.DoubleWord.Word224
+ Data.DoubleWord: instance GHC.Generics.Generic Data.DoubleWord.Word256
+ Data.DoubleWord: instance GHC.Generics.Generic Data.DoubleWord.Word96
+ Data.DoubleWord: instance GHC.Num.Num Data.DoubleWord.Int128
+ Data.DoubleWord: instance GHC.Num.Num Data.DoubleWord.Int160
+ Data.DoubleWord: instance GHC.Num.Num Data.DoubleWord.Int192
+ Data.DoubleWord: instance GHC.Num.Num Data.DoubleWord.Int224
+ Data.DoubleWord: instance GHC.Num.Num Data.DoubleWord.Int256
+ Data.DoubleWord: instance GHC.Num.Num Data.DoubleWord.Int96
+ Data.DoubleWord: instance GHC.Num.Num Data.DoubleWord.Word128
+ Data.DoubleWord: instance GHC.Num.Num Data.DoubleWord.Word160
+ Data.DoubleWord: instance GHC.Num.Num Data.DoubleWord.Word192
+ Data.DoubleWord: instance GHC.Num.Num Data.DoubleWord.Word224
+ Data.DoubleWord: instance GHC.Num.Num Data.DoubleWord.Word256
+ Data.DoubleWord: instance GHC.Num.Num Data.DoubleWord.Word96
+ Data.DoubleWord: instance GHC.Read.Read Data.DoubleWord.Int128
+ Data.DoubleWord: instance GHC.Read.Read Data.DoubleWord.Int160
+ Data.DoubleWord: instance GHC.Read.Read Data.DoubleWord.Int192
+ Data.DoubleWord: instance GHC.Read.Read Data.DoubleWord.Int224
+ Data.DoubleWord: instance GHC.Read.Read Data.DoubleWord.Int256
+ Data.DoubleWord: instance GHC.Read.Read Data.DoubleWord.Int96
+ Data.DoubleWord: instance GHC.Read.Read Data.DoubleWord.Word128
+ Data.DoubleWord: instance GHC.Read.Read Data.DoubleWord.Word160
+ Data.DoubleWord: instance GHC.Read.Read Data.DoubleWord.Word192
+ Data.DoubleWord: instance GHC.Read.Read Data.DoubleWord.Word224
+ Data.DoubleWord: instance GHC.Read.Read Data.DoubleWord.Word256
+ Data.DoubleWord: instance GHC.Read.Read Data.DoubleWord.Word96
+ Data.DoubleWord: instance GHC.Real.Integral Data.DoubleWord.Int128
+ Data.DoubleWord: instance GHC.Real.Integral Data.DoubleWord.Int160
+ Data.DoubleWord: instance GHC.Real.Integral Data.DoubleWord.Int192
+ Data.DoubleWord: instance GHC.Real.Integral Data.DoubleWord.Int224
+ Data.DoubleWord: instance GHC.Real.Integral Data.DoubleWord.Int256
+ Data.DoubleWord: instance GHC.Real.Integral Data.DoubleWord.Int96
+ Data.DoubleWord: instance GHC.Real.Integral Data.DoubleWord.Word128
+ Data.DoubleWord: instance GHC.Real.Integral Data.DoubleWord.Word160
+ Data.DoubleWord: instance GHC.Real.Integral Data.DoubleWord.Word192
+ Data.DoubleWord: instance GHC.Real.Integral Data.DoubleWord.Word224
+ Data.DoubleWord: instance GHC.Real.Integral Data.DoubleWord.Word256
+ Data.DoubleWord: instance GHC.Real.Integral Data.DoubleWord.Word96
+ Data.DoubleWord: instance GHC.Real.Real Data.DoubleWord.Int128
+ Data.DoubleWord: instance GHC.Real.Real Data.DoubleWord.Int160
+ Data.DoubleWord: instance GHC.Real.Real Data.DoubleWord.Int192
+ Data.DoubleWord: instance GHC.Real.Real Data.DoubleWord.Int224
+ Data.DoubleWord: instance GHC.Real.Real Data.DoubleWord.Int256
+ Data.DoubleWord: instance GHC.Real.Real Data.DoubleWord.Int96
+ Data.DoubleWord: instance GHC.Real.Real Data.DoubleWord.Word128
+ Data.DoubleWord: instance GHC.Real.Real Data.DoubleWord.Word160
+ Data.DoubleWord: instance GHC.Real.Real Data.DoubleWord.Word192
+ Data.DoubleWord: instance GHC.Real.Real Data.DoubleWord.Word224
+ Data.DoubleWord: instance GHC.Real.Real Data.DoubleWord.Word256
+ Data.DoubleWord: instance GHC.Real.Real Data.DoubleWord.Word96
+ Data.DoubleWord: instance GHC.Show.Show Data.DoubleWord.Int128
+ Data.DoubleWord: instance GHC.Show.Show Data.DoubleWord.Int160
+ Data.DoubleWord: instance GHC.Show.Show Data.DoubleWord.Int192
+ Data.DoubleWord: instance GHC.Show.Show Data.DoubleWord.Int224
+ Data.DoubleWord: instance GHC.Show.Show Data.DoubleWord.Int256
+ Data.DoubleWord: instance GHC.Show.Show Data.DoubleWord.Int96
+ Data.DoubleWord: instance GHC.Show.Show Data.DoubleWord.Word128
+ Data.DoubleWord: instance GHC.Show.Show Data.DoubleWord.Word160
+ Data.DoubleWord: instance GHC.Show.Show Data.DoubleWord.Word192
+ Data.DoubleWord: instance GHC.Show.Show Data.DoubleWord.Word224
+ Data.DoubleWord: instance GHC.Show.Show Data.DoubleWord.Word256
+ Data.DoubleWord: instance GHC.Show.Show Data.DoubleWord.Word96
+ Data.DoubleWord: type family HiWord w;
+ Data.DoubleWord: }
- Data.DoubleWord: class BinaryWord w => DoubleWord w where type family LoWord w type family HiWord w
+ Data.DoubleWord: class BinaryWord w => DoubleWord w where type LoWord w type HiWord w where {
- Data.DoubleWord.TH: mkDoubleWord :: String -> String -> Strict -> Name -> String -> String -> Strict -> Name -> Strict -> Name -> [Name] -> Q [Dec]
+ Data.DoubleWord.TH: mkDoubleWord :: String -> String -> Bang -> Name -> String -> String -> Bang -> Name -> Bang -> Name -> [Name] -> Q [Dec]
Files
- data-dword.cabal +1/−1
- src/Data/DoubleWord/TH.hs +88/−61
- tests/Tests.hs +11/−84
data-dword.cabal view
@@ -1,5 +1,5 @@ Name: data-dword-Version: 0.3+Version: 0.3.1 Category: Data Stability: experimental Synopsis: Stick two binary words together to get a bigger one
src/Data/DoubleWord/TH.hs view
@@ -13,7 +13,6 @@ import Data.Bits (Bits(..)) #if MIN_VERSION_base(4,7,0) import Data.Bits (FiniteBits(..))-#else #endif import Data.Word (Word8, Word16, Word32, Word64) import Data.Int (Int8, Int16, Int32, Int64)@@ -23,7 +22,7 @@ import Data.Hashable (Hashable(..), combine) #endif import Control.Applicative ((<$>), (<*>))-import Language.Haskell.TH hiding (match)+import Language.Haskell.TH hiding (unpacked, match) import Data.BinaryWord (BinaryWord(..)) import Data.DoubleWord.Base @@ -35,13 +34,25 @@ -- 'Hashable', 'Ix', 'Bits', 'BinaryWord'. mkDoubleWord ∷ String -- ^ Unsigned variant type name → String -- ^ Unsigned variant constructor name+#if MIN_VERSION_template_haskell(2,11,0)+ → Bang -- ^ Unsigned variant higher half strictness+#else → Strict -- ^ Unsigned variant higher half strictness+#endif → Name -- ^ Unsigned variant higher half type → String -- ^ Signed variant type name → String -- ^ Signed variant constructor name+#if MIN_VERSION_template_haskell(2,11,0)+ → Bang -- ^ Signed variant higher half strictness+#else → Strict -- ^ Signed variant higher half strictness+#endif → Name -- ^ Signed variant higher half type+#if MIN_VERSION_template_haskell(2,11,0)+ → Bang -- ^ Lower half strictness+#else → Strict -- ^ Lower half strictness+#endif → Name -- ^ Lower half type → [Name] -- ^ List of instances for automatic derivation → Q [Dec]@@ -64,17 +75,42 @@ → [Name] -- ^ List of instances for automatic derivation → Q [Dec] mkUnpackedDoubleWord un uhn sn shn ln ad =- mkDoubleWord un un Unpacked uhn sn sn Unpacked shn Unpacked ln ad+ mkDoubleWord un un unpacked uhn sn sn unpacked shn unpacked ln ad+ where unpacked =+#if MIN_VERSION_template_haskell(2,11,0)+ Bang SourceUnpack SourceStrict+#else+ Unpacked+#endif mkDoubleWord' ∷ Bool → Name → Name → Name → Name- → Strict → Type- → Strict → Type+#if MIN_VERSION_template_haskell(2,11,0)+ → Bang+#else+ → Strict+#endif+ → Type+#if MIN_VERSION_template_haskell(2,11,0)+ → Bang+#else+ → Strict+#endif+ → Type → [Name] → Q [Dec] mkDoubleWord' signed tp cn otp ocn hiS hiT loS loT ad = (<$> mkRules) $ (++) $- [ DataD [] tp [] [NormalC cn [(hiS, hiT), (loS, loT)]] ad+ [ DataD [] tp []+#if MIN_VERSION_template_haskell(2,11,0)+ Nothing+#endif+ [NormalC cn [(hiS, hiT), (loS, loT)]]+#if MIN_VERSION_template_haskell(2,11,0)+ (ConT <$> ad)+#else+ ad+#endif , inst ''DoubleWord [tp] [ tySynInst ''LoWord [tpT] loT , tySynInst ''HiWord [tpT] hiT@@ -624,10 +660,7 @@ , val t2 $ appVN 'leadingZeroes [hi'] , val z $ appV 'shiftR [ VarE hi- , appV '(-)- [ appV 'bitSize- [SigE (VarE 'undefined) hiT]- , VarE t2 ]+ , appV '(-) [hiSizeE, VarE t2] ] , ValD (ConP cn [VarP hhh, VarP hll]) (NormalB $ appVN 'shiftL [x, t2]) [] @@ -863,14 +896,11 @@ , inline 'inRange ] , inst ''Bits [tp] $ {- bitSize _ = bitSize (undefined ∷ H) + bitSize (undefined ∷ L) -}- [ fun_ 'bitSize $- appV '(+)- [ appV 'bitSize [SigE (VarE 'undefined) hiT]- , appV 'bitSize [SigE (VarE 'undefined) loT] ]+ [ fun_ 'bitSize $ appV '(+) [hiSizeE, loSizeE] , inline 'bitSize #if MIN_VERSION_base(4,7,0)- {- bitSizeMaybe = Just . bitSize -}- , fun 'bitSizeMaybe $ appV '(.) [ConE 'Just, VarE 'bitSize]+ {- bitSizeMaybe = Just . finiteBitSize -}+ , fun 'bitSizeMaybe $ appV '(.) [ConE 'Just, VarE 'finiteBitSize] , inline 'bitSizeMaybe #endif {- isSigned _ = SIGNED -}@@ -909,9 +939,7 @@ (appW [ appV 'fromIntegral [appV 'shiftL [VarE lo, appVN 'negate [y]]] , zeroE ]))- [val y $- appV '(-) [ appV 'bitSize [SigE (VarE 'undefined) loT]- , VarE x ]]+ [val y $ appV '(-) [loSizeE, VarE x]] {- shiftR (W hi lo) x = W (shiftR hi x)@@ -932,8 +960,7 @@ [appVN 'fromIntegral [hi], VarE y] , appVN 'shiftR [lo, x] ]) (VarE z) ])- [ val y $ appV '(-) [ appV 'bitSize [SigE (VarE 'undefined) loT]- , VarE x ]+ [ val y $ appV '(-) [loSizeE, VarE x] , val z $ if signed then appV 'fromIntegral@@ -975,9 +1002,7 @@ , appV '(.|.) [ appV 'shiftL [ appVN 'fromIntegral [hi]- , appV '(-)- [ appV 'bitSize [SigE (VarE 'undefined) loT]- , VarE z ]+ , appV '(-) [loSizeE, VarE z] ] , appVN 'shiftR [lo, z] ] ])@@ -989,27 +1014,15 @@ , appV '(.|.) [ appV 'shift [ appVN 'fromIntegral [hi]- , appV '(-)- [ appV 'bitSize [SigE (VarE 'undefined) loT]- , VarE z] ]+ , appV '(-) [loSizeE, VarE z] ] , appV '(.|.) [appVN 'shiftL [lo, x], appVN 'shiftR [lo, z]] ] ]))- [ val y $- appV '(-) [ VarE x- , appV 'bitSize [SigE (VarE 'undefined) loT] ]- , val z $- appV '(-)- [ appV 'bitSize [SigE (VarE 'undefined) tpT]- , VarE x ]+ [ val y $ appV '(-) [VarE x, loSizeE]+ , val z $ appV '(-) [sizeE, VarE x] ] {- rotateR x y = rotateL x $ bitSize (undefined ∷ W) - y -}- , funXY 'rotateR $- appV 'rotateL- [ VarE x- , appV '(-)- [appV 'bitSize [SigE (VarE 'undefined) tpT], VarE y]- ]+ , funXY 'rotateR $ appV 'rotateL [VarE x, appV '(-) [sizeE, VarE y]] , inline 'rotateR {- bit x = if y >= 0 then W (bit y) 0 else W 0 (bit x)@@ -1018,9 +1031,7 @@ , funX' 'bit (CondE (appV '(>=) [VarE y, litI 0]) (appW [appVN 'bit [y], zeroE]) (appW [zeroE, appVN 'bit [x]]))- [val y $- appV '(-) [ VarE x- , appV 'bitSize [SigE (VarE 'undefined) loT] ]]+ [val y $ appV '(-) [VarE x, loSizeE]] , inlinable 'bit {- setBit (W hi lo) x =@@ -1045,9 +1056,7 @@ (CondE (appV '(>=) [VarE y, litI 0]) (appW [appVN 'clearBit [hi, y], VarE lo]) (appW [VarE hi, appVN 'clearBit [lo, x]]))- [val y $- appV '(-) [ VarE x- , appV 'bitSize [SigE (VarE 'undefined) loT] ]]+ [val y $ appV '(-) [VarE x, loSizeE]] , inlinable 'clearBit {- complementBit (W hi lo) x =@@ -1059,9 +1068,7 @@ (CondE (appV '(>=) [VarE y, litI 0]) (appW [appVN 'complementBit [hi, y], VarE lo]) (appW [VarE hi, appVN 'complementBit [lo, x]]))- [val y $- appV '(-) [ VarE x- , appV 'bitSize [SigE (VarE 'undefined) loT] ]]+ [val y $ appV '(-) [VarE x, loSizeE]] , inlinable 'complementBit {- testBit (W hi lo) x =@@ -1072,9 +1079,7 @@ (CondE (appV '(>=) [VarE y, litI 0]) (appVN 'testBit [hi, y]) (appVN 'testBit [lo, x]))- [val y $- appV '(-) [ VarE x- , appV 'bitSize [SigE (VarE 'undefined) loT] ]]+ [val y $ appV '(-) [VarE x, loSizeE]] , inlinable 'testBit {- popCount (W hi lo) = popCount hi + popCount lo -} , funHiLo 'popCount@@ -1084,9 +1089,20 @@ if signed then [inline 'rotateL] else [] #if MIN_VERSION_base(4,7,0) , inst ''FiniteBits [tp]- {- finiteBitSize = bitSize -}- [ fun 'finiteBitSize $ VarE 'bitSize+ {- + finiteBitSize = finiteBitSize (undefined ∷ H) ++ finiteBitSize (undefined ∷ L)+ -}+ [ fun_ 'finiteBitSize $ appV '(+) [hiSizeE, loSizeE] , inline 'finiteBitSize+# if MIN_VERSION_base(4,8,0)+ {- countLeadingZeros = leadingZeroes -}+ , fun 'countLeadingZeros $ VarE 'leadingZeroes+ , inline 'countLeadingZeros+ {- countTrailingZeros = trailingZeroes -}+ , fun 'countTrailingZeros $ VarE 'trailingZeroes+ , inline 'countTrailingZeros+# endif ] #endif , inst ''BinaryWord [tp]@@ -1245,9 +1261,8 @@ , val x $ appV 'fromIntegral [appV '(+) [VarE t6, appVN '(+) [t8, t10]]]- , val y $ appV 'bitSize [SigE (VarE 'undefined) hiT]- , val z $ appV '(-) [ appV 'bitSize [SigE (VarE 'undefined) loT]- , VarE y ]+ , val y $ hiSizeE+ , val z $ appV '(-) [loSizeE, VarE y] ] {- UNSIGNED:@@ -1267,7 +1282,7 @@ (appV '(+) [VarE y, appVN 'leadingZeroes [lo]]) (VarE x)) [ val x $ appVN 'leadingZeroes [hi]- , val y $ appV 'bitSize [SigE (VarE 'undefined) hiT]+ , val y $ hiSizeE ] , if signed then inlinable 'leadingZeroes else inline 'leadingZeroes@@ -1289,8 +1304,7 @@ (appV '(+) [VarE y, appVN 'trailingZeroes [hi]]) (VarE x)) [ val x $ appVN 'trailingZeroes [lo]- , val y $ appV 'bitSize [SigE (VarE 'undefined) loT]- ]+ , val y $ loSizeE ] , if signed then inlinable 'trailingZeroes else inline 'trailingZeroes {- allZeroes = W allZeroes allZeroes -}@@ -1379,7 +1393,11 @@ #else TySynInstD n ps t #endif- inst cls params = InstanceD [] (foldl AppT (ConT cls) (ConT <$> params))+ inst cls params = InstanceD+#if MIN_VERSION_template_haskell(2,11,0)+ Nothing+#endif+ [] (foldl AppT (ConT cls) (ConT <$> params)) fun n e = FunD n [Clause [] (NormalB e) []] fun_ n e = FunD n [Clause [WildP] (NormalB e) []] funX' n e ds = FunD n [Clause [VarP x] (NormalB e) ds]@@ -1427,6 +1445,15 @@ litS = LitE . StringL zeroE = VarE 'allZeroes oneE = VarE 'lsb+#if MIN_VERSION_base(4,7,0)+ loSizeE = appV 'finiteBitSize [SigE (VarE 'undefined) loT]+ hiSizeE = appV 'finiteBitSize [SigE (VarE 'undefined) hiT]+ sizeE = appV 'finiteBitSize [SigE (VarE 'undefined) tpT]+#else+ loSizeE = appV 'bitSize [SigE (VarE 'undefined) loT]+ hiSizeE = appV 'bitSize [SigE (VarE 'undefined) hiT]+ sizeE = appV 'bitSize [SigE (VarE 'undefined) tpT]+#endif mkRules = do let idRule = RuleP ("fromIntegral/" ++ show tp ++ "->" ++ show tp) [] (VarE 'fromIntegral)
tests/Tests.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE UnicodeSyntax #-}+{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-}@@ -44,34 +45,11 @@ main = defaultMain $ localOption (QuickCheckTests 10000) $ testGroup "Tests"- [ arbTestGroup "Word8" (0 ∷ Word8)- , arbTestGroup "Int8" (0 ∷ Int8)- , arbTestGroup "Word16" (0 ∷ Word16)- , arbTestGroup "Int16" (0 ∷ Int16)- , arbTestGroup "Word32" (0 ∷ Word32)- , arbTestGroup "Int32" (0 ∷ Int32)- , arbTestGroup "Word64" (0 ∷ Word64)- , arbTestGroup "Int64" (0 ∷ Int64)- , isoTestGroup "|Word32|Word32|" (0 ∷ U64)+ [ isoTestGroup "|Word32|Word32|" (0 ∷ U64) , isoTestGroup "|Int32|Word32|" (0 ∷ I64) , isoTestGroup "|Word16|Word16|Word32|" (0 ∷ UU64) , isoTestGroup "|Int16|Word16|Word32|" (0 ∷ II64) ] -arbTestGroup name t =- testGroup name- [ testGroup "BinaryWord"- [ testProperty "unwrappedAdd" $ prop_unwrappedAddArb t- , testProperty "unwrappedMul" $ prop_unwrappedMulArb t- , testProperty "leadingZeroes" $ prop_leadingZeroesArb t- , testProperty "trailingZeroes" $ prop_trailingZeroesArb t- , testProperty "allZeroes" $ prop_allZeroesArb t- , testProperty "allOnes" $ prop_allOnesArb t- , testProperty "msb" $ prop_msbArb t- , testProperty "lsb" $ prop_lsbArb t- , testProperty "testMsb" $ prop_testMsbArb t- , testProperty "testLsb" $ prop_testLsbArb t ]- ]- isoTestGroup name t = testGroup name [ testProperty "Iso" $ prop_conv t@@ -131,60 +109,9 @@ ] ] -prop_unwrappedAddArb ∷ ∀ α- . (Integral α, BinaryWord α, Bounded (UnsignedWord α),- Integral (UnsignedWord α))- ⇒ α → α → α → Bool-prop_unwrappedAddArb _ x y = s == toInteger x + toInteger y- where (hi, lo) = unwrappedAdd x y- s = toInteger hi * (toInteger (maxBound ∷ UnsignedWord α) + 1)- + toInteger lo--prop_unwrappedMulArb ∷ ∀ α- . (Integral α, BinaryWord α, Bounded (UnsignedWord α),- Integral (UnsignedWord α))- ⇒ α → α → α → Bool-prop_unwrappedMulArb _ x y = p == toInteger x * toInteger y- where (hi, lo) = unwrappedMul x y - p = toInteger hi * (toInteger (maxBound ∷ UnsignedWord α) + 1)- + toInteger lo--prop_leadingZeroesArb ∷ ∀ α . (Num α, BinaryWord α) ⇒ α → α → Bool-prop_leadingZeroesArb _ x- | lz == 0 = testBit x (bs - 1)- | lz == bs = x == 0- | otherwise = shiftR x (bs - lz) == 0 && testBit x (bs - lz - 1)- where lz = leadingZeroes x- bs = bitSize x--prop_trailingZeroesArb ∷ ∀ α . (Num α, BinaryWord α) ⇒ α → α → Bool-prop_trailingZeroesArb _ x- | tz == 0 = testBit x 0- | tz == bs = x == 0- | otherwise = shiftL x (bs - tz) == 0 && testBit x tz- where tz = trailingZeroes x- bs = bitSize x--prop_allZeroesArb ∷ ∀ α . BinaryWord α ⇒ α → Bool-prop_allZeroesArb a =- all (not . testBit (allZeroes ∷ α)) [0 .. bitSize a - 1]--prop_allOnesArb ∷ ∀ α . BinaryWord α ⇒ α → Bool-prop_allOnesArb a = all (testBit (allOnes ∷ α)) [0 .. bitSize a - 1]--prop_msbArb ∷ ∀ α . BinaryWord α ⇒ α → Bool-prop_msbArb a = testBit (msb ∷ α) (bitSize a - 1) &&- all (not . testBit (msb ∷ α)) [0 .. bitSize a - 2]--prop_lsbArb ∷ ∀ α . BinaryWord α ⇒ α → Bool-prop_lsbArb a = testBit (lsb ∷ α) 0 &&- all (not . testBit (lsb ∷ α)) [1 .. bitSize a - 1]--prop_testMsbArb ∷ ∀ α . BinaryWord α ⇒ α → α → Bool-prop_testMsbArb _ x = testMsb x == testBit x (bitSize x - 1)--prop_testLsbArb ∷ ∀ α . BinaryWord α ⇒ α → α → Bool-prop_testLsbArb _ x = testLsb x == testBit x 0+#if !MIN_VERSION_base(4,7,0)+finiteBitSize = bitSize+#endif toType ∷ Iso α τ ⇒ τ → α → τ toType _ = fromArbitrary@@ -223,14 +150,14 @@ prop_pred t w = (w /= minBound) ==> (pred w == withUnary t pred w) prop_unwrappedAdd ∷ (Iso α τ, Iso (UnsignedWord α) (UnsignedWord τ),- BinaryWord α, BinaryWord τ, Eq α, Eq (UnsignedWord α))+ BinaryWord α, BinaryWord τ) ⇒ τ → α → α → Bool prop_unwrappedAdd t x y = h1 == toArbitrary h2 && l1 == toArbitrary l2 where (h1, l1) = unwrappedAdd x y (h2, l2) = unwrappedAdd (toType t x) (toType t y) prop_unwrappedMul ∷ (Iso α τ, Iso (UnsignedWord α) (UnsignedWord τ),- BinaryWord α, BinaryWord τ, Eq α, Eq (UnsignedWord α))+ BinaryWord α, BinaryWord τ) ⇒ τ → α → α → Bool prop_unwrappedMul t x y = h1 == toArbitrary h2 && l1 == toArbitrary l2 where (h1, l1) = unwrappedMul x y@@ -280,18 +207,18 @@ prop_and = propBinary (.&.) (.&.) prop_or = propBinary (.|.) (.|.) propOffsets f g t w =- all (\b → f w b == withUnary t (`g` b) w) [0 .. bitSize t]+ all (\b → f w b == withUnary t (`g` b) w) [0 .. finiteBitSize t] prop_shiftL = propOffsets shiftL shiftL prop_shiftR = propOffsets shiftR shiftR prop_rotateL = propOffsets rotateL rotateL prop_rotateR = propOffsets rotateR rotateR-prop_bit t = all (\b → bit b == fromType t (bit b)) [0 .. bitSize t - 1]+prop_bit t = all (\b → bit b == fromType t (bit b)) [0 .. finiteBitSize t - 1] propBits f g t w =- all (\b → f w b == withUnary t (`g` b) w) [0 .. bitSize t - 1]+ all (\b → f w b == withUnary t (`g` b) w) [0 .. finiteBitSize t - 1] prop_setBit = propBits setBit setBit prop_clearBit = propBits clearBit clearBit prop_complementBit = propBits complementBit complementBit prop_testBit t w =- all (\b → testBit w b == withUnary' t (`testBit` b) w) [0 .. bitSize t - 1]+ all (\b → testBit w b == withUnary' t (`testBit` b) w) [0 .. finiteBitSize t - 1] prop_popCount = propUnary' popCount popCount