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
1974ad57be
Revert "Export types from ADTs in the default exports"
...
This reverts commit 4e82d19fd7
.
2013-10-15 11:32:42 -04:00
Evan Czaplicki
4e82d19fd7
Export types from ADTs in the default exports
2013-10-14 20:39:21 -04:00
Evan Czaplicki
de52caca8e
Add --src-dir flag
...
Can be used multiple times. Makes it possible to have complex directory
structure without cluttering up module names in Elm files.
2013-10-05 16:12:25 -07:00
Evan Czaplicki
11f5f5263c
Actually use infixes in parser
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
d7c89ee07c
support cross-module OpTables
2013-08-29 02:53:20 -07:00
Evan Czaplicki
4f6973024b
Export record constructors by default
2013-08-22 12:16:39 -07:00
Evan Czaplicki
7c58089090
Remove unused import
2013-08-21 19:09:07 -07:00
Evan Czaplicki
96136beaf5
Get the correct exports
2013-08-01 22:48:05 -07:00
Evan Czaplicki
dd8843f8e4
Take correct file path, even if module name is not given
2013-08-01 17:22:44 -07:00
Evan Czaplicki
a98a7be9f8
Export ADT constructors too
2013-07-29 23:43:57 +02:00
Evan Czaplicki
2f6d3227e9
If no exports are listed, everything gets exported
2013-07-29 23:19:32 +02:00
Evan Czaplicki
2f5639c4fb
Introduce Transform.Canonicalize
...
Run this to create a properly formatted ModuleInterface
2013-07-29 11:59:55 +02:00
Evan Czaplicki
0a6bd8bd96
Generate and use interfaces.data so standard library types are available
2013-07-28 02:24:17 +02:00
Evan Czaplicki
39f2a8717d
Rewrite readDeps
so that modules are never read more than once
2013-07-26 16:38:40 +02:00
Evan Czaplicki
016a199b50
Start using Metadata.Prelude
2013-07-25 20:53:22 +02:00
Evan Czaplicki
6c808aaa47
change whitespace
2013-07-25 20:19:50 +02:00
Evan Czaplicki
eb722a20dc
Make a type less general
2013-07-22 14:41:55 +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
1f8b7bbc98
Introduce TypeLibrary alias, a minor cosmetic change
2013-07-21 09:23:01 +02:00
Evan Czaplicki
b1dd1574a8
Begin passing module interfaces when compiling dependencies
2013-07-21 07:14:13 +02:00
Evan Czaplicki
fa11f8e390
get rid of unused imports
2013-07-21 00:15:35 +02:00
Evan Czaplicki
c9a1cc96f6
Minor reformatting and removing unused dependencies
2013-07-20 18:52:43 +02:00
Evan Czaplicki
9592d286bb
Start using Data.Graph to work out dependency problems and other minor tweaks
...
Print out the saved type environment, and get things working with the
program field in MetadataModule.
2013-07-19 18:05:31 +02:00
Evan Czaplicki
e852ae25e3
Add field to MetadataModule for datatypes
2013-07-17 19:24:40 +02:00
Evan Czaplicki
82983a6f24
Update more modules to use the MetadataModule data structure
2013-07-16 21:43:56 +02:00
Evan Czaplicki
ce357b3d0d
Switch to reporting errors with [Doc] for prettier layout.
2013-07-16 14:52:50 +02:00
Evan Czaplicki
a5bc960067
Minor cosmetic changes
2013-07-16 00:40:11 +02:00
Evan Czaplicki
93a948cd67
Add back in checks for duplicate and out-of-order definitions.
2013-07-15 01:06:00 +02:00
Evan Czaplicki
cb914d91ff
Get all of the Haskell files compiling with the new type checker.
...
Does not actually work, undefined is used in some places as a
stopgap measure.
2013-07-11 12:48:37 +02:00
evancz
35981eb42f
Finish parameterizing the AST and properly check errors in let expressions.
2013-06-14 19:23:58 -07:00
evancz
721ce4f192
Continue reorganizing the code-base.
...
Remove uses of uniplate, introduces a regression in testing the ordering of Defs in let-expressions.
2013-06-13 22:45:08 -07:00
evancz
f5bdb2ca7e
Minor code changes to help allow custom infix precedence and associativity.
2013-06-05 14:22:11 -07:00
evancz
2d1e06b17b
Start generating elmi and elmo files to permit sharing of types, values, and infix info between modules.
2013-06-05 00:44:04 -07:00
evancz
ce6467266f
Clean up imports in many files.
2013-05-28 06:47:36 -07:00
evancz
5d536d129a
Get prelude added in all cases.
2013-04-08 01:48:30 -07:00
evancz
87fa86c7e8
Get type dealiasing working.
2013-04-05 09:55:30 -07:00
evancz
ab62612332
Ensure that --make skips trying to read libraries as files.
2013-04-03 10:27:23 -07:00
evancz
7dbb052b22
Load json representation of types with Template Haskell, so library files are the base truth of type information.
...
Make minor fixes in libraries, such as adding the Char labrary and fixing the types in the Dict library.
2013-03-16 22:24:18 -07:00
evancz
1822ebc160
Move the compiler down a directory, mostly.
2013-03-16 12:04:05 -07:00