Commit graph

83 commits

Author SHA1 Message Date
Evan Czaplicki
96f55fceab Take ports out of MetadataModule, where it is no longer needed 2014-01-06 08:06:56 +01:00
Evan Czaplicki
5dd7b6b1bb Extend expression crawler to do checks on ports as well as on let expressions 2014-01-05 10:15:37 +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
9ccc707594 properly rename expressions in port declarations, add -Wall 2014-01-04 08:20:52 +01:00
Evan Czaplicki
ade03397df Fix another copy-paste error 2014-01-03 12:15:49 +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
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
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
3c65b5c69d Move boundVars function into SourceSyntax.Pattern 2014-01-02 23:23:11 -08:00
Evan Czaplicki
600e65ca43 Get rid of Transform.Optimize, which is currently unused 2014-01-02 23:13:37 -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
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
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
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
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
bccfece2c1 Merge branch 'master' into dev 2013-11-19 22:34:08 -08:00
Evan Czaplicki
54a99b7309 Add error and explanation for infinite type aliases 2013-11-19 22:29:25 -08: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
Michael Sondergaard
8594ab3780 Improve error message 2013-11-11 15:29:41 +01: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
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
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
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
c480449371 cosmetic: make shadow check a bet more compact 2013-10-14 20:26:47 -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
76b2e56981 Add Strings as a primitive in the compiler 2013-10-02 15:56:43 -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
5f7fcaa92d Fix issue #241 2013-09-08 12:26: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
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
d7c89ee07c support cross-module OpTables 2013-08-29 02:53:20 -07:00
Evan Czaplicki
fea6e5d408 Add fixities to module interfaces 2013-08-29 00:06:37 -07:00
Evan Czaplicki
9346d2e516 Remove two unused modules 2013-08-25 01:39:12 -07:00
Evan Czaplicki
9e58bdbc54 Canonicalize patterns in lambda expressions 2013-08-10 15:48:18 -07:00
Evan Czaplicki
5b6773c3ec Fix extra space in error message 2013-08-08 18:05:21 -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