Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 23d8bc68d7
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (21 sloc) 0.966 kb
> module Main where
Jones the Steam, with IO primitives.
Simple program for starting up an interactive shell with Ivor library.
> import Ivor.TT
> import Ivor.Shell
> import Ivor.Primitives
> import IOPrims
> main :: IO ()
> main = do let shell = addModulePath (newShell emptyContext)
> (prefix ++ "/lib/ivor")
> shell <- importFile "basics.tt" shell
> primCtxt <- addIOPrimTypes (getContext shell)
> let shell' = addModulePath (newShell primCtxt)
> (prefix ++ "/lib/ivor")
> shell' <- importFile "iobasics.tt" shell'
> primFnCtxt <- addIOPrimFns (getContext shell')
> -- It is horrible to have to do this every time. Fix the API!
> let shell'' = addModulePath (newShell primFnCtxt)
> (prefix ++ "/lib/ivor")
> ctxt <- runShell "> " (extendParser shell'' parsePrimitives)
> putStrLn "Finished"
Jump to Line
Something went wrong with that request. Please try again.