import Control.Monad
import Control.Monad.Trans
+//import Control.Monad.State
import Data.Either
import Data.Maybe
import Data.Monoid
instance zero Gamma where
zero = 'Map'.newMap
-variableStream :: [String]
+variableStream :: [TVar]
variableStream = map toString [1..]
sem :: AST -> Either [SemError] Constraints
unify t1 t2 | t1 == t2 = Right zero
| otherwise = Left $ UnifyError zero t1 t2
+//// ------------------------
+//// Algorithm M, Inference and Solving
+//// ------------------------
+//:: Typing a :== StateT (Gamma, [TVar]) Either a
+
+//map a schemes type variables to variables with fresh names
+//i.e. a->[b] becomes c->[d]