Skip to content

Commit

Permalink
Extend unifyTypes to matching operators
Browse files Browse the repository at this point in the history
Ignore-this: 6951e456907f60f695cecce3f8bb49cd

darcs-hash:20111020130404-e29d1-482762198691b296e5e2f0fa3613f2f2d591e1d5.gz
  • Loading branch information
adamgundry committed Oct 20, 2011
1 parent b55e46d commit 16f5aba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Unify.lhs
Expand Up @@ -119,6 +119,9 @@
> (unifyTypes f1 f2 >> unifyTypes s1 s2)
> (erk "Mismatched kinds")

> unifyTypes (UnOp o) (UnOp o') | o == o' = return ()
> unifyTypes (BinOp o) (BinOp o') | o == o' = return ()

> unifyTypes (TyVar alpha) tau = startSolve alpha tau
> unifyTypes tau (TyVar alpha) = startSolve alpha tau
> unifyTypes tau upsilon = errCannotUnify (fogTy tau) (fogTy upsilon)
Expand Down

0 comments on commit 16f5aba

Please sign in to comment.