on master help sign in
fix fallout from Int -> Integer IntAtom change
commitebaee2ab0cc3d26222b312206afc740b17bd8e64 authorAgentM <agentm@themactionfaction.com> dateSat 16 Sep 2017, 15:24 (9 years ago) parentf5746c2
2 files changed+4−4
examples/out_of_the_tarpit.hs+1−1 src/bin/benchmark/bigrel.hs+3−3
examples/out_of_the_tarpit.hs+1−1
@@ -97,7 +97,7 @@ instance Tupleable Room
9797data Floor = Floor {
9898 floorAddress :: Address,
9999 floorRoomName :: Name,
100− floorNum :: Int
100+ floorNum :: Integer
101101 }
102102 deriving (Generic, Eq)
103103
src/bin/benchmark/bigrel.hs+3−3
@@ -78,7 +78,7 @@ intmapMatrixRun = do
7878intmapMatrixRelation :: Int -> Int -> HS.HashSet (IM.IntMap Atom)
7979intmapMatrixRelation attributeCount tupleCount = HS.fromList $ map mapper [0..tupleCount]
8080 where
81− mapper tupCount = IM.fromList $ map (\c-> (c, IntAtom tupCount)) [0..attributeCount]
81+ mapper tupCount = IM.fromList $ map (\c-> (c, IntAtom (fromIntegral tupCount))) [0..attributeCount]
8282
8383instance Hash.Hashable (IM.IntMap Atom) where
8484 hashWithSalt salt tupMap = Hash.hashWithSalt salt (show tupMap)
@@ -93,7 +93,7 @@ vectorMatrixRun = do
9393vectorMatrixRelation :: Int -> Int -> HS.HashSet (V.Vector Atom)
9494vectorMatrixRelation attributeCount tupleCount = HS.fromList $ map mapper [0..tupleCount]
9595 where
96− mapper tupCount = V.replicate attributeCount (IntAtom tupCount)
96+ mapper tupCount = V.replicate attributeCount (IntAtom (fromIntegral tupCount))
9797
9898instance Hash.Hashable (V.Vector Atom) where
9999 hashWithSalt salt vec = Hash.hashWithSalt salt (show vec)
@@ -103,7 +103,7 @@ instance Hash.Hashable (V.Vector Atom) where
103103matrixRelation :: Int -> Int -> Either RelationalError Relation
104104matrixRelation attributeCount tupleCount = do
105105 let attrs = A.attributesFromList $ map (\c-> Attribute (T.pack $ "a" ++ show c) IntAtomType) [0 .. attributeCount-1]
106− tuple tupleX = RelationTuple attrs (V.generate attributeCount (\_ -> IntAtom tupleX))
106+ tuple tupleX = RelationTuple attrs (V.generate attributeCount (\_ -> IntAtom (fromIntegral tupleX)))
107107 tuples = map tuple [0 .. tupleCount]
108108 mkRelationDeferVerify attrs (RelationTupleSet tuples)
109109