typechecking - How am I supposed to use the package haskell-type-exts? -


i trying typecheck code snippet provided string.

i found package haskell-type-exts (hackage link) seems provide need: parsemodule ast gets constructed on typecheckmodule can applied. don't know result. of type tc varenv tc monad.

the package provides test case used:

ea <- runtc testenv $ typecheckexp e 

but runtc in hidden module cannot use it. here code have far:

import language.haskell.exts.parser (parsemodule, parseresult(..)) import language.haskell.typecheck.typecheck -- import language.haskell.typecheck.monad  --hidden module  main =     let m = "mytest = map (+1) [1..10]"     let r = parsemodule m     case r of          parseok res -> printstuff res          _ -> print "wtf"  printstuff r =     let right tc = return $ typecheckmodule r --    print tc? 

what missing here? maybe module hidden mistake?

i think package not yet ready usage. @ source of language.haskell.typecheck. example typecheck = undefined typechecks of course!

you try use ghc-api (haddock , wiki page).


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -