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
Evan Czaplicki
ce073551ac
Minor style change
2014-02-09 14:57:35 +01:00
Evan Czaplicki
a5684ff356
Making #486 more in line with the style of the rest of the codebase
...
Actual style guidelines coming soon!
2014-02-08 16:03:04 +01:00
Joey Eremondi
8594f6ad69
Added Pretty instance for Module
2014-02-01 01:05:17 -06:00
Evan Czaplicki
56c4fb936d
Merge pull request #439 from maxsnew/safeNames
...
Hack to make imported names safe.
2014-01-28 06:11:12 -08:00
Evan Czaplicki
df149b4c3a
Move documentation to make haddock happy
2014-01-20 23:25:59 +01:00
Evan Czaplicki
b00a8cb9b5
Add check that all ports appear in the "main" module
...
It is unclear what it means if ports are used in sub-modules, so to be
cautious, we want to rule it out in the first release. As people use
the API it’ll become clear how sub-module ports are necessary and what
problems they might cause.
2014-01-20 15:10:40 +01:00
Evan Czaplicki
6ba394c9cb
Get rid of experimental code for handling "deriving"
2014-01-20 01:09:50 +01:00
Max New
53c2ab1531
Move splitDots and prevent a non-exhaustive pattern match warning
2014-01-18 17:44:11 -06:00
John P Mayer Jr
0cd2af27a6
used a more specific PP rendering to revert the changes to SS.Type pretty
2014-01-15 19:46:41 -05:00
John P Mayer Jr
853e63c918
better shrinking and not-infinite-dump generation results in passed tests!
2014-01-15 01:39:36 -05:00
John P Mayer Jr
afb6bd5023
better gen and shrink, but stack overflows
2014-01-14 19:33:40 -05:00
Evan Czaplicki
c602071022
Cosmetic: use a qualified import to clarify uses of isTuple
2014-01-14 16:27:28 +01:00
Evan Czaplicki
93321eca63
Fix issue with unparenthesized patterns in pretty printed lambdas pointed out by @JoeyEremondi in #446
...
Regarding the proposed fix in #446 : The pattern pretty printer is
correct for cases where you just want the pattern, such as in
case-expressions. In some contexts, parentheses are required though, so
this fix addresses those places specifically.
2014-01-14 16:27:06 +01:00
Evan Czaplicki
6febb89fcd
Fix pretty printing for tuples as discoered by @JoeyEremondi and/or @jmite in PR #446
...
This fix uses some existing functions for reliably figuring out if
something is a tuple.
2014-01-14 16:13:18 +01:00
Evan Czaplicki
1191c8a665
Add comments to explain the thought process and structure of the AST
2014-01-14 16:02:23 +01:00
Evan Czaplicki
6c1d2d7bf3
cosmetic: generalize collectLambdas
to make a list of types, move prettifying code to the Pretty instance
2014-01-14 12:48:54 +01:00
Evan Czaplicki
329077f1ef
Get rid of input handlers for now
2014-01-13 19:24:17 +01:00
Evan Czaplicki
2a0a0e6e3c
Simplify SourceSyntax.Type AST, making record extension more restrictive as discussed with @maxsnew
2014-01-13 11:01:10 +01:00
Evan Czaplicki
9dda928ac4
make conversion functions for input ports optional
2014-01-13 11:01:10 +01:00
Evan Czaplicki
828c2c7372
Give more reasonable names to incoming and outgoing ports
2014-01-13 11:01:10 +01:00
Evan Czaplicki
8cadc4d92c
Remove comment for things that no longer exist
2014-01-12 13:06:50 +01:00
Max New
cca69cf8e7
Fix Char literal printing bug.
2014-01-07 15:52:19 -06:00
Evan Czaplicki
96f55fceab
Take ports out of MetadataModule, where it is no longer needed
2014-01-06 08:06:56 +01:00
Evan Czaplicki
3b9862ab4e
Switch from Types to Variables in the representation of PortIn
2014-01-05 09:29:00 +01:00
Evan Czaplicki
7cf5a564e5
Add Expressions for ports to check and validate types nicely
2014-01-04 11:39:38 +01:00
Evan Czaplicki
270dbf8722
Add -Wall to a bunch of SourceSyntax files and get them warning free
2014-01-04 10:14:36 +01:00
Evan Czaplicki
bdeb36eb6f
Fix port parser! Copy paste error on the operator.
2014-01-03 12:12:43 +01:00
Evan Czaplicki
3c65b5c69d
Move boundVars
function into SourceSyntax.Pattern
2014-01-02 23:23:11 -08:00
Evan Czaplicki
bd4d76ecae
Chenge representation of Expr, add ports representation
...
Get rid of the unused t and v type variables. Add the def type
variable, which models the fact that type annotations and definitions
start separate, but need to be combined before most stuff goes down.
Ports have the same structure as definitions in that annotations and
definitions are separate at the source level and need to be combined.
The same technique used in Expr is now used in Decl as well.
2014-01-02 23:18:42 -08:00
Evan Czaplicki
5c509f2f1e
Make Binary serialization code nicer
2014-01-02 17:42:27 -08:00
Evan Czaplicki
662fd7669a
Add JS as a possible Derivation, correct binary serialization, add error when serialization goes wrong.
2014-01-02 13:38:41 -08:00
Evan Czaplicki
578dfb8358
Merge branch 'js-integration' into dev
2014-01-02 12:29:08 -08:00
Max New
d003062586
Pattern pretty printer prints syntactically correct code.
...
Include auto-generated test case that was previously broken.
2013-12-29 20:46:20 -06:00
Max New
2da9009512
Setup QuickCheck and add Literal Parse/Print test
...
Currently fails the prop tests: https://github.com/evancz/Elm/issues/420
Also ignore emacs backup files.
2013-12-29 16:50:41 -06:00
Evan Czaplicki
740702c0d7
Begin switch from current FFI syntax to "port" syntax
2013-12-23 23:53:54 -08:00
Evan Czaplicki
83e8bad84f
Add basics of "deriving" for ADTs and type aliases. Only parse it for type aliases at the moment.
2013-12-23 16:51:15 -08:00
Evan Czaplicki
32c78efe7d
Begin process of allowing "deriving" on type aliases.
2013-12-23 14:42:43 -08:00
Evan Czaplicki
e119d8ef62
Get rid of SourceSyntax.Everything module
2013-12-22 15:18:16 -08:00
Evan Czaplicki
7b20993869
Get rid of dependency on uniplate so AST does not need to derive Data or Typeable
...
This is motivated by wanting to add things to the AST that cannot
derive Data or Typeable
2013-12-20 16:41:06 -08:00
Evan Czaplicki
26a8c82b6f
Get rid of Build.Info file, move compiler version to Elm.Internal.Version and use Elm's version conventions
2013-12-17 11:36:05 -08:00
Evan Czaplicki
dac51abc88
Finish refactoring code into Build/ directory, make some names more consistent and remove unneeded dependencies
2013-12-14 23:29:39 -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
fe047d5156
Merge branch 'master' into dev
2013-11-19 22:40:05 -08:00
Evan Czaplicki
f0d9d3be1d
Fix minor indentation issue with eightyCharLines
2013-11-19 22:39:48 -08:00
Evan Czaplicki
bccfece2c1
Merge branch 'master' into dev
2013-11-19 22:34:08 -08:00
Evan Czaplicki
f73a6ff9f9
Add an occurs check to finally resolve #294
...
Add it in the more clever location suggested by Pottier and Remy. Also
change the style of error messages to get rid of the expected/actual
problem for now, and make hints read more smoothly.
2013-11-19 22:31:38 -08:00
Evan Czaplicki
9d9e9d2388
Just show the value of located things, not the location.
2013-11-11 15:40:51 +01:00
Michael Sondergaard
158c70eee7
Fix typo
2013-11-04 21:09:22 +01:00