From f3f1dcc0a4b1723bb10e16329dad559376070445 Mon Sep 17 00:00:00 2001 From: greg Date: Sun, 27 Jan 2019 22:38:20 -0800 Subject: [PATCH] Add some notes --- TODO.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/TODO.md b/TODO.md index d8d0b63..610484c 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,30 @@ +#Typechecking Notes + +(cf. cardelli paper) + +Given a length function def: +```` +fn length(x) { + if x.is_null { + 0 + } else { + succ(length(x.tail)) + } +} +```` +Constraints: +.null: List a -> bool +.tail: List a -> List a +0: Nat +succ: Nat -> Nat + + + # TODO Items +-make the REPL more advanced! + -Plan of attack: -write a visitor pattern for AST -convert AST type to including SourceMap'd wrappers (w/ .into())