Automatic decoding of supported literals in REPL
Automatic decoding & display of string, number, and list types in REPL. General updates to README, style, and comments.
This commit is contained in:
@ -15,6 +15,7 @@ main = repl library
|
||||
runSapling :: String -> String
|
||||
runSapling s = show $ result (evalSapling Map.empty $ parseSapling s)
|
||||
|
||||
library :: Map.Map String T
|
||||
library = evalSapling Map.empty $ parseSapling
|
||||
"false = t\n \
|
||||
\ true = t t\n \
|
||||
@ -22,6 +23,8 @@ library = evalSapling Map.empty $ parseSapling
|
||||
\ triage = (\\a b c : t (t a b) c)\n \
|
||||
\ match_bool = (\\ot of : triage of (\\z : ot) t)\n \
|
||||
\ and = match_bool id (\\z : false)\n \
|
||||
\ if = (\\cond then else : t (t else (t t then)) t cond)"
|
||||
\ if = (\\cond then else : t (t else (t t then)) t cond)\n \
|
||||
\ triage = (\\a b c : t (t a b) c)\n \
|
||||
\ test = triage \"leaf\" (\\z : \"stem\") (\\a b : \"fork\")"
|
||||
|
||||
runSaplingEnv env s = show $ result (evalSapling env $ parseSapling s)
|
||||
|
Reference in New Issue
Block a user