packages feed

yaya-test 0.3.0.0 → 0.3.1.0

raw patch · 2 files changed

+14/−31 lines, 2 filesdep ~yaya

Dependency ranges changed: yaya

Files

test/Test/Retrofit.hs view
@@ -1,4 +1,5 @@-{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE DeriveTraversable+           , TemplateHaskell #-}  -- | The point of this module is that it should compile _without_ importing any --   other Yaya modules.@@ -6,43 +7,25 @@  import           Hedgehog -import qualified Yaya.Hedgehog.Expr as ExprF import           Yaya.Retrofit  data DExpr   = Lit Int   | Add DExpr DExpr   | Mult DExpr DExpr--instance Projectable (->) DExpr ExprF.Expr where-  project = \case-    Lit i -> ExprF.Lit i-    Add a b -> ExprF.Add a b-    Mult a b -> ExprF.Mult a b--instance Steppable (->) DExpr ExprF.Expr where-  embed = \case-    ExprF.Lit i -> Lit i-    ExprF.Add a b -> Add a b-    ExprF.Mult a b -> Mult a b--instance Corecursive (->) DExpr ExprF.Expr where-  ana ψ = embed . fmap (ana ψ) . ψ+  deriving (Eq, Show) --- | This is unsafe, but we really just want to make sure all the methods are---   available.-instance Recursive (->) DExpr ExprF.Expr where-  cata φ = φ . fmap (cata φ) . project+extractPatternFunctor defaultRules ''DExpr --- | This can be derived in this case, but we want to ensure we could define it---   if necessary.-instance Eq DExpr where-  (==) = recursiveEq+-- -- | This can be derived in this case, but we want to ensure we could define it+-- --   if necessary.+-- instance Eq DExpr where+--   (==) = recursiveEq --- | This can be derived in this case, but we want to ensure we could define it---   if necessary.-instance Show DExpr where-  showsPrec = recursiveShowsPrec+-- -- | This can be derived in this case, but we want to ensure we could define it+-- --   if necessary.+-- instance Show DExpr where+--   showsPrec = recursiveShowsPrec  tests :: IO Bool tests = checkParallel $$(discover)
yaya-test.cabal view
@@ -1,5 +1,5 @@ name:                yaya-test-version:             0.3.0.0+version:             0.3.1.0 synopsis:            Test suites for `yaya`. description:         This package should not be depended on by anything. homepage:            https://github.com/sellout/yaya#readme@@ -22,7 +22,7 @@   build-depends:       base >= 4.7 && < 5                      , deriving-compat                      , hedgehog-                     , yaya >= 0.3.0+                     , yaya >= 0.3.1                      , yaya-hedgehog >= 0.2.0   default-extensions:  LambdaCase                      , MultiParamTypeClasses