Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 674 Bytes

ghci_guide.md

File metadata and controls

38 lines (29 loc) · 674 Bytes

A Tutorial to run Kuifje with ghci

Automatic script

expect run_ghci_prompt.exp

Loading modules

To load ghci with the Kuifje compiler loaded, run

cabal repl

The first step is to run ghci, which can be done by:

ghci

Then, we need to directly import some files

import Text.PrettyPrint.Boxes
import Language.Kuifje.Distribution
import Language.Kuifje.PrettyPrint
:l Kuifje.Env
:l Kuifje.Value
:l Kuifje.Run

Running an example

To run the "Monty" example, please, run the follwing commands:

hyperOut <- runFile "Examples/Monty.kf" [] (point (E.envFromList [("x", R 0)]))
printBox . toBox $ hyperOut