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
270dbf8722
Add -Wall to a bunch of SourceSyntax files and get them warning free
2014-01-04 10:14:36 +01:00
Evan Czaplicki
863d31b38f
Switch name of qualified import
2014-01-04 09:45:20 +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
Evan Czaplicki
9ccc707594
properly rename expressions in port declarations, add -Wall
2014-01-04 08:20:52 +01:00
Evan Czaplicki
33a95f4aa6
get rid of unused dependency
2014-01-04 08:00:56 +01:00
Evan Czaplicki
6a8db4c230
Get rid of dead dependencies and add -Wall for some files
2014-01-03 12:33:56 +01:00
Evan Czaplicki
ade03397df
Fix another copy-paste error
2014-01-03 12:15:49 +01:00
Evan Czaplicki
bdeb36eb6f
Fix port parser! Copy paste error on the operator.
2014-01-03 12:12:43 +01:00
Evan Czaplicki
6f75310a49
Get rid of redundant code that collapses ParseDefs
2014-01-03 10:33:17 +01:00
Evan Czaplicki
06503fef33
Switch to using new Def representation, get rid of getPDefs
function which used to collect annotations and definitions.
2014-01-03 01:07:13 -08:00
Evan Czaplicki
5e3f94ce60
Update for new type of module (no t v)
2014-01-02 23:53:30 -08:00
Evan Czaplicki
41dd0c8742
Update for new def and port formats
2014-01-02 23:52:27 -08:00
Evan Czaplicki
acce931530
Update for new def and ports format
2014-01-02 23:50:49 -08:00
Evan Czaplicki
c883b55255
Get rid of badOrder
check, which is handled elsewhere. Update for new def and port formats
2014-01-02 23:50:20 -08:00
Evan Czaplicki
3d780425fb
Update for ports and defs, switch to using <$> and <*> a lot
2014-01-02 23:48:42 -08: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
7422c95f4c
Update to match new names in SourceSyntax.Declaration
2014-01-02 23:45:10 -08:00
Evan Czaplicki
ed4be06a6a
Update to match new port and decl format
2014-01-02 23:44:42 -08:00
Evan Czaplicki
98f7be328b
Make "combineAnnotations" a part of parsing a program
2014-01-02 23:42:54 -08:00
Evan Czaplicki
49fc0b6378
Create way to crawl over all lets in a program, transforming defs and ports
...
Used to combine type annotations with definitions and find ordering
problems with Definitions and Ports
2014-01-02 23:39:34 -08:00
Evan Czaplicki
3af5c2a652
Switch to new format for Expr, Def, and Module
2014-01-02 23:37:52 -08:00
Evan Czaplicki
e8389ac78a
Update to match new Module type
2014-01-02 23:23:26 -08:00
Evan Czaplicki
3c65b5c69d
Move boundVars
function into SourceSyntax.Pattern
2014-01-02 23:23:11 -08:00
Evan Czaplicki
e3b8ea7d09
Update basic parsers to use the new formats for Expr, Declaration, and Port
2014-01-02 23:20:25 -08:00
Evan Czaplicki
bd4d76ecae
Chenge representation of Expr, add ports representation
...
Get rid of the unused t and v type variables. Add the def type
variable, which models the fact that type annotations and definitions
start separate, but need to be combined before most stuff goes down.
Ports have the same structure as definitions in that annotations and
definitions are separate at the source level and need to be combined.
The same technique used in Expr is now used in Decl as well.
2014-01-02 23:18:42 -08:00
Evan Czaplicki
600e65ca43
Get rid of Transform.Optimize, which is currently unused
2014-01-02 23:13:37 -08:00
Evan Czaplicki
5c509f2f1e
Make Binary serialization code nicer
2014-01-02 17:42:27 -08:00
Evan Czaplicki
662fd7669a
Add JS as a possible Derivation, correct binary serialization, add error when serialization goes wrong.
2014-01-02 13:38:41 -08:00
Evan Czaplicki
578dfb8358
Merge branch 'js-integration' into dev
2014-01-02 12:29:08 -08:00
Max New
cf9d21b0c8
Recompile modules when their dependencies have changed.
2013-12-30 16:09:41 -06:00
Max New
6511fc0e97
Refactor Build.File using monad transformers
2013-12-30 16:09:41 -06:00
Evan Czaplicki
b0a856eb5f
Merge pull request #421 from maxsnew/test
...
Test Re-org and Start Property Testing
2013-12-30 00:27:50 -08:00
Max New
d003062586
Pattern pretty printer prints syntactically correct code.
...
Include auto-generated test case that was previously broken.
2013-12-29 20:46:20 -06:00
Max New
2da9009512
Setup QuickCheck and add Literal Parse/Print test
...
Currently fails the prop tests: https://github.com/evancz/Elm/issues/420
Also ignore emacs backup files.
2013-12-29 16:50:41 -06:00
Evan Czaplicki
e34245ae3a
Cosmetic: add a space
2013-12-29 13:22:54 -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
fcbd7fd73b
Improve some parser code by adding type annotations, removing unused dependencies, and using prefixed imports
2013-12-23 23:26:03 -08:00
Evan Czaplicki
0486c90bd3
Merge branch 'dev' into deriving
2013-12-23 17:03:05 -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
83e8bad84f
Add basics of "deriving" for ADTs and type aliases. Only parse it for type aliases at the moment.
2013-12-23 16:51:15 -08:00
Max New
254d71f4e5
Expand else
to True
instead of otherwise
.
...
Makes `if` syntax independent of the value of `otherwise`.
Includes test case.
2013-12-23 18:31:55 -06:00
Evan Czaplicki
32c78efe7d
Begin process of allowing "deriving" on type aliases.
2013-12-23 14:42:43 -08: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
e690c427b7
Add deriving as a reserved word
2013-12-21 23:55:33 -08:00
Timothy Vladimír Hobbs
cbbd42d3f3
Fix bug in parser
...
34913d5
broke the parser in the following case:
f = '\"'
This commit fixes that.
2013-12-21 23:21:10 +01:00
Evan Czaplicki
7b20993869
Get rid of dependency on uniplate so AST does not need to derive Data or Typeable
...
This is motivated by wanting to add things to the AST that cannot
derive Data or Typeable
2013-12-20 16:41:06 -08:00
Evan Czaplicki
3686c82738
Add note about no sharing between top-level and let-bound type variables
2013-12-19 15:04:41 -08:00
Evan Czaplicki
2874797ddb
Go to original error style. I think it's nicer.
2013-12-19 14:45:52 -08:00
Evan Czaplicki
34913d5340
Fix issue #397 . Core issue was that scanning for infix declarations was not clever about strings.
2013-12-19 10:41:31 -08:00
Evan Czaplicki
ac6c5bc04a
Get rid of check on how many exposed modules. That's for validation elsewhere
2013-12-19 01:48:26 -08: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
82d3d88d01
Get syntax highlighting on code blocks working again.
2013-12-17 16:19:42 -08:00
Evan Czaplicki
a3cb09a0c1
Add instances for generating JSON
2013-12-17 12:16:40 -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
b9056797ec
Add link to example program.
2013-12-17 10:59:45 -08:00
Evan Czaplicki
16e6654af8
Require minimal deps file when just building things locally
2013-12-16 14:41:05 -08:00
Evan Czaplicki
87bf14f268
Switch to using elm_dependencies.json to search for additional src-dirs
2013-12-16 03:03:52 -08:00
Evan Czaplicki
8a46ead147
Add dependencies field to Deps
2013-12-16 03:03:04 -08:00
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