Created
January 19, 2017 01:14
-
-
Save nponeccop/739a720582c961ab05991d61fb5cb598 to your computer and use it in GitHub Desktop.
Minimal client for HNC Unifier.Unifier module
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
{-# LANGUAGE NoMonomorphismRestriction, FlexibleContexts #-} | |
import Control.Unification (freeVar) | |
import Control.Unification.IntVar | |
import Control.Monad.Trans | |
import Control.Monad.Identity | |
import Unifier.Unifier | |
import Unifier.Restricted | |
t = UTerm . T | |
ar a b = UTerm $ TT [a, b] | |
uni1 = unify (t "foo") (t "bar") | |
uni2 = do | |
a <- lift freeVar | |
unify (UVar a) (t "bar") | |
runStack = runIdentity . runIntBindingT . runErrorT2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment