-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Insert extra let bindings to avoid evaluating expressions multiple ti…
…mes during pattern matching
- Loading branch information
Showing
6 changed files
with
167 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,22 @@ | ||
stdout = ''' | ||
let and1 : Bool -> Bool -> Bool = fun x y => if (x, y)._0 | ||
then if (x, y)._1 then true else false | ||
else false; | ||
let and2 : Bool -> Bool -> Bool = fun x y => if (x, y)._0 | ||
then if (x, y)._1 then true else false | ||
else false; | ||
let and3 : Bool -> Bool -> Bool = fun x y => if (x, y)._0 | ||
then if (x, y)._1 then true else false | ||
else if (x, y)._1 then false | ||
else false; | ||
let or1 : Bool -> Bool -> Bool = fun x y => if (x, y)._0 | ||
then true | ||
else if (x, y)._1 then true | ||
else false; | ||
let or2 : Bool -> Bool -> Bool = fun x y => if (x, y)._0 | ||
then true | ||
else if (x, y)._1 then true | ||
else false; | ||
let or3 : Bool -> Bool -> Bool = fun x y => if (x, y)._0 | ||
then if (x, y)._1 then true else true | ||
else if (x, y)._1 then true | ||
else false; | ||
let xor1 : Bool -> Bool -> Bool = fun x y => if (x, y)._0 | ||
then if (x, y)._1 then false else true | ||
else if (x, y)._1 then true | ||
else false; | ||
let xor2 : Bool -> Bool -> Bool = fun x y => if (x, y)._0 | ||
then if (x, y)._1 then false else true | ||
else if (x, y)._1 then true | ||
else false; | ||
let xor3 : Bool -> Bool -> Bool = fun x y => if (x, y)._0 | ||
then if (x, y)._1 then false else true | ||
else if (x, y)._1 then true | ||
else false; | ||
let and1 : Bool -> Bool -> Bool = fun x y => let _ : (Bool, Bool) = (x, y); | ||
if _._0 then if _._1 then true else false else false; | ||
let and2 : Bool -> Bool -> Bool = fun x y => let _ : (Bool, Bool) = (x, y); | ||
if _._0 then if _._1 then true else false else false; | ||
let and3 : Bool -> Bool -> Bool = fun x y => let _ : (Bool, Bool) = (x, y); | ||
if _._0 then if _._1 then true else false else if _._1 then false else false; | ||
let or1 : Bool -> Bool -> Bool = fun x y => let _ : (Bool, Bool) = (x, y); | ||
if _._0 then true else if _._1 then true else false; | ||
let or2 : Bool -> Bool -> Bool = fun x y => let _ : (Bool, Bool) = (x, y); | ||
if _._0 then true else if _._1 then true else false; | ||
let or3 : Bool -> Bool -> Bool = fun x y => let _ : (Bool, Bool) = (x, y); | ||
if _._0 then if _._1 then true else true else if _._1 then true else false; | ||
let xor1 : Bool -> Bool -> Bool = fun x y => let _ : (Bool, Bool) = (x, y); | ||
if _._0 then if _._1 then false else true else if _._1 then true else false; | ||
let xor2 : Bool -> Bool -> Bool = fun x y => let _ : (Bool, Bool) = (x, y); | ||
if _._0 then if _._1 then false else true else if _._1 then true else false; | ||
let xor3 : Bool -> Bool -> Bool = fun x y => let _ : (Bool, Bool) = (x, y); | ||
if _._0 then if _._1 then false else true else if _._1 then true else false; | ||
() : () | ||
''' | ||
stderr = '' |