remove no longer applicable TODOs
Include macro expansion trace in SrcPos. Better err msgs!
In expansion of macro.
Extract tests from CheckSpec to individual files in test/tests/bad
SystemSpec now runs those and verifies the type errors match what's expected
Change formatting: 90 cols, IndentPolicyFree, etc. Add brittany.yaml
Most people have pretty wide and high res screens at this point. I
can't fit two windows with 100 line length next to eachother with my
font size, but 90 works and most people have smaller font size than me
Also, change brittanys indentation policy to Free. This almost always
looks better. I just had to disable formatting of imports -- I don't
want to align those, but IndentationPolicyFree insists.
Finally, actually add a project-local brittany config file, so that
anyone (or me in the future / on another computer) can use the same
Refactor global & let definitions
Instead of jumbling together function and var defs and just checking
which is which at the end in Codegen, treat them very separately and
remember the grouping for recursive defs.
For now, just moves around complexity really. I don't remember how
exactly, but I thought this would be necessary for the next feature,
which is allowing patterns in left hand side of var defs.
Add rudimentary DWARF debugging
Can now view stacktrace with line numbers in GDB. Can step
line-by-line and see position in source with `gdb -tui` (although it's
somewhat crippled by not being statement-based like C etc).
Check user-written types in Infer
Basically, do `checkType` for user-written types. It detects
references to undefined types. Also, separete AnnotAst.Type from
Ast.Type to help enforce that this is done. This whole ordeal required
Simplify error-region parsing in TypeErr using tokenTree everywhere
Match: Check for redundancy
`printErr : ... -> IO ()` to `prettyErr : ... -> Source -> String`
Instead of reading the source file (for the second time) via IO, pass
along the source we got in Main
Mark offending section of offending line in type errors
by applying the parser at the sourcepos of the item, and counting how
long the consumed input was to get the span of the item in the source.
Put SourcePos in newtype SrcPos
Simplify representation of Pat
Improve how SourcePos is stored & remove unnecessary variant
Add pos to Id & add pos to error for conflicting var defs in pattern