Richard Feldman
066d8370d3
Fix is_multiline's understanding of a newline
2019-11-14 00:26:24 +01:00
Richard Feldman
fbb387f3a7
Use fmt::is_multiline in record formatting
2019-11-14 00:17:05 +01:00
Richard Feldman
f2f3919992
Update test_format to expected record output
2019-11-14 00:12:44 +01:00
Richard Feldman
d9583cce98
Add fmt module
2019-11-14 00:10:35 +01:00
Richard Feldman
ab4f354add
Add always_with_list test
2019-11-13 23:03:25 +01:00
Richard Feldman
c4970235e2
Add a commented-out test to be uncommented later
2019-11-13 23:02:40 +01:00
Richard Feldman
a699a3ec1d
Use write! more
2019-11-13 23:02:15 +01:00
Richard Feldman
d8051566e9
Clarify another comment
2019-11-13 23:02:06 +01:00
Richard Feldman
0b9db3b958
Drop obsolete comment
2019-11-13 23:01:29 +01:00
Richard Feldman
1f297b5560
Pacify warnings for now
2019-11-13 23:01:08 +01:00
Richard Feldman
3b95bfee17
Clarify a comment
2019-11-13 23:00:47 +01:00
Folkert
4fe125f405
Add formatting for records
...
currently, some tests are failing because
- i'm not sure what the "correct" formatting is
- and how to handle spaces (especially newlines)
Perhaps it's OK to ignore newlines for now, and just always start with
`{<space>` and close with `<space>}`?
2019-11-13 22:10:49 +01:00
Richard Feldman
dc95c848c3
Restore some inference tests
2019-11-09 03:32:23 -05:00
Richard Feldman
a09eb41a92
Add a type inference test for identity
2019-11-09 03:31:56 -05:00
Richard Feldman
3ed86acaf5
Add a second case code gen test
2019-11-09 03:31:42 -05:00
Richard Feldman
0a74db1169
Custom formatter for Type
2019-11-09 03:31:18 -05:00
Richard Feldman
46758e1209
Drop unused BinOp type
2019-11-09 03:31:06 -05:00
Richard Feldman
4611211d34
Solve Pattern constraints
2019-11-09 03:30:41 -05:00
Richard Feldman
cf1306c463
Fix binop parsing bug
2019-11-09 03:30:27 -05:00
Richard Feldman
5dd3d1ff54
Fix constraint gen for case
2019-11-09 03:29:58 -05:00
Richard Feldman
539a856073
Fix desugaring case branches
2019-11-09 03:28:54 -05:00
Richard Feldman
6764f5a096
Extract some canonicalization number helpers
2019-11-09 03:28:08 -05:00
Richard Feldman
2380c50282
Drop dead code
2019-11-08 22:50:52 -05:00
Richard Feldman
d2ef411bd7
Add some comments
2019-11-08 22:25:40 -05:00
Richard Feldman
57b015bb62
Reproduce case inference mistake
2019-11-08 20:33:09 -05:00
Richard Feldman
9a2c24e97a
Fix some constraint gen things
2019-11-08 20:32:54 -05:00
Richard Feldman
d06fe8d4be
Address a TODO in case canonicalization
2019-11-08 20:20:30 -05:00
Richard Feldman
d39604bf2f
Add Field to can/expr
2019-11-08 20:20:15 -05:00
Richard Feldman
3a4bc0b311
Test unary ops with parens
2019-11-08 00:09:38 -05:00
Richard Feldman
97d424f99b
Unary ops and case canonicalization compile!
2019-11-08 00:07:32 -05:00
Richard Feldman
7ab7fdb88c
Add unary operators
2019-11-04 21:25:55 -05:00
Richard Feldman
09c7d75f0d
wip canonicalize case
2019-11-03 20:24:34 +01:00
Richard Feldman
d8e0e77110
Write some docs
2019-11-03 20:23:09 +01:00
Richard Feldman
1cedc63f27
wip
2019-10-30 20:00:35 +01:00
Richard Feldman
ea8dafa746
First pass at code gen for case-expressions
2019-10-30 20:00:35 +01:00
Richard Feldman
bc866da2d6
Add failing test for codegen case-expression
2019-10-30 20:00:35 +01:00
Richard Feldman
7e910532c5
Fix parsing for case-expresison number literals
2019-10-30 20:00:35 +01:00
Richard Feldman
6fccf33c32
Desugar Case expressions
2019-10-30 19:58:49 +01:00
Richard Feldman
61e4ae83d9
Restore two_branch_case test
2019-10-30 19:58:21 +01:00
Richard Feldman
d6bebcd629
Remove some extraneous can/pattern data
2019-10-30 19:58:11 +01:00
Richard Feldman
67548a8922
Fix parsing defs
...
This may break annotation parsing. (I'm not sure; there are no annotation
parsing tests yet.) Something fishy is happening with the one_of2 in def().
If I remove the one_of2, then defs parse correctly. If I reverse the
order of one_of2's arguments, they also pass. This suggests the first
argument to one_of2 (the "parse type alias or custom type") logic was
passing...but on further investigation, it appears that is actually
failing. (Meaning it shouldn't affect one_of2!)
Needs further investigation when I get back to annotations, but for now,
this fixes the problem and leaves the code in a reasonable place.
2019-10-30 02:36:50 -04:00
Richard Feldman
39f4057dfa
Fix column number in some parsing tests
2019-10-30 02:36:35 -04:00
Richard Feldman
74b14531c9
Disable some inference tests for now.
2019-10-30 02:09:09 -04:00
Richard Feldman
6528be0ed1
Revert "Attempt to fix defs parsing"
...
This reverts commit 6156a5b8f9
.
2019-10-30 01:24:17 -04:00
Richard Feldman
6156a5b8f9
Attempt to fix defs parsing
2019-10-30 01:24:09 -04:00
Richard Feldman
daf2480e55
Revert "Drop unnecessary conditional"
...
This reverts commit 8eba1ea94f
.
2019-10-30 01:02:59 -04:00
Richard Feldman
d217514b36
Fix stack overflow in type_annotation parser
2019-10-30 01:02:20 -04:00
Richard Feldman
953dad5177
Use correct min_indent
2019-10-30 00:58:07 -04:00
Richard Feldman
7e10805c77
Drop debug printlns
2019-10-30 00:39:33 -04:00
Richard Feldman
8eba1ea94f
Drop unnecessary conditional
2019-10-30 00:38:54 -04:00