packages feed

algebra-checkers 0.1.0.0 → 0.1.0.1

raw patch · 4 files changed

+20/−13 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,3 +1,9 @@ # Changelog for algebra-checkers  ## Unreleased changes++## Version 0.1.0.1 (2022-11-19)++Minor updates to get algebra-changes compiling on relatively recent versions of+GHC.+
algebra-checkers.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.31.2.+-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack ----- hash: b82e33c00a44f13bb2653ad3fb8f750bc17d16b2c3c2c62c4aa0efed07997433+-- hash: b2ce128c345663de2a4dbe5b85693e0334dd72b5ff97280e770ac8ac296bb053  name:           algebra-checkers-version:        0.1.0.0+version:        0.1.0.1 synopsis:       Model and test API surfaces algebraically description:    Please see the README on GitHub at <https://github.com/isovector/algebra-checkers#readme> category:       Model@@ -15,7 +15,7 @@ bug-reports:    https://github.com/isovector/algebra-checkers/issues author:         Sandy Maguire maintainer:     sandy@sandymaguire.me-copyright:      2020 Sandy Maguire+copyright:      2020-2022 Sandy Maguire license:        BSD3 license-file:   LICENSE build-type:     Simple
src/AlgebraCheckers/Theorems.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE TemplateHaskellQuotes #-} {-# LANGUAGE TupleSections         #-}+{-# LANGUAGE ViewPatterns          #-}  module AlgebraCheckers.Theorems where @@ -66,14 +67,14 @@     go _ = []  isFullyMatchable :: Exp -> Bool-isFullyMatchable (ConE _)                 = True-isFullyMatchable (TupE es)                = all isFullyMatchable es-isFullyMatchable (ListE es)               = all isFullyMatchable es-isFullyMatchable (LitE _)                 = True-isFullyMatchable (UnboundVarE _)          = True-isFullyMatchable (AppE (UnboundVarE _) _) = False-isFullyMatchable (AppE exp1 exp2)         = isFullyMatchable exp1 && isFullyMatchable exp2-isFullyMatchable _                        = False+isFullyMatchable (ConE _)                      = True+isFullyMatchable (TupE (sequenceA -> Just es)) = all isFullyMatchable es+isFullyMatchable (ListE es)                    = all isFullyMatchable es+isFullyMatchable (LitE _)                      = True+isFullyMatchable (UnboundVarE _)               = True+isFullyMatchable (AppE (UnboundVarE _) _)      = False+isFullyMatchable (AppE exp1 exp2)              = isFullyMatchable exp1 && isFullyMatchable exp2+isFullyMatchable _                             = False  namedLawToEither :: NamedLaw -> Either (Law ()) (Law String) namedLawToEither (Law (LawName n) a b) = Right (Law n a b)
src/AlgebraCheckers/Unification.hs view
@@ -159,7 +159,7 @@       (InfixE (Just lhs2) exp2 Nothing) = do   s1 <- unify lhs1 lhs2   unifySub s1 exp1 exp2-unify (TupE exps1) (TupE exps2) = do+unify (TupE (sequenceA -> Just exps1)) (TupE (sequenceA -> Just exps2)) = do   guard $ exps1 == exps2   foldM (uncurry . unifySub) mempty $ zip exps1 exps2 unify (CondE cond1 then1 else1) (CondE cond2 then2 else2) = do