Commit graph

686 commits

Author SHA1 Message Date
Evan Czaplicki
3c1b9f7171 Adopt "model" code from elm-get so that dependencies can be crawled from the compiler. 2013-12-15 23:55:36 -08:00
Evan Czaplicki
61ff49067f Guard against issue #387 2013-12-15 19:14:00 -08:00
Evan Czaplicki
fe7e3195fa Automatically look in elm_dependencies/ and use the latest version available 2013-12-15 01:37:51 -08:00
Evan Czaplicki
d6e769514e Get rid of dummy Paths_Elm.hs file! 2013-12-15 01:35:31 -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
Evan Czaplicki
6ff938c7cf Improve message for errors when unifying rigid type variables 2013-12-12 17:11:49 -08:00
Evan Czaplicki
6768b0ef7a Get rid of dependency on Text.Read.readMaybe to resolve #382 2013-12-11 18:57:56 -08:00
Evan Czaplicki
4452e4e138 Turn off markdown interpolation for now.
This will of course get turned back on! I don’t want to do it in the
very next release though.
2013-12-10 23:04:27 -08:00
Evan Czaplicki
d12a744824 Update documentation to be more up to date 2013-12-10 23:04:26 -08:00
Evan Czaplicki
1aa3b76e8e Switch back to stateless API, currently do not want to change this in the next release 2013-12-10 23:04:26 -08:00
Evan Czaplicki
32d162732b Merge pull request #381 from bcdarwin/master
Add check for duplicate constructors within the same unit
2013-12-10 17:48:06 -08:00
Ben Darwin
d1b3db22f2 clean up error reporting 2013-12-10 20:41:06 -05:00
Ben Darwin
55e5c342ce also fix duplicate *type* constructors 2013-12-10 16:36:04 -05:00
Ben Darwin
36b73fe7f5 fix duplicate *data* constructors 2013-12-10 15:58:57 -05:00
Evan Czaplicki
47c6cbc38f Merge branch 'master' into dev 2013-11-26 00:12:42 -06:00
Evan Czaplicki
bd77cc6e15 Report docs errors to stderr 2013-11-25 23:12:10 -06: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
54a99b7309 Add error and explanation for infinite type aliases 2013-11-19 22:29:25 -08:00
Evan Czaplicki
bbede87f1a Merge pull request #338 from jsl/fix_unsafe_io
Remove instance of unsafePerformIO
2013-11-14 07:26:57 -08:00
Justin Leitgeb
8fc72d2b30 Remove instance of unsafePerformIO 2013-11-12 22:22:49 -05:00
Evan Czaplicki
0fcd342b78 Minor reformat of an error message to keep each line under 80 characters 2013-11-11 16:30:48 +01:00
Evan Czaplicki
9d9e9d2388 Just show the value of located things, not the location. 2013-11-11 15:40:51 +01:00
Evan Czaplicki
07187bd811 Better error when bad backslashing is used in strings 2013-11-11 15:40:51 +01:00
Evan Czaplicki
9b55e953de Merge pull request #323 from Sheeo/transform-incomplete-matches
Incomplete matches in transform directory
2013-11-11 06:40:11 -08:00
Evan Czaplicki
d6a3a18704 Merge pull request #322 from Sheeo/type-incomplete-matches
Incomplete matches in Type.hs
2013-11-11 06:35:10 -08:00
Evan Czaplicki
5bde7cf4b5 Merge pull request #321 from Sheeo/sourcesyntax-matches
Incomplete matches in sourcesyntax
2013-11-11 06:29:55 -08:00
Michael Sondergaard
8594ab3780 Improve error message 2013-11-11 15:29:41 +01:00
Michael Sondergaard
fdea1470f6 Also catch Just [] as an error
Motivation here is that if we can't even extract a name and description, it's
an error.
2013-11-11 15:15:42 +01:00
Justin Leitgeb
9ae1825939 Fix deserialization of interfaces in Prelude
We previously had to fix a corrupt Map by changing it to a List and then back
into a Map. It turns out we had to do this because the original data structure
on disk wasn't a Map to begin with, but a List. It was previously assumed to be
a Map by the compiler because the first function that it was passed to took a
type of `Interfaces` which is a Map of interface definitions. Unfortunately this
didn't cause a runtime error when Haskell found out that the structure wasn't
deserialized into a Map. Instead Haskell happily created a broken Map that
couldn't find members some of the members that it contained (it could find
somewhere around the first half of its members, but the second half it reported
as missing when they were clearly present).

Changing the type of the first function that the deserialized structure is
passed to from a Map (actually Interfaces which is a type of Map) to a List
allows Haskell to infer the correct type to deserialize into and makes
everything work as expected.
2013-11-07 10:21:37 -05:00
Michael Sondergaard
12a58167a9 Add a catchall to inner toDefs function
I think it would be more appropriate to reorder this code as to only case-match
over defs once, but I'm not sure of how to approach this (yet).
2013-11-04 21:25:36 +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
Evan Czaplicki
00dfb69367 Modify error messages for bad build artifacts to wrap more nicely on the terminal 2013-11-04 16:37:15 +01: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
Evan Czaplicki
b1bca38488 Get rid of either-unwrap dependency and use fewer non-total library functions 2013-11-04 13:26:05 +01:00
Evan Czaplicki
5c5c05fed9 Merge pull request #320 from jsl/313_verify_serialized_interfaces
Give more helpful error messages when deserializing elmi files
2013-11-04 02:30:26 -08: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
90e007730d introduce the padded function to use fewer whitespace markers 2013-11-02 19:21:26 +01:00
Evan Czaplicki
934e590a7b Be sure to avoid variable shadowing when generating temporary variables, fix for # 318 2013-11-02 19:05:07 +01:00
Evan Czaplicki
d1cee239d3 Add a couple type annotations 2013-11-01 13:58:18 +01: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
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
f1b1bcd5fd Fix pattern matching on characters 2013-10-22 07:02:51 +02:00
Evan Czaplicki
c685c8b91b cosmetic changes on fix for #305
I felt weird about the previous style where things were more
intermingled. Does everything still look okay?
2013-10-19 22:14:34 -04:00
John P Mayer Jr
e75f5388fb can have zero fields if no extension could be parsed 2013-10-20 01:28:52 +00:00
Evan Czaplicki
debfd18444 Fix formatting of error when there are two unbound type variables 2013-10-19 10:52:48 -04: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
5ad0ec5b7a Parse documentation and infix declarations more safely 2013-10-17 13:40:28 -04: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
03cf56d8ec cosmetic: make it simpler to get locations for parses 2013-10-14 22:38:38 -04:00
Evan Czaplicki
4e82d19fd7 Export types from ADTs in the default exports 2013-10-14 20:39:21 -04:00
Evan Czaplicki
c480449371 cosmetic: make shadow check a bet more compact 2013-10-14 20:26:47 -04:00
Evan Czaplicki
e8a661531a cosmetic: nicer way to conditionally run type printer 2013-10-14 20:14:56 -04:00
Evan Czaplicki
11a60de544 Disallow extended record types with no fields, resolves #280 2013-10-14 17:42:26 -04:00
Evan Czaplicki
115b139774 fix #279 2013-10-14 16:59:37 -04:00
Evan Czaplicki
0f9f8c01e9 Improve error messages when the module documentation structure is missing 2013-10-14 14:59:54 -04:00
Evan Czaplicki
37878528bf Check for variable shadowing
When this code was originally written, all variables were given unique
names, making it unnecessary to check for shadowing.
2013-10-13 17:36:21 -04:00
Evan Czaplicki
2c080b6b0d Mark Char and Text values to distinguish them from Strings
Also get rid of the unwords and unlines functions which are confusing
and can more easily be reproduced with (join " ") and (join "\n")
2013-10-10 13:57:33 -07:00
Alexander Foremny
484e14a296 Relax mtime test in alreadyCompiled 2013-10-09 13:10:35 +02:00
Evan Czaplicki
e85c8f18dc Fix issue #286
That was a silly one :) Thanks for the report @mgold.
2013-10-08 20:06:26 -07:00
Evan Czaplicki
ea38376358 Cosmetic: import the prefixed version of Generate.Cases 2013-10-08 20:06:26 -07: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
88680c8bc9 Generate native JS strings for Elm Strings 2013-10-02 16:56:14 -07:00
Evan Czaplicki
958fb1c896 Treat strings like any other pattern literal 2013-10-02 16:55:46 -07:00
Evan Czaplicki
dce5e3eade Add String as an appendable type 2013-10-02 16:04:30 -07:00
Evan Czaplicki
76b2e56981 Add Strings as a primitive in the compiler 2013-10-02 15:56:43 -07:00
Evan Czaplicki
b40f2958d4 New convention for storing module values, fixes bug
Before it was not possible to add values to anything except leafs of
the namespace structure.
2013-09-30 01:32:27 -07:00
Evan Czaplicki
dcbe2fc245 Change the format of module instantiation
Currently, it's only possible to create modules at the leafs of the
namespace structure. This CL lifts that restriction.

Get rid of "use strict" in many cases.
2013-09-30 00:44:31 -07:00
Evan Czaplicki
d6c8ecd454 reorder things and make the help flag nicer 2013-09-29 17:37:45 -07:00
Evan Czaplicki
f72e97ab7d Remove generateHtml, which is dead code 2013-09-28 15:39:52 -04: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
017f96b522 Fix issue with imported reserved names from #214 2013-09-22 17:40:10 -04:00
Max New
3783f2646c Fix function application code gen bug for >=10 arguments. 2013-09-16 23:47:15 -07:00
Evan Czaplicki
d94e218fd1 Fix JS generation for infix ops with dots 2013-09-15 18:53:13 -07:00
Evan Czaplicki
c2eecc2084 Properly parse all user-defined infix declarations 2013-09-15 14:39:56 -07:00
Evan Czaplicki
11f5f5263c Actually use infixes in parser 2013-09-15 14:39:55 -07:00
Evan Czaplicki
37f1be6d79 Add fixities to module interfaces 2013-09-15 14:39:55 -07:00
Evan Czaplicki
fb64557f75 Switch format of OpTables, and add iParse that takes a table 2013-09-15 14:39:55 -07:00
Evan Czaplicki
ec8e787f0d Correct optimization of if expressions 2013-09-13 01:05:35 -07:00
Evan Czaplicki
928548e678 Start exporting docs.json again 2013-09-10 19:22:33 -07:00
Evan Czaplicki
281e8a208d Trim trailing whitespace 2013-09-09 15:58:43 -07:00
Evan Czaplicki
d87cfc65dd Merge branch 'release-candidate' into dev 2013-09-08 12:29:34 -07:00
Evan Czaplicki
5f7fcaa92d Fix issue #241 2013-09-08 12:26:07 -07:00
Evan Czaplicki
a7bb2b7ac3 Fix issue in which type expressions eat trailing whitespace. 2013-09-06 12:22:01 -07:00
Evan Czaplicki
eb2a032e54 Remove unused import 2013-09-05 16:55:24 -07:00
Evan Czaplicki
abe4a81f08 Nicer order for JSON fields 2013-09-05 15:44:40 -07:00
Evan Czaplicki
5b2c4f6fb8 Begin generating JSON representations of types. 2013-09-05 15:33:03 -07:00
Evan Czaplicki
0976355fac Properly generate directory structure 2013-09-05 10:55:30 -07:00
Evan Czaplicki
ae5ef9db97 Add pretty printing and require a module declaration and structure comment 2013-09-05 10:48:37 -07:00
Evan Czaplicki
caf2d0ab6d Fix parsing bug and ensure the creation of the docs/ directory 2013-09-05 10:09:45 -07:00
Evan Czaplicki
f5e15ca7e3 Use the new documentation format and helper functions 2013-09-04 17:40:05 -07:00
Evan Czaplicki
c9824b4e19 Nicer show for Assoc 2013-09-04 17:18:02 -07:00
Evan Czaplicki
8a913451c7 Add more helper functions
Ensure that comment parsers return the full body.
Add functions for skipping over characters.
Add function to extract the corresponding source text of a parse.
2013-09-04 17:17:48 -07:00
Evan Czaplicki
fecc96dde7 Rename some functions and export typeAnnotation 2013-09-04 17:16:35 -07:00
Evan Czaplicki
24642c85e6 Change default associativity to left 2013-09-04 17:16:07 -07:00
Evan Czaplicki
bdd8213e6d Fix generation of infix ops 2013-09-03 01:30:21 -07:00
Evan Czaplicki
e2d2c45228 Revert "Add names to functions in generated JS."
This reverts commit a4fdf0664c.
2013-09-02 15:18:44 -07:00
Evan Czaplicki
16a215a249 Show sign on interpolation if there is a failure 2013-09-02 15:18:20 -07:00
Evan Czaplicki
6fb2fa9ee0 Chose the best alias when many apply (fixes issue #227) 2013-09-02 14:59:22 -07:00
Evan Czaplicki
128e21db21 Prettier printing 2013-09-01 22:51:04 -07:00
Evan Czaplicki
a4fdf0664c Add names to functions in generated JS. 2013-09-01 22:20:08 -07:00
Evan Czaplicki
7e1d95a108 Move the markdown function to the text library 2013-09-01 22:20:07 -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
6b855f932e Fix problem with overlapping variable names in generated code 2013-09-01 01:25:10 -07:00
Evan Czaplicki
1f48a279eb Properly generate infix ops not in Basics 2013-08-31 21:12:11 -07:00
Evan Czaplicki
3a072982ac Get generation working
move `makeSafe` over and make floats work
2013-08-31 13:22:00 -07:00
Evan Czaplicki
3921ac232e Switch to using Double to represent floats internal 2013-08-31 13:14:39 -07:00
Evan Czaplicki
966e725f5e Finish converting the JS generator, still needs testing 2013-08-31 12:14:23 -07:00
Evan Czaplicki
10734a1b0b get jsImport working 2013-08-31 04:41:36 -07:00
Evan Czaplicki
5b263aa124 Add markdown and make . notation nicer 2013-08-31 04:19:18 -07:00
Evan Czaplicki
394d398512 Get case expressions working 2013-08-31 04:01:00 -07:00
Evan Czaplicki
eafdaa20f4 add type annotation 2013-08-31 04:00:40 -07:00
Evan Czaplicki
545e51c611 Remove the Unique library, which is no longer in use 2013-08-31 03:08:00 -07:00
Evan Czaplicki
42fb11eabd Stop using the Unique library 2013-08-31 03:07:19 -07:00
Evan Czaplicki
4e8898bef1 Remove unused references to Unique 2013-08-31 02:59:43 -07:00
Evan Czaplicki
bd445c4e22 Get closer to full conversion to language-ecmascript 2013-08-31 01:56:17 -07:00
Evan Czaplicki
8c50652e09 Begin conversion to language-ecmascript 2013-08-30 23:18:54 -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
1a093ac53a Properly turn off custom OpTables
oops!
2013-08-29 02:57:01 -07:00
Evan Czaplicki
65dcc0b57e Turn off custom OpTables for now 2013-08-29 02:55:49 -07:00
Evan Czaplicki
d7c89ee07c support cross-module OpTables 2013-08-29 02:53:20 -07:00
Evan Czaplicki
f1a88975d2 Add iParse that takes a table 2013-08-29 00:55:32 -07:00
Evan Czaplicki
6d27c5eee7 Move OpTable into IParser user state 2013-08-29 00:54:54 -07:00
Evan Czaplicki
fea6e5d408 Add fixities to module interfaces 2013-08-29 00:06:37 -07:00
Evan Czaplicki
95ec3a822e Stop using error when constraining patterns and when instantiating source types 2013-08-25 20:23:49 -07:00
Evan Czaplicki
7785eb8e48 Remove dead code 2013-08-25 19:24:45 -07:00
Evan Czaplicki
d3dc74325d Remove dead code 2013-08-25 19:23:45 -07:00
Evan Czaplicki
082e6a20c0 Throw proper parse errors, stop using error 2013-08-25 19:22:41 -07:00
Evan Czaplicki
ca75e60628 Make sure that modules are only instantiated once. 2013-08-25 15:23:30 -07:00
Evan Czaplicki
9346d2e516 Remove two unused modules 2013-08-25 01:39:12 -07:00
Evan Czaplicki
40ea6df24b Make sure that generated JS does not use JS's reserved words as variables 2013-08-24 15:00:23 -07:00
Evan Czaplicki
60e90c0f95 Add a note about what canonicalRealias does 2013-08-24 14:50:40 -07:00
Evan Czaplicki
4f6973024b Export record constructors by default 2013-08-22 12:16:39 -07:00
Evan Czaplicki
18c67cb345 Properly perform extraChecks 2013-08-21 19:45:23 -07:00
Evan Czaplicki
11294300fc Prettier printing for list types 2013-08-21 19:44:57 -07:00
Evan Czaplicki
7c58089090 Remove unused import 2013-08-21 19:09:07 -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
e6be50ecc0 Add the Type.Alias file to do realiasing when printing types 2013-08-21 19:07: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
5251be331a Reformat addError code 2013-08-21 11:57:07 -07:00
Evan Czaplicki
a7b0d3fa15 Make nested record types prettier. 2013-08-20 01:13:37 -07:00
Evan Czaplicki
b5979b4aaf Add occurs check and a test to make sure it works 2013-08-19 22:39:41 -07:00
Evan Czaplicki
70f1242bd0 Check that main is a Signal or (Signal Element), add tests for this case 2013-08-19 17:47:37 -07:00
Evan Czaplicki
4da7588d10 Add the ExtraChecks module to do occurs check and check the type of main 2013-08-19 16:54:46 -07:00
Evan Czaplicki
c2329d0aff Fix generation of JS code for pattern matching on literals 2013-08-16 12:41:30 -07:00
Evan Czaplicki
5fd85cd9c5 Permit single line comments intermingled with types 2013-08-15 23:29:29 -07:00
Evan Czaplicki
7c19935d86 reprime when printing types 2013-08-14 00:44:40 -07:00
Evan Czaplicki
0e62924aaf reprime when printing expressions and patterns 2013-08-14 00:44:29 -07:00
Evan Czaplicki
9ec51f558d deprime on parsing, not on JS generation 2013-08-14 00:42:26 -07:00
Evan Czaplicki
d9918e0ac2 Convince parser to commit to lists, records, and tuples 2013-08-13 23:41:44 -07:00
Evan Czaplicki
61b5d8fbfa Nicer messages on specific parse failures 2013-08-13 23:11:23 -07:00
Evan Czaplicki
ab83c78d8d Remove dead code 2013-08-13 23:09:46 -07:00
Evan Czaplicki
cd84e06695 Make pattern exhaustive, giving parse error when someone uses binops with different associativity 2013-08-13 22:20:00 -07:00
Evan Czaplicki
47d68d8bf2 Succeed on programs that have no expressions 2013-08-13 22:12:45 -07:00
Evan Czaplicki
bc0c6a4410 Fix #209, bad JS generation for primes in patterns 2013-08-13 18:10:17 -07:00
Evan Czaplicki
b7eb1335b0 Fix subtle bug with rigidVars vs rigidQuantifiers, was quantifing over the wrong variables in a forall 2013-08-12 14:32:51 -07:00
Evan Czaplicki
e4fc35c901 Make impossible error more specific 2013-08-12 14:30:32 -07:00
Evan Czaplicki
a3f62bdd14 style tweaks 2013-08-12 14:29:38 -07:00
Evan Czaplicki
1609e61cba Fix accidental creation of rigid variables when type-checking mixed record types when a type alias is given
Fixes the issue raised by Alexander
2013-08-12 14:27:42 -07:00
Evan Czaplicki
a736a28a43 Properly quantify variables in Data expressions. 2013-08-12 01:09:26 -07:00
Evan Czaplicki
585107eaed Fix variable shadowing when pattern matching on a pattern with only one variable, when it appears in a let-expression 2013-08-11 12:45:59 -07:00
Evan Czaplicki
9e58bdbc54 Canonicalize patterns in lambda expressions 2013-08-10 15:48:18 -07:00
Evan Czaplicki
47aa48d9fd Preemptively add "number" as a kind of flexible variable that can unify with an (Is Number)
This is similar to the recent issue with comparable brought up by Max.
2013-08-10 14:26:01 -07:00
Evan Czaplicki
3b27395e62 Fix issue unifying comparables brought up by Max on the lists
A flexible comparable should be able to unify with another comparable
2013-08-10 14:20:36 -07:00
Evan Czaplicki
9bba47c791 compute a flexibility mark, just so it's easier to turn on and off later 2013-08-10 14:18:59 -07:00
Evan Czaplicki
c54dbf38af Get rid of dead code and bad exports 2013-08-09 23:21:58 -07:00
Evan Czaplicki
5b6773c3ec Fix extra space in error message 2013-08-08 18:05:21 -07:00
Evan Czaplicki
623741877b Fix problems generating functions with 10 or more arguments
Mainly useful for record constructors which are automatically generated.
2013-08-08 16:04:40 -07:00
Evan Czaplicki
143547e766 Fix problem with variable shadowing when instantiating aliased types 2013-08-08 15:45:22 -07:00
Evan Czaplicki
0b9317124d Give more specific errors when a variable cannot be found during canonicalization 2013-08-07 09:38:30 -07:00
Evan Czaplicki
d85c01ebbc Merge pull request #204 from lambdatoast/patch-1
Remove extra "is" from defaultMessage.
2013-08-07 09:14:56 -07:00
Evan Czaplicki
9821e12a4c Strip \r from multiline strings 2013-08-07 09:12:53 -07:00
Alexander
a043b95f0c Remove extra "is" from defaultMessage. 2013-08-07 06:12:11 -03:00
Evan Czaplicki
cc81b1e22b Make sure that all directories in build/ are properly constructed 2013-08-06 22:51:21 -07:00
Evan Czaplicki
f7db7a3b47 Add a default error message for beginners 2013-08-06 22:12:26 -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
53ef6d33c9 Give a better error message when trying to unify rigid type variables in a bad way 2013-08-06 21:20:32 -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
2e38f7b061 Give line numbers when there is a kind error in a pattern 2013-08-06 15:44:19 -07:00
Evan Czaplicki
a3f62c34c3 Make errors a little bit better when a type alias gets the wrong number of arguments. 2013-08-06 15:43:59 -07:00
Evan Czaplicki
7af7c1f98d Change "line" to "on line" in the string representation of one line SrcSpans 2013-08-06 15:43:31 -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
97a4628976 Get rid of dead code: showErr is not used any more 2013-08-06 13:40:54 -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