From: TomṠMusil Date: Wed, 2 Sep 2015 15:30:17 +0000 (+0200) Subject: more work on HM interpreter X-Git-Url: http://git.tomasm.cz/fp.git/commitdiff_plain/0d7d9b4184cd881452d854cc571595f518fb1afe?ds=sidebyside more work on HM interpreter --- diff --git a/src/HM/Interpreter.hs b/src/HM/Interpreter.hs index 90f5595..17e1e96 100644 --- a/src/HM/Interpreter.hs +++ b/src/HM/Interpreter.hs @@ -16,8 +16,6 @@ import HM import HM.Term import HM.Parser -import qualified Lambda as L - data Definition = Definition String TypedTerm dictionary :: [Definition] -> M.Map VarName TypedTerm diff --git a/src/HM/Lambda.hs b/src/HM/Lambda.hs new file mode 100644 index 0000000..e85041c --- /dev/null +++ b/src/HM/Lambda.hs @@ -0,0 +1,15 @@ +module HM.Lambda where + +import Control.Monad.State +import Data.Map as M + +import HM.Term + +type Env = M.Map VarName Term +type LI a = State Env a + +stripType :: TypedTerm -> Term +stripType (NTTerm t) = t +stripType (TTerm t _) = t + +