Created
July 20, 2019 22:45
-
-
Save calebh/0cda659b8ba3382a2ed531bf02ca1590 to your computer and use it in GitHub Desktop.
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
type ErrorMessage = Lazy<string> | |
type Constraint = Equal of TyExpr * TyExpr * ErrorMessage | |
| And of Constraint * Constraint | |
| Trivial | |
let (=~=) q1 q2 err = Equal (q1, q2, err) | |
let (&&&) c1 c2 = And (c1, c2) | |
let rec conjoinConstraints cc = | |
match cc with | |
| [] -> Trivial | |
| [c] -> c | |
| c::cs -> c &&& (conjoinConstraints cs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment