Safe Haskell | None |
---|---|
Language | Haskell2010 |
>>>
:set -XOverloadedStrings
>>>
import Data.Maybe
>>>
id = fromJust . ident
>>>
ctx <- initContext
>>>
ev x = eval x ctx []
>>>
ev [str "Hello, World!", KIdent $ id "say!"]
Hello, World! []>>>
ev [int 1, int 2, KIdent $ id "-"]
[-1]
>>>
ev x = evalText "" x ctx []
>>>
ev "\"Hello, World!\" say!"
Hello, World! []>>>
ev "1 2 +"
[3]
... TODO ...