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
Michael Sondergaard
4a111890ed
Add invalid serialization errors to Module.hs
2013-11-04 20:34:29 +01:00
Michael Sondergaard
67924d1c8a
Remove catch-all match in Declaration
...
These ought to actually be written out, as the previous TODO message stated,
but at least this way the compiler will warn us when adding a new Decl.
2013-11-04 20:34:29 +01:00
Michael Sondergaard
a0cbe84f1d
Throw an error when deserializing a bad type
...
This error should never be encountered, as long as we always update the get
function when the put function is, as required by get . put == id.
2013-11-04 20:32:53 +01:00
Justin Leitgeb
c845e586ed
Give more helpful error messages when deserializing elmi files
...
Provides an error message indicating incorrect compiler version or corrupt file.
Exit status will be 1 in either failure case and error message is printed to
stderr. Uses the same checks against interfaces.data as well as standard .elmi
files since both are susceptible to breaking in the same way.
The following will be displayed when an elmi file has a different compiler
version than the elm compiler that tries to load it:
justin ~/Code/elm-lang.org/public/examples/Intermediate $ ~/Code/elm/dist/build/elm/elm Pong.elm
Found build artifacts created by a different Elm compiler version. Please rebuilt cache/Pong.elmi and try again.
The following will be displayed when a file that cannot be deserialized is
encountered:
justin ~/Code/elm-lang.org/public/examples/Intermediate $ ~/Code/elm/dist/build/elm/elm Pong.elm
Got an error, 'demandInput: not enough bytes' at offset 10303 of cache/Pong.elmi.
This error may be due to an outdated or corrupt artifact from a previous build. Please rebuild cache/Pong.elmi and try again.
2013-11-03 20:35:10 -05:00
Evan Czaplicki
d97fe192e0
Merge branch 'markdown' into dev
...
Conflicts:
Elm.cabal
2013-10-29 15:36:56 +01:00
Evan Czaplicki
737fedcb69
Merge pull request #303 from jsl/fix_issue_299
...
Print types even when the elm file has already been compiled.
2013-10-29 07:30:12 -07:00
Justin Leitgeb
576bc28142
Print types even when the elm file has already been compiled.
...
This fixes issue #299 , where types are not printed even when the
`--print-types` option is given for an elm file that has already
been compiled.
2013-10-28 16:29:28 -05:00
Evan Czaplicki
56ecbbc70a
Implement markdown interpolation
2013-10-25 17:36:30 +02:00
Evan Czaplicki
692d8d8eac
Throw errors for unbound type variables in ADTs and aliases, resolves #302
2013-10-19 10:39:23 -04:00
Evan Czaplicki
37f1be6d79
Add fixities to module interfaces
2013-09-15 14:39:55 -07:00
Evan Czaplicki
c9824b4e19
Nicer show for Assoc
2013-09-04 17:18:02 -07:00
Evan Czaplicki
128e21db21
Prettier printing
2013-09-01 22:51:04 -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
3921ac232e
Switch to using Double to represent floats internal
2013-08-31 13:14:39 -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
fea6e5d408
Add fixities to module interfaces
2013-08-29 00:06:37 -07:00
Evan Czaplicki
11294300fc
Prettier printing for list types
2013-08-21 19:44:57 -07:00
Evan Czaplicki
7093436b13
Switch to SrcTypes after type inference, not in compiler
2013-08-21 14:23:11 -07:00
Evan Czaplicki
a7b0d3fa15
Make nested record types prettier.
2013-08-20 01:13:37 -07:00
Evan Czaplicki
0e62924aaf
reprime when printing expressions and patterns
2013-08-14 00:44:29 -07:00
Evan Czaplicki
7af7c1f98d
Change "line" to "on line" in the string representation of one line SrcSpan
s
2013-08-06 15:43:31 -07:00
Evan Czaplicki
e1bccca1de
Nicer error messages for unfound variables
2013-08-03 12:55:07 -07:00
Evan Czaplicki
177a03750b
Add source code to locations for better error messages
2013-08-03 11:40:53 -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
2d4afca06f
Fix JS generation
...
correct generation of binops
use correct calling conventions for defining functions
only import modules by name since everything is canonical (no more
eval!)
simplify exports
have _op be a per module object (resolves "overwriting" problem)
2013-07-29 23:22:33 +02:00