Evan Czaplicki
efdc7a7744
Start using strict mode for everything
...
V8 engineer said it is always faster, so that’s probably reliable info
:)
2014-02-13 09:31:19 +01:00
Evan Czaplicki
9dd5dff279
Make AST more general and try to give its phases better names
...
Also change the constructors for the Pattern ADT
2014-02-10 00:17:33 +01:00
Evan Czaplicki
594ed1988a
Get rid of unused module
2014-02-10 00:08:05 +01:00
Evan Czaplicki
458bf2b122
Minor style improvements, switch to using helper function
2014-02-09 14:23:10 +01:00
Evan Czaplicki
c4628749e1
Fix issue #491
...
contents of Maybe were not converted to JS on export
2014-02-08 17:05:52 +01:00
Max New
53c2ab1531
Move splitDots and prevent a non-exhaustive pattern match warning
2014-01-18 17:44:11 -06:00
Max New
4a25c165a4
Hack to make imported names safe.
...
This fixes a bug where imported identifiers with reserved names were
not being changed during codegen.
2014-01-18 17:36:09 -06:00
Evan Czaplicki
f619026fcc
Handle function exports
2014-01-14 13:58:33 +01:00
Evan Czaplicki
36a5c1ddeb
Handle signals properly, fix outgoing lists, improve errors for missing fields
2014-01-14 12:32:33 +01:00
Evan Czaplicki
53389ffbf8
Make instanceof check safer, check if it's an object before using instance of
2014-01-14 11:46:17 +01:00
Evan Czaplicki
32fbbca5b2
Generate conversion code for ports
2014-01-13 19:32:54 +01:00
Evan Czaplicki
9dda928ac4
make conversion functions for input ports optional
2014-01-13 11:01:10 +01:00
Evan Czaplicki
8bea3f073d
cosmetic: make a block of code more whitespace friendly
2014-01-06 08:07:24 +01:00
Evan Czaplicki
da033e3696
Filter out duplicate imports, generate code using new Native.Ports module
2014-01-06 07:49:49 +01:00
Evan Czaplicki
7cf5a564e5
Add Expressions for ports to check and validate types nicely
2014-01-04 11:39:38 +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
c04c4385ff
Update for new defs and ports format
2014-01-02 23:46:37 -08:00
Evan Czaplicki
1a06be5992
Get rid of "t v" type variables, which are no longer needed
2014-01-02 23:45:40 -08:00
Evan Czaplicki
3af5c2a652
Switch to new format for Expr, Def, and Module
2014-01-02 23:37:52 -08:00
Evan Czaplicki
578dfb8358
Merge branch 'js-integration' into dev
2014-01-02 12:29:08 -08:00
Evan Czaplicki
f26610b718
Properly handle pattern matching on non-tuple ADTs in let-expressions, esolving issue #417
2013-12-27 16:14:21 -08:00
Evan Czaplicki
71bb1c8bf9
Add basics of properly handling ports
2013-12-24 10:13:19 -08:00
Evan Czaplicki
740702c0d7
Begin switch from current FFI syntax to "port" syntax
2013-12-23 23:53:54 -08:00
Evan Czaplicki
51ee065e6b
Cosmetic: give function a more descriptive name
2013-12-23 17:02:47 -08:00
Max New
647cf279a1
Optimize True branch in multi-way if code generation.
2013-12-23 18:57:23 -06:00
Evan Czaplicki
e119d8ef62
Get rid of SourceSyntax.Everything module
2013-12-22 15:18:16 -08:00
Evan Czaplicki
f8bf89b48d
Make sure that all names in a program are safe for use in JS code
2013-12-22 15:00:29 -08:00
Evan Czaplicki
82d3d88d01
Get syntax highlighting on code blocks working again.
2013-12-17 16:19:42 -08:00
Evan Czaplicki
61ff49067f
Guard against issue #387
2013-12-15 19:14:00 -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
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
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
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
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
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
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