Commit graph

23 commits

Author SHA1 Message Date
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
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
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
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
37f1be6d79 Add fixities to module interfaces 2013-09-15 14:39:55 -07:00
Evan Czaplicki
6ba2d70365 Revert 95ec3a8..1a093ac
This rolls back to commit 95ec3a822e.
2013-08-29 16:43:54 -07:00
Evan Czaplicki
fea6e5d408 Add fixities to module interfaces 2013-08-29 00:06:37 -07:00
Evan Czaplicki
7093436b13 Switch to SrcTypes after type inference, not in compiler 2013-08-21 14:23:11 -07:00
Evan Czaplicki
eb96d7ad8d Get rid of current canonicalization code 2013-07-29 11:53:45 +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
637c7e0da0 Put type aliases in ModuleInterface 2013-07-26 15:06:35 +02:00
Evan Czaplicki
6948858f78 Allow multiple different imports of the same module, clean up canonicalize code 2013-07-26 12:56:36 +02:00
Evan Czaplicki
32a331b3b0 Load ADTs into the environment to fix constraint generation for patterns 2013-07-26 12:19:24 +02:00
Evan Czaplicki
138e99cc81 Begin to canonicalize imported values and types 2013-07-22 14:42:45 +02:00
Evan Czaplicki
c140d690fc First draft of cross-module type checking
Currently, all top-level types are imported. No alias resolution
happens so you need to use "import open M" atm.
2013-07-21 22:50:48 +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
b0f96a2eab Switch from [Def t v] to (LExpr t v) for program representation 2013-07-19 18:02:24 +02:00
Evan Czaplicki
e852ae25e3 Add field to MetadataModule for datatypes 2013-07-17 19:24:40 +02:00
Evan Czaplicki
8145e600fc Create MetadataModule for more refined information about modules
Used in most places to break a module into more orthogonal components.
Some of this data needs to be serialized into the interface files.
2013-07-16 21:42:37 +02:00
Evan Czaplicki
2ef18826de Start adding constraint generation for declarations. 2013-07-08 18:23:18 +02: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
bbb2b2a14f Begin migrating the AST to its own branch for the source syntax of the language. 2013-06-13 18:00:24 -07:00