project-m36 0.9.8 → 0.9.9
raw patch · 4 files changed
+14/−6 lines, 4 filesdep ~curryer-rpcPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: curryer-rpc
API changes (from Hackage documentation)
- ProjectM36.Base: DifferenceF :: r_ays0 -> r_ays0 -> RelationalExprBaseF (a_amCE :: Type) r_ays0
+ ProjectM36.Base: DifferenceF :: r_aEmz -> r_aEmz -> RelationalExprBaseF (a_aszD :: Type) r_aEmz
- ProjectM36.Base: EqualsF :: r_ays0 -> r_ays0 -> RelationalExprBaseF (a_amCE :: Type) r_ays0
+ ProjectM36.Base: EqualsF :: r_aEmz -> r_aEmz -> RelationalExprBaseF (a_aszD :: Type) r_aEmz
- ProjectM36.Base: ExistingRelationF :: Relation -> RelationalExprBaseF (a_amCE :: Type) r_ays0
+ ProjectM36.Base: ExistingRelationF :: Relation -> RelationalExprBaseF (a_aszD :: Type) r_aEmz
- ProjectM36.Base: ExtendF :: ExtendTupleExprBase a_amCE -> r_ays0 -> RelationalExprBaseF (a_amCE :: Type) r_ays0
+ ProjectM36.Base: ExtendF :: ExtendTupleExprBase a_aszD -> r_aEmz -> RelationalExprBaseF (a_aszD :: Type) r_aEmz
- ProjectM36.Base: GroupF :: AttributeNamesBase a_amCE -> Text -> r_ays0 -> RelationalExprBaseF (a_amCE :: Type) r_ays0
+ ProjectM36.Base: GroupF :: AttributeNamesBase a_aszD -> Text -> r_aEmz -> RelationalExprBaseF (a_aszD :: Type) r_aEmz
- ProjectM36.Base: JoinF :: r_ays0 -> r_ays0 -> RelationalExprBaseF (a_amCE :: Type) r_ays0
+ ProjectM36.Base: JoinF :: r_aEmz -> r_aEmz -> RelationalExprBaseF (a_aszD :: Type) r_aEmz
- ProjectM36.Base: MakeRelationFromExprsF :: Maybe [AttributeExprBase a_amCE] -> TupleExprsBase a_amCE -> RelationalExprBaseF (a_amCE :: Type) r_ays0
+ ProjectM36.Base: MakeRelationFromExprsF :: Maybe [AttributeExprBase a_aszD] -> TupleExprsBase a_aszD -> RelationalExprBaseF (a_aszD :: Type) r_aEmz
- ProjectM36.Base: MakeStaticRelationF :: Attributes -> RelationTupleSet -> RelationalExprBaseF (a_amCE :: Type) r_ays0
+ ProjectM36.Base: MakeStaticRelationF :: Attributes -> RelationTupleSet -> RelationalExprBaseF (a_aszD :: Type) r_aEmz
- ProjectM36.Base: NotEqualsF :: r_ays0 -> r_ays0 -> RelationalExprBaseF (a_amCE :: Type) r_ays0
+ ProjectM36.Base: NotEqualsF :: r_aEmz -> r_aEmz -> RelationalExprBaseF (a_aszD :: Type) r_aEmz
- ProjectM36.Base: ProjectF :: AttributeNamesBase a_amCE -> r_ays0 -> RelationalExprBaseF (a_amCE :: Type) r_ays0
+ ProjectM36.Base: ProjectF :: AttributeNamesBase a_aszD -> r_aEmz -> RelationalExprBaseF (a_aszD :: Type) r_aEmz
- ProjectM36.Base: RelationVariableF :: Text -> a_amCE -> RelationalExprBaseF (a_amCE :: Type) r_ays0
+ ProjectM36.Base: RelationVariableF :: Text -> a_aszD -> RelationalExprBaseF (a_aszD :: Type) r_aEmz
- ProjectM36.Base: RenameF :: Text -> Text -> r_ays0 -> RelationalExprBaseF (a_amCE :: Type) r_ays0
+ ProjectM36.Base: RenameF :: Text -> Text -> r_aEmz -> RelationalExprBaseF (a_aszD :: Type) r_aEmz
- ProjectM36.Base: RestrictF :: RestrictionPredicateExprBase a_amCE -> r_ays0 -> RelationalExprBaseF (a_amCE :: Type) r_ays0
+ ProjectM36.Base: RestrictF :: RestrictionPredicateExprBase a_aszD -> r_aEmz -> RelationalExprBaseF (a_aszD :: Type) r_aEmz
- ProjectM36.Base: UngroupF :: Text -> r_ays0 -> RelationalExprBaseF (a_amCE :: Type) r_ays0
+ ProjectM36.Base: UngroupF :: Text -> r_aEmz -> RelationalExprBaseF (a_aszD :: Type) r_aEmz
- ProjectM36.Base: UnionF :: r_ays0 -> r_ays0 -> RelationalExprBaseF (a_amCE :: Type) r_ays0
+ ProjectM36.Base: UnionF :: r_aEmz -> r_aEmz -> RelationalExprBaseF (a_aszD :: Type) r_aEmz
- ProjectM36.Base: WithF :: [(WithNameExprBase a_amCE, r_ays0)] -> r_ays0 -> RelationalExprBaseF (a_amCE :: Type) r_ays0
+ ProjectM36.Base: WithF :: [(WithNameExprBase a_aszD, r_aEmz)] -> r_aEmz -> RelationalExprBaseF (a_aszD :: Type) r_aEmz
- ProjectM36.Base: data RelationalExprBaseF (a_amCE :: Type) r_ays0
+ ProjectM36.Base: data RelationalExprBaseF (a_aszD :: Type) r_aEmz
Files
- Changelog.markdown +5/−0
- project-m36.cabal +2/−2
- src/lib/ProjectM36/Atomable.hs +4/−2
- test/Relation/Atomable.hs +3/−2
Changelog.markdown view
@@ -1,3 +1,8 @@+# 2024-01-12 (v0.9.9)++* revert to using streamly 0.9.0 due to over-the-wire corruption bug in 0.10.0+* fixed toAtom/fromAtom for NonEmpty lists (#363)+ # 2023-12-30 (v0.9.8) * fix notification serialization in transaction (#362)
project-m36.cabal view
@@ -1,6 +1,6 @@ Cabal-Version: 2.2 Name: project-m36-Version: 0.9.8+Version: 0.9.9 License: MIT --note that this license specification is erroneous and only labeled MIT to appease hackage which does not recognize public domain packages in cabal >2.2- Project:M36 is dedicated to the public domain Build-Type: Simple@@ -35,7 +35,7 @@ Default: True Library- Build-Depends: base>=4.16 && < 4.19, ghc-paths, mtl, containers, unordered-containers, hashable, haskeline, directory, MonadRandom, random-shuffle, uuid >= 1.3.12, cassava >= 0.4.5.1 && < 0.6, text, bytestring, deepseq, deepseq-generics, vector, parallel, monad-parallel, exceptions, transformers, gnuplot, filepath, zlib, directory, temporary, stm, time, old-locale, rset, attoparsec, either, base64-bytestring, data-interval, extended-reals, aeson >= 1.1, path-pieces, conduit, resourcet, http-api-data, semigroups, QuickCheck, quickcheck-instances, list-t, stm-containers >= 0.2.15, foldl, optparse-applicative, Glob, cryptohash-sha256, text-manipulate >= 0.2.0.1 && < 0.4, winery >= 1.4, curryer-rpc>=0.3.2, network, async, vector-instances, recursion-schemes, streamly == 0.9.0, convertible, fast-builder, scientific+ Build-Depends: base>=4.16 && < 4.19, ghc-paths, mtl, containers, unordered-containers, hashable, haskeline, directory, MonadRandom, random-shuffle, uuid >= 1.3.12, cassava >= 0.4.5.1 && < 0.6, text, bytestring, deepseq, deepseq-generics, vector, parallel, monad-parallel, exceptions, transformers, gnuplot, filepath, zlib, directory, temporary, stm, time, old-locale, rset, attoparsec, either, base64-bytestring, data-interval, extended-reals, aeson >= 1.1, path-pieces, conduit, resourcet, http-api-data, semigroups, QuickCheck, quickcheck-instances, list-t, stm-containers >= 0.2.15, foldl, optparse-applicative, Glob, cryptohash-sha256, text-manipulate >= 0.2.0.1 && < 0.4, winery >= 1.4, curryer-rpc>=0.3.4, network, async, vector-instances, recursion-schemes, streamly == 0.9.0, convertible, fast-builder, scientific if flag(haskell-scripting) Build-Depends: ghc >= 9.0 && < 9.5 CPP-Options: -DPM36_HASKELL_SCRIPTING
src/lib/ProjectM36/Atomable.hs view
@@ -158,8 +158,10 @@ instance Atomable a => Atomable (NE.NonEmpty a) where toAtom (x NE.:| []) = ConstructedAtom "NECons" (nonEmptyListAtomType (toAtomType (Proxy :: Proxy a))) [toAtom x]- toAtom (x NE.:| xs) = ConstructedAtom "NECons" (nonEmptyListAtomType (toAtomType (Proxy :: Proxy a))) (map toAtom (x:xs))- fromAtom _ = error "improper fromAtom (NonEmptyList a)"+ toAtom (x NE.:| xs) = ConstructedAtom "NECons" (nonEmptyListAtomType (toAtomType (Proxy :: Proxy a))) [toAtom x, toAtom xs]+ fromAtom (ConstructedAtom "NECons" _ [x]) = fromAtom x NE.:| []+ fromAtom (ConstructedAtom "NECons" _ [x,y] ) = fromAtom x NE.:| fromAtom y+ fromAtom x = error "improper fromAtom (NonEmptyList a)" toAtomType _ = ConstructedAtomType "NonEmptyList" (M.singleton "a" (toAtomType (Proxy :: Proxy a))) toAddTypeExpr _ = NoOperation
test/Relation/Atomable.hs view
@@ -13,6 +13,7 @@ import qualified Data.Map as M import Data.Proxy import Codec.Winery+import Data.List.NonEmpty {-# ANN module ("Hlint: ignore Use newtype instead of data" :: String) #-} data Test1T = Test1C Integer@@ -36,7 +37,7 @@ deriving (Show, Generic, Eq, NFData, Atomable) deriving Serialise via WineryVariant TestListT -data TestNonEmptyT = TestNonEmptyC [Integer]+data TestNonEmptyT = TestNonEmptyC (NonEmpty Integer) deriving (Show, Generic, Eq, NFData, Atomable) deriving Serialise via WineryVariant TestNonEmptyT @@ -181,7 +182,7 @@ testNonEmptyInstance :: Test testNonEmptyInstance = TestCase $ do- let example = TestNonEmptyC [3,4,5]+ let example = TestNonEmptyC (3 :| [4,5]) assertEqual "NonEmpty instance" example (fromAtom (toAtom example)) testNonPrimitiveValues :: Test