remove unnecessary
[fp.git] / src / HM.hs
index 9c4aa76..8f6df2f 100644 (file)
--- a/src/HM.hs
+++ b/src/HM.hs
@@ -16,7 +16,6 @@ module HM
   , TypedTerm(..)
     -- * Type inference
   , algW
-  , runTI
   ) where
 
 import Control.Monad.Except
@@ -123,7 +122,7 @@ ti e (NTTerm (Let x a b)) = do
   return (s1 `composeSub` s2, t2)
   
  
-algW :: TypedTerm -> TI Type
-algW t = do
+algW :: TypedTerm -> Either String Type
+algW t = fst . runTI $ do
   (s, u) <- ti Map.empty t
   return $ substituteT s u