Evan Czaplicki
6ba2d70365
Revert 95ec3a8..1a093ac
...
This rolls back to commit 95ec3a822e
.
2013-08-29 16:43:54 -07:00
Evan Czaplicki
1a093ac53a
Properly turn off custom OpTables
...
oops!
2013-08-29 02:57:01 -07:00
Evan Czaplicki
65dcc0b57e
Turn off custom OpTables for now
2013-08-29 02:55:49 -07:00
Evan Czaplicki
d7c89ee07c
support cross-module OpTables
2013-08-29 02:53:20 -07:00
Evan Czaplicki
f1a88975d2
Add iParse that takes a table
2013-08-29 00:55:32 -07:00
Evan Czaplicki
6d27c5eee7
Move OpTable into IParser user state
2013-08-29 00:54:54 -07:00
Evan Czaplicki
7785eb8e48
Remove dead code
2013-08-25 19:24:45 -07:00
Evan Czaplicki
d3dc74325d
Remove dead code
2013-08-25 19:23:45 -07:00
Evan Czaplicki
082e6a20c0
Throw proper parse errors, stop using error
2013-08-25 19:22:41 -07:00
Evan Czaplicki
40ea6df24b
Make sure that generated JS does not use JS's reserved words as variables
2013-08-24 15:00:23 -07:00
Evan Czaplicki
5fd85cd9c5
Permit single line comments intermingled with types
2013-08-15 23:29:29 -07:00
Evan Czaplicki
9ec51f558d
deprime on parsing, not on JS generation
2013-08-14 00:42:26 -07:00
Evan Czaplicki
d9918e0ac2
Convince parser to commit to lists, records, and tuples
2013-08-13 23:41:44 -07:00
Evan Czaplicki
61b5d8fbfa
Nicer messages on specific parse failures
2013-08-13 23:11:23 -07:00
Evan Czaplicki
ab83c78d8d
Remove dead code
2013-08-13 23:09:46 -07:00
Evan Czaplicki
cd84e06695
Make pattern exhaustive, giving parse error when someone uses binops with different associativity
2013-08-13 22:20:00 -07:00
Evan Czaplicki
9821e12a4c
Strip \r from multiline strings
2013-08-07 09:12:53 -07:00
Evan Czaplicki
ed6b255ba5
Properly parse out module names, defaulting to Main if no name is given.
2013-08-06 21:20:08 -07:00
Evan Czaplicki
9f2b81e4a9
Unhide thing that does not exist
2013-08-02 16:09:06 -07:00
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