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 SrcSpan
s
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
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
62bb8ab3ad
Add missing paren
2013-08-04 12:52:33 -07:00
Evan Czaplicki
0cd594c13c
Better JS for function composition, runtime errors report which module they came from
2013-08-04 12:51:52 -07:00