Evan Czaplicki
b9e627f78e
Merge in @maxsnew's fixes from #424
...
Tested on small file where I changed a dependency and on elm-lang.org
code.
2014-01-15 13:54:40 +01:00
Evan Czaplicki
c966776788
Add -W flag to many files, mostly getting rid of dead imports
2014-01-04 10:54:46 +01:00
Evan Czaplicki
9ff26223d8
Handle --no-prelude flag in the Metadata.Prelude module rather than distributed across many modules
...
Good in case the meaning of —no-prelude changes
2014-01-04 09:35:26 +01:00
Max New
6511fc0e97
Refactor Build.File using monad transformers
2013-12-30 16:09:41 -06:00
Evan Czaplicki
16aef1ea0c
Switch away from using Text.Blaze.Html.Renderer.Utf8 because it scrambles some things.
2013-12-17 17:43: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
6cb3b30062
Start breaking the build process up into smaller modules
2013-12-14 21:46:15 -08:00
Justin Leitgeb
8fc72d2b30
Remove instance of unsafePerformIO
2013-11-12 22:22:49 -05:00
Evan Czaplicki
5a1c9ed353
Unnecessary style changes
...
I don't really know why I felt the need to do this, but I am happier
now.
2013-11-04 13:28:03 +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
006e086cd5
Remove print_program option
...
This option was applied inconsistently based on whether previous build
artifacts existed, and isn't incredibly useful anyway for users of the
language.
2013-10-30 08:52:24 -05:00
Justin Leitgeb
17f407adda
Trim trailing whitespace
2013-10-29 11:22:33 -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
e8a661531a
cosmetic: nicer way to conditionally run type printer
2013-10-14 20:14:56 -04:00
Alexander Foremny
484e14a296
Relax mtime test in alreadyCompiled
2013-10-09 13:10:35 +02: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
d6c8ecd454
reorder things and make the help flag nicer
2013-09-29 17:37:45 -07:00
Evan Czaplicki
66c288e4ba
Remove minification from compiler.
...
Unix philosophy and all that.
2013-09-28 15:36:02 -04:00
Evan Czaplicki
de232b677e
Use ByteStrings to make writing html and js a bit faster
2013-09-25 14:25:54 -04:00
Evan Czaplicki
d4def20462
Make sure that createDirectoryIfMissing
is called for included js files
...
All responsibility falls on @seliopou :P
2013-09-23 16:24:45 -04: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
4d25352f90
Show realiased types when printing errors and when printing module types
2013-08-21 19:08:03 -07:00
Evan Czaplicki
7093436b13
Switch to SrcTypes after type inference, not in compiler
2013-08-21 14:23:11 -07:00
Evan Czaplicki
cc81b1e22b
Make sure that all directories in build/ are properly constructed
2013-08-06 22:51:21 -07:00
Evan Czaplicki
50dada1f22
Fix very silly error, default module name is "Main" not "Name"
2013-08-06 21:40:54 -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
43b604e0ca
Introduce cache/ and build/ directories
...
Switch from using --output-directory for all generated files, to using
--cache-dir for .elmo and .elmi files and using --build-dir for .html
and .js files.
2013-08-06 18:34:23 -07:00
Evan Czaplicki
97ab6199bd
Make sure that the user defined module name is used in generated HTML
2013-08-06 13:41:17 -07:00
Evan Czaplicki
a446d609f2
Ensure that binary serialization works on Windows. Previously had issues with line ending conversions messing with binary data.
2013-08-06 00:36:07 -07:00
Evan Czaplicki
1df206dcc9
Clean up mistakes from the merge
2013-08-04 15:44:47 -07:00
Evan Czaplicki
51dfa676d9
Merge branch 'types'
...
Conflicts:
compiler/Compiler.hs
compiler/Model/Ast.hs
libraries/Automaton.elm
libraries/Dict.elm
2013-08-04 15:40:24 -07:00
Evan Czaplicki
1f390072c6
Add more space between type errors
2013-08-03 11:39:56 -07:00
Evan Czaplicki
37417e154c
print file path when compiling and enable multithreaded execution
2013-08-02 22:20:55 -07:00
Evan Czaplicki
520c81f9d4
Better names for files when no name is given
2013-08-02 15:01:03 -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
e677f27bc5
add a type signature
2013-07-31 07:42:31 -07:00
Evan Czaplicki
f8fe8e4495
Properly convert Type.Type to SourceSyntax.Type
2013-07-29 20:23:42 +02:00
Evan Czaplicki
f8182740bc
Prettify code to print program
2013-07-29 13:21:34 +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
272557d785
Fix for "trying to write to a file in a non-existant directory"
2013-07-27 00:39:40 +02:00
Evan Czaplicki
637c7e0da0
Put type aliases in ModuleInterface
2013-07-26 15:06:35 +02:00
Evan Czaplicki
016a199b50
Start using Metadata.Prelude
2013-07-25 20:53:22 +02:00
Evan Czaplicki
8ffcf9e80e
Prettier printing for infix operator definitions
2013-07-23 15:43:21 +02:00
Evan Czaplicki
eb722a20dc
Make a type less general
2013-07-22 14:41:55 +02:00
Evan Czaplicki
4bcde7e799
Add flag for printing a whole program
2013-07-21 22:49:42 +02:00
Evan Czaplicki
1f8b7bbc98
Introduce TypeLibrary alias, a minor cosmetic change
2013-07-21 09:23:01 +02:00