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

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -