Skip to content

Commit

Permalink
upgrade to SBV 8
Browse files Browse the repository at this point in the history
  • Loading branch information
mrd committed Aug 17, 2019
1 parent ece9920 commit 778153a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions Language/Expression/Prop.hs
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,17 @@ instance HFoldableAt Identity LogicOp where
LogNot x -> not <$> x
LogAnd x y -> liftA2 (&&) x y
LogOr x y -> liftA2 (||) x y
LogImpl x y -> liftA2 (==>) x y
LogEquiv x y -> liftA2 (<=>) x y
LogImpl x y -> liftA2 (||) (not <$> x) y
LogEquiv x y -> liftA2 (&&) (liftA2 (||) (not <$> x) y) (liftA2 (||) (not <$> y) x)

instance HFoldableAt SBV LogicOp where
hfoldMap = implHfoldMap $ \case
LogLit b -> fromBool b
LogNot x -> bnot x
LogAnd x y -> x &&& y
LogOr x y -> x ||| y
LogImpl x y -> x ==> y
LogEquiv x y -> x <=> y
LogNot x -> sNot x
LogAnd x y -> x .&& y
LogOr x y -> x .|| y
LogImpl x y -> x .=> y
LogEquiv x y -> x .<=> y

-- instance HEq LogicOp where
-- liftHEq _ _ (LogLit x) (LogLit y) = x == y
Expand Down
6 changes: 3 additions & 3 deletions Language/While/Syntax.hs
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ instance EvalOpAt SBV WhileOpKind where
OpGT -> runcurry (.>)
OpGE -> runcurry (.>=)

OpAnd -> runcurry (&&&)
OpOr -> runcurry (|||)
OpAnd -> runcurry (.&&)
OpOr -> runcurry (.||)

OpNot -> runcurry bnot
OpNot -> runcurry sNot

-- instance EqOpMany WhileOpKind where
-- liftEqMany (OpLit x) (OpLit y) _ = \_ _ -> x == y
Expand Down
4 changes: 2 additions & 2 deletions package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: verifiable-expressions
version: '0.5.0'
version: '0.6.0'
category: Language
author: Bradley Hardy
maintainer: [email protected]
Expand All @@ -15,7 +15,7 @@ dependencies:
- transformers >=0.5 && <0.6
- mtl >=2.0 && <3
- lens >=4.16.1 && <5
- sbv >=7.0 && <8
- sbv >=8.0 && <9
- union >=0.1.1 && <0.2
- vinyl >=0.8.1 && <0.9
library:
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ packages:
extra-deps:
- syz-0.2.0.0
- vinyl-0.8.1
resolver: lts-13.6
resolver: lts-14.1

0 comments on commit 778153a

Please sign in to comment.