Evan Czaplicki
f1b1bcd5fd
Fix pattern matching on characters
2013-10-22 07:02:51 +02: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
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
88680c8bc9
Generate native JS strings for Elm Strings
2013-10-02 16:56:14 -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
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
ec8e787f0d
Correct optimization of if expressions
2013-09-13 01:05:35 -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
a4fdf0664c
Add names to functions in generated JS.
2013-09-01 22:20:08 -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
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
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
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
ca75e60628
Make sure that modules are only instantiated once.
2013-08-25 15:23:30 -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
9ec51f558d
deprime on parsing, not on JS generation
2013-08-14 00:42:26 -07:00
Evan Czaplicki
bc0c6a4410
Fix #209 , bad JS generation for primes in patterns
2013-08-13 18:10:17 -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
97a4628976
Get rid of dead code: showErr
is not used any more
2013-08-06 13:40:54 -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
Evan Czaplicki
e4e8d89393
Fix "hiding" of thing that does not exist
2013-08-02 16:51:29 -07:00
Evan Czaplicki
78c6db644e
Fix problem in generating pattern matching code for records
2013-08-02 14:49:31 -07:00
Evan Czaplicki
070d02c914
deprime all exports, fix accidental variable capture in (.)
2013-08-02 10:50:54 -07:00
Evan Czaplicki
c85fed1024
Put exports at the end of a file, making sure the value is always defined.
2013-08-01 21:46:58 -07:00
Evan Czaplicki
8f1f15cfeb
Fix pattern matching
2013-07-31 23:47:16 -07:00
Evan Czaplicki
a4c4cf0493
Use Location.none
less
2013-07-30 11:55:41 -07:00
Evan Czaplicki
b26edcc46e
Simplify representation of source locations
2013-07-30 11:43:42 -07:00
Evan Czaplicki
ae6a3b36b5
Fix runtime code for comparing things
2013-07-30 08:44:23 -07:00
Evan Czaplicki
1273f4deb3
Make sure that basic math operations generate the correct JS code.
2013-07-29 19:34:00 -07:00
Evan Czaplicki
25474f8310
Function args were in the reverse order!
2013-07-29 23:44:15 +02:00
Evan Czaplicki
2d4afca06f
Fix JS generation
...
correct generation of binops
use correct calling conventions for defining functions
only import modules by name since everything is canonical (no more
eval!)
simplify exports
have _op be a per module object (resolves "overwriting" problem)
2013-07-29 23:22:33 +02:00
Evan Czaplicki
2f49151c29
Cosmetic changes
2013-07-29 13:22:23 +02:00
Evan Czaplicki
02ab90e794
No need to derename, names will be preserved
2013-07-29 11:55:17 +02:00
Evan Czaplicki
c19ccfe56a
Stop importing the Native library by default
2013-07-26 00:19:43 +02:00
Evan Czaplicki
c1aef789ee
Flatten lets only during JavaScript generation
2013-07-19 17:43:37 +02:00
Evan Czaplicki
82983a6f24
Update more modules to use the MetadataModule data structure
2013-07-16 21:43:56 +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