Evan Czaplicki
9dd5dff279
Make AST more general and try to give its phases better names
...
Also change the constructors for the Pattern ADT
2014-02-10 00:17:33 +01:00
DanDanDan
8d41059658
also improve the interpolation parser
2014-01-29 09:04:16 +01:00
Evan Czaplicki
6a8db4c230
Get rid of dead dependencies and add -Wall for some files
2014-01-03 12:33:56 +01:00
Evan Czaplicki
e3b8ea7d09
Update basic parsers to use the new formats for Expr, Declaration, and Port
2014-01-02 23:20:25 -08:00
Evan Czaplicki
fcbd7fd73b
Improve some parser code by adding type annotations, removing unused dependencies, and using prefixed imports
2013-12-23 23:26:03 -08:00
Max New
254d71f4e5
Expand else
to True
instead of otherwise
.
...
Makes `if` syntax independent of the value of `otherwise`.
Includes test case.
2013-12-23 18:31:55 -06:00
Evan Czaplicki
4452e4e138
Turn off markdown interpolation for now.
...
This will of course get turned back on! I don’t want to do it in the
very next release though.
2013-12-10 23:04:27 -08:00
Evan Czaplicki
e32eab0e62
Merge branch 'master' into dev
...
Conflicts:
compiler/Generate/JavaScript.hs
compiler/Generate/Noscript.hs
compiler/Parse/Expression.hs
compiler/SourceSyntax/Expression.hs
2013-11-22 12:22:29 -08:00
Evan Czaplicki
c8643484be
Abstract out the code for markdown parsing, making it easier to switch out the implementation
2013-11-22 12:12:22 -08:00
Evan Czaplicki
90e007730d
introduce the padded
function to use fewer whitespace
markers
2013-11-02 19:21:26 +01:00
Evan Czaplicki
56ecbbc70a
Implement markdown interpolation
2013-10-25 17:36:30 +02:00
Evan Czaplicki
5ad0ec5b7a
Parse documentation and infix declarations more safely
2013-10-17 13:40:28 -04:00
Evan Czaplicki
03cf56d8ec
cosmetic: make it simpler to get locations for parses
2013-10-14 22:38:38 -04:00
Evan Czaplicki
fb64557f75
Switch format of OpTables, and add iParse that takes a table
2013-09-15 14:39:55 -07:00
Evan Czaplicki
fecc96dde7
Rename some functions and export typeAnnotation
2013-09-04 17:16:35 -07:00
Evan Czaplicki
16a215a249
Show sign on interpolation if there is a failure
2013-09-02 15:18:20 -07:00
Evan Czaplicki
aed6d9547a
Merge branch 'experimental' into dev
...
Conflicts:
compiler/Generate/JavaScript.hs
2013-09-01 01:43:51 -07:00
Evan Czaplicki
4e8898bef1
Remove unused references to Unique
2013-08-31 02:59:43 -07:00
Evan Czaplicki
6ba2d70365
Revert 95ec3a8..1a093ac
...
This rolls back to commit 95ec3a822e
.
2013-08-29 16:43:54 -07:00
Evan Czaplicki
7c159b294a
Enable parsing of basic markdown interpolation
...
No interpolated values are actually used, but they are type checked.
2013-08-29 13:00:38 -07:00
Evan Czaplicki
6d27c5eee7
Move OpTable into IParser user state
2013-08-29 00:54:54 -07:00
Evan Czaplicki
d3dc74325d
Remove dead code
2013-08-25 19:23:45 -07:00
Evan Czaplicki
a4c4cf0493
Use Location.none
less
2013-07-30 11:55:41 -07:00
Evan Czaplicki
b26edcc46e
Simplify representation of source locations
2013-07-30 11:43:42 -07:00
Evan Czaplicki
ac450ae944
restrict exports to def
and term
2013-07-29 19:49:09 +02:00
Evan Czaplicki
2609f5dda7
Add support for let (==>) = Lambda in …
2013-07-23 17:00:05 +02:00
Evan Czaplicki
18adffc06d
Turn unary negation back on.
2013-07-16 00:36:34 +02:00
Evan Czaplicki
90d50dbb13
Turn off unary negation parsing for now. It has weird behavior when
...
paired with function calls:
(- sqrt 9) -- parse error
(-sqrt 9) -- type error, cannot negate function
-(sqrt 9) -- this works
- (sqrt 9) -- parse error
- sqrt 9 -- parse error
2013-07-15 12:22:04 +02:00
Evan Czaplicki
2b9886336f
Fix parsing of unary negation when it is the first thing in parentheses.
2013-07-15 11:53:53 +02:00
Evan Czaplicki
343dcf2250
Add support for unary negation with the '-' symbol. Makes the use of
...
'-' whitespace sensitive, as in the unary negation proposal in
elm-discuss.
f -1 == f (0-1)
x - 1 == (x-1)
x-1 == (x-1)
2013-07-14 17:55:38 +02:00
Evan Czaplicki
0ed72056b6
Add pretty printing for type constraints.
...
Convert source-syntax types into type-checker types and print them
with pretty type variables.
Generate constraints for let-expressions using type annotations.
Build test function to turn strings into type constraints.
2013-07-08 16:47:44 +02:00
Evan Czaplicki
e4ca96731d
Create a source syntax for types that will get converted into the internal type representation during type checking.
2013-07-07 18:13:40 +02:00
Evan Czaplicki
f2b3ed7027
Start using the PrettyPrint library to show expressions, literals, and patterns.
2013-07-07 12:56:34 +02:00
Evan Czaplicki
69ed7631fe
Start switching over to an AST that uses patterns in lambdas and
...
pulls the arguments out of Definitions (placing them in lambdas).
2013-07-04 11:36:08 +02:00
Evan Czaplicki
cd83c4c8ed
Allow full expressions as the last member of binary expressions (t + t + e)
2013-06-23 01:31:34 -07:00
evancz
9a40249e05
Fix the confusion with "Cons" and "Nil" in issue #176 .
...
Also add the ExplicitList expression.
2013-06-20 21:25:10 -07:00
evancz
c7dce08193
Parameterized the AST for type annotations and variable types. Also rename Guid.hs to Unique.hs which reads a lot nicer.
2013-06-13 20:25:00 -07:00
evancz
459cf8ec73
Switch parsers over to new AST
2013-06-13 19:15:40 -07:00