Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: 0.0.1
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (14 sloc) 0.467 kb
module TypeInference where
import Syntax
import Types
import TypeInference.Env
import TypeInference.Expr
import TypeInference.Constraints
import TypeInference.Counter
import Control.Monad.Error
import Control.Monad.State
typeOfExpression :: Env -> Expr -> Either String Type
typeOfExpression env e =
case fst $ runState (runErrorT $ typeOfExpr env emptyConstraints e) emptyState of
Left s -> Left s
Right (a, _) -> Right a
Jump to Line
Something went wrong with that request. Please try again.