Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Commit

Permalink
fix boolean check test
Browse files Browse the repository at this point in the history
  • Loading branch information
martyall committed Jan 29, 2024
1 parent 00735ab commit 0587f13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/Examples/Arithmetic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Snarkl.Field (F_BN128)
import Snarkl.Language.Prelude (Ty (..), pair, (>>=))
import qualified Snarkl.Language.Prelude as Snarkl
import Stalk (Stalk (runStalk))
import Prelude (Bool (..), fromInteger, (*), (+), (-), (==))
import Prelude (Bool (..), fromInteger, (*), (+), (-), (==), (&&))

-- we need the because we enabled rebindable syntax
ifThenElse :: Bool -> a -> a -> a
Expand Down Expand Up @@ -50,9 +50,9 @@ simpleBool :: Snarkl.Comp 'TField F_BN128
simpleBool =
let prog :: (F_BN128, F_BN128) -> F_BN128
prog (x, y) =
let -- f = x * x + 2 * x + 1 - y
let f = x * x + 2 * x + 1 - y
g = x + 7 - y
in if g == 0 then 42 else 0
in if f == 0 && g == 0 then 42 else 0

compiledProg :: Stalk F_BN128 (F_BN128, F_BN128) F_BN128
compiledProg = Categorify.expression prog
Expand Down

0 comments on commit 0587f13

Please sign in to comment.