greg
c96a56a7ac
fresh
2018-07-26 00:52:46 -07:00
greg
4017857a3a
Unification
2018-07-26 00:52:46 -07:00
greg
131c83b64d
Consult these haskell programs from https://github.com/quchen/articles/tree/master/hindley-milner
2018-07-26 00:52:46 -07:00
greg
9e0f8b8a14
InferError
2018-07-26 00:52:46 -07:00
greg
7121624f77
Type Env
2018-07-26 00:52:46 -07:00
greg
48e795decc
apply_substitution for PolyTypes
...
If I made an error it's likely here...
2018-07-26 00:52:46 -07:00
greg
a26da934f4
Substitution monotypes
2018-07-26 00:52:46 -07:00
greg
1de1cd9cfd
For H-M, add types and some impls
2018-07-26 00:52:46 -07:00
greg
6f639b9030
Type type structure
2018-07-26 00:52:46 -07:00
greg
8f0104ebc7
Deletion
2018-07-26 00:52:46 -07:00
greg
36cd7e080d
Even more deletions
2018-07-26 00:52:46 -07:00
greg
f48a25779c
Lol just get rid of all the old code, start from scratch again
2018-07-26 00:52:46 -07:00
greg
808a1bfc98
Still more deletions
2018-07-26 00:52:46 -07:00
greg
c7e46c1cfa
KIll any commented code
2018-07-26 00:52:46 -07:00
greg
98cfcfc18d
Eval shouldn't be aware of types
2018-07-26 00:52:46 -07:00
greg
b4c7ea3d02
Show bindings too in debug
2018-07-26 00:52:46 -07:00
greg
e7c89ed840
Some more refactoring
2018-07-26 00:52:46 -07:00
greg
b0e38f7f5b
Refactor
2018-07-26 00:52:46 -07:00
greg
276662d98a
Some code rearrangements
2018-07-26 00:52:46 -07:00
greg
e8e9265b26
Use less verbose match syntax
2018-07-26 00:52:46 -07:00
greg
cb316a973e
Getting back to hindley-milner
...
First, clear out some of this cruft in the compiler warnings
2018-07-26 00:52:46 -07:00
greg
e64861b602
Some eval tests
2018-07-26 00:52:46 -07:00
greg
1673fd1cf9
Fix test
2018-07-26 00:52:46 -07:00
greg
c00effcbdd
Add _
2018-07-26 00:52:46 -07:00
greg
8378170fbd
Kill comments
2018-07-26 00:52:46 -07:00
greg
7ab385d398
Bring custom ADTs to the repl
2018-07-26 00:52:46 -07:00
greg
9fb148bb02
Make compile again
2018-07-26 00:52:46 -07:00
greg
97df2fa344
I dunno
2018-07-26 00:52:46 -07:00
greg
a08134a747
Delete old code in eval
2018-07-26 00:52:46 -07:00
greg
6707b2bb9c
debug outputs in order
2018-07-26 00:52:46 -07:00
greg
3ac50f974d
Pass around reference to type context in evaluator
2018-07-26 00:52:46 -07:00
greg
160ce95e5f
Fully comment example source file
2018-07-26 00:52:46 -07:00
greg
afc4281e7f
Evaluate function arguments in context before applying them
2018-07-26 00:52:46 -07:00
greg
8d6fea942f
Handle function definition before use
...
And some other ReducedAST - Evaluation niceties
2018-07-26 00:52:46 -07:00
greg
6d93c758a2
Add function to symbol table
2018-07-26 00:52:46 -07:00
greg
aff421cd99
Working with symbol table
...
Note that symbol table is a different object now than the previous
binding table that was used for type-checking. That binding table is not
currently debugged and should be debugged in a separate debug output with
typechecking proper.
2018-07-26 00:52:46 -07:00
greg
493d76da0b
Add symbol table data structure to typechecking
2018-07-26 00:52:46 -07:00
greg
eb681fbff9
Make parse error message nicer
2018-07-26 00:52:46 -07:00
greg
f3e3843528
Decomplexify delimited!
2018-07-26 00:52:46 -07:00
greg
6b90e19eb1
Simplify expect! macro
...
Ends up printing a debug print, but whatever, will fix later
2018-07-26 00:52:46 -07:00
greg
210ae47c8b
Get rid of lambda
2018-07-26 00:52:46 -07:00
greg
70794d8ff1
For expression parsing
2018-07-26 00:52:46 -07:00
greg
532c8c45b4
Parse while expressions
...
Decided to add while expressions to the language to make for-parsing
easier. Plus some other random notes
2018-07-26 00:52:46 -07:00
greg
24b532df06
This doesn't need to be a closure
2018-07-26 00:52:46 -07:00
greg
ac576be604
Trim newline in getline()
...
Ineffiicent but whatever
2018-07-26 00:52:46 -07:00
greg
6bf106a1a3
Equality
2018-07-26 00:52:46 -07:00
greg
161e47fe91
Add schala source file test.schala
2018-07-26 00:52:46 -07:00
greg
1a58f3b7af
Add fizzbuzz source
...
Next goal will be, to implement enough to make this work
2018-07-26 00:52:46 -07:00
greg
44e585fca2
Conditionals
2018-07-26 00:52:46 -07:00
greg
3f836eb74f
Kill some warnings
2018-07-26 00:52:46 -07:00