Evan Czaplicki
51ba512914
Parse qualified infix functions
...
It is okay to say
4 `Time.since` Mouse.clicks
2013-08-01 15:38:19 -07:00
Evan Czaplicki
66e2a97d2a
Allow prefixes on FFI types
2013-08-01 15:37:34 -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
66515259cf
Only deprime when generating JavaScript, better to preserve information
2013-07-29 23:19:16 +02:00
Evan Czaplicki
ac450ae944
restrict exports to def
and term
2013-07-29 19:49:09 +02:00
Evan Czaplicki
1418bde44d
Remove use of SourceSyntax.Rename, which no longer exists
2013-07-29 11:54:50 +02:00
Evan Czaplicki
760ad905cf
Add record constructors, begin using lists to represent fields in record types to maintain ordering from the source program
2013-07-26 18:20:57 +02:00
Evan Czaplicki
938675110d
Fix parser for "import List" which before was not importing anything.
2013-07-26 12:31:49 +02:00
Evan Czaplicki
2609f5dda7
Add support for let (==>) = Lambda in …
2013-07-23 17:00:05 +02:00
Evan Czaplicki
6f94400f2d
Begin parsing types and patterns such as A.B.C
2013-07-22 14:40:32 +02:00
Evan Czaplicki
97bd68a796
Make parse errors print more nicely
2013-07-22 14:40:00 +02:00
Evan Czaplicki
22f7f8a43a
Create a serializable interface for a module's type information
...
Also add a flag to print out top-level types
2013-07-21 06:08:08 +02:00
Evan Czaplicki
5cb82c6891
Add support for "(,,) a b c" as a valid type annotation
2013-07-20 18:53:41 +02:00
Evan Czaplicki
0cfae2e43b
More specific imports
2013-07-16 21:38:43 +02:00
Evan Czaplicki
640f98e7d5
Rename functions and modules
2013-07-16 21:38:20 +02:00
Evan Czaplicki
1ffaad1f5c
Create an isOp
function for strings.
2013-07-16 21:37:48 +02:00
Evan Czaplicki
91be5a0c03
Rename the parser.
2013-07-16 16:02:04 +02:00
Evan Czaplicki
1c9da4bf9c
Force whitespace between number and operator in infix declarations.
2013-07-16 14:50:35 +02:00
Evan Czaplicki
8590c6bd18
Add parsing for infix declarations. No support for actually using this
...
information though.
2013-07-16 14:39:58 +02:00
Evan Czaplicki
72bd5cb8eb
Clean out this file, getting rid of dead code and adding some types.
2013-07-16 14:39:26 +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
08ff939174
Be more flexible with the position of the closing bracket of a record type.
2013-07-14 14:55:29 +02:00
Evan Czaplicki
87d2f8d57d
Get declarations parsing properly. The definition parser needs to be
...
the last option.
2013-07-14 01:41:03 +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
96fd5bfd78
Update program parser to use Parse.Declarations
2013-07-07 22:11:16 +02:00
Evan Czaplicki
d29ca3beeb
Create a Parse.Declaration file for all declarations. Get rid of special
...
purpose Parse.Foreign library.
2013-07-07 22:06:56 +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
9d68c10683
Add support for triple-quoted multi-line strings
2013-06-27 18:55:01 +02:00
Evan Czaplicki
e80ea9e430
Add support for pattern matching on literals.
2013-06-23 01:36:23 -07: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
evancz
339ad77c46
Begin getting the parser to match the new SourceSyntax modules.
2013-06-13 18:35:37 -07:00
evancz
73317ed123
Switch to using MultiIf for all if expressions. Simplifies AST.
2013-06-13 16:01:35 -07:00
evancz
0d96f82208
Add type constructor for extensible records.
2013-06-07 10:16:38 -07:00
evancz
28db384691
Fix parsing bug in as
patterns that would fully commit if any spaces were seen.
...
Also add `as` variables to reported variables in patterns.
2013-06-06 23:16:46 -07:00
evancz
ba5cd880d4
Merge branch 'master' of https://github.com/evancz/Elm
2013-06-06 22:30:07 -07:00
Andrew Miller
f8547cf4be
Update 'at patterns' to use the as notation per mailing list discussion
2013-06-07 12:53:50 +12:00
Andrew Miller
3c71ee1c4d
Support @ patterns as in Haskell
2013-06-06 21:27:20 +12:00
evancz
44fecefde6
Merge branch 'master' of https://github.com/evancz/Elm
2013-06-05 14:22:51 -07:00
evancz
f5bdb2ca7e
Minor code changes to help allow custom infix precedence and associativity.
2013-06-05 14:22:11 -07:00
Andrew Miller
6a34482849
Add support for type annotations in let
2013-06-03 19:44:45 +12:00
evancz
6b28feaa2b
Switch name of Context to Located. Whoo static types :)
2013-05-29 16:20:38 -07:00