Commit graph

25 commits

Author SHA1 Message Date
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
Renamed from compiler/Parse/Expr.hs (Browse further)