packages feed

indexation 0.6.2.1 → 0.6.3

raw patch · 2 files changed

+15/−2 lines, 2 filesdep +bitvecdep +vector-th-unbox

Dependencies added: bitvec, vector-th-unbox

Files

indexation.cabal view
@@ -1,5 +1,5 @@ name: indexation-version: 0.6.2.1+version: 0.6.3 category: Data synopsis: Tools for entity indexation description: A set of tools for indexing entities@@ -36,6 +36,7 @@     Indexation.Utils.Vector   build-depends:     base >=4.11 && <5,+    bitvec >=0.1.0.2 && <0.2,     bytestring >=0.10.8 && <0.11,     cereal >=0.5.5 && <0.6,     cereal-vector >=0.2.0.1 && <0.3,@@ -55,4 +56,5 @@     text >=1 && <2,     transformers >=0.5 && <0.6,     unordered-containers >=0.2.9 && <0.3,-    vector >=0.12 && <0.13+    vector >=0.12 && <0.13,+    vector-th-unbox >=0.2.1.6 && <0.3
library/Indexation/Instances.hs view
@@ -5,6 +5,8 @@ import Indexation.Types import Indexation.Instances.Cereal () import Indexation.Functions+import Data.Vector.Unboxed.Deriving (derivingUnbox)+import Data.Bit (Bit)   instance Show (Index a) where show (Index int) = show int@@ -13,6 +15,15 @@ deriving instance Hashable (Index a) deriving instance Generic (Index a) instance NFData (Index a)+derivingUnbox "Index"+  [t| forall a. Index a -> Int |]+  [| \ (Index x) -> x |]+  [| Index |]+derivingUnbox "MaybeIndex"+  [t| forall a. Maybe (Index a) -> (Bit, Index a) |]+  [| maybe (0, Index 0) (\ x -> (1, x)) |]+  [| \ case (1, x) -> Just x; _ -> Nothing |]+  instance Show (IndexSet a) where   show = show . (\ (IndexSet x) -> x)