Commit graph

177 commits

Author SHA1 Message Date
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
6ba394c9cb Get rid of experimental code for handling "deriving" 2014-01-20 01:09:50 +01:00
Evan Czaplicki
1a1aff1bc8 restrict incoming ports to disallow data structures that contain signals, only "top-level" signals are allowed 2014-01-16 18:28:07 +01:00
Evan Czaplicki
b5e731122d Improve error messages as described in a list discussion
https://groups.google.com/forum/#!topic/elm-discuss/X4V4edxeFKI
2014-01-15 19:22:19 +01:00
Evan Czaplicki
bc6ac142ae Disallow signals-of-signals, functions that involve signals, and signals of functions 2014-01-14 13:28:43 +01:00
Evan Czaplicki
461abc0c6f Correct check for outgoing higher order functions
A function can appear arbitrarily nested in a data structure, but that
function cannot have more functions within it.
2014-01-14 12:49:22 +01:00
Evan Czaplicki
63243ca457 Minor changes to checks for ports 2014-01-13 19:24:39 +01:00
Evan Czaplicki
329077f1ef Get rid of input handlers for now 2014-01-13 19:24:17 +01:00
Evan Czaplicki
fe3b3439b7 Make port checks more permissive 2014-01-13 13:52:18 +01:00
Evan Czaplicki
2a0a0e6e3c Simplify SourceSyntax.Type AST, making record extension more restrictive as discussed with @maxsnew 2014-01-13 11:01:10 +01:00
Evan Czaplicki
9dda928ac4 make conversion functions for input ports optional 2014-01-13 11:01:10 +01:00
Evan Czaplicki
828c2c7372 Give more reasonable names to incoming and outgoing ports 2014-01-13 11:01:10 +01:00
Evan Czaplicki
a97b9951d0 Add checks for port types to ensure that only JS values go through ports and that type annotations are correct and consistent 2014-01-05 10:41:40 +01:00
Evan Czaplicki
dc3bba714c Capture the entire type of the handler for incoming ports 2014-01-05 10:40:27 +01:00
Evan Czaplicki
9ea98549bc Actually fill in a type variable when generating PortIn expressions 2014-01-05 10:15:23 +01:00
Evan Czaplicki
3b9862ab4e Switch from Types to Variables in the representation of PortIn 2014-01-05 09:29:00 +01:00
Evan Czaplicki
39eb4c6bc8 Use one fewer variable for PortIn constraints 2014-01-05 07:54:16 +01:00
Evan Czaplicki
6eb84d82d7 Make error message prettier 2014-01-04 16:46:38 +01:00
Evan Czaplicki
eed8fa1061 Add type annotations and make some -W recommendations 2014-01-04 16:16:21 +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
863d31b38f Switch name of qualified import 2014-01-04 09:45:20 +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
6f75310a49 Get rid of redundant code that collapses ParseDefs 2014-01-03 10:33:17 +01: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
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
e119d8ef62 Get rid of SourceSyntax.Everything module 2013-12-22 15:18:16 -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
6ff938c7cf Improve message for errors when unifying rigid type variables 2013-12-12 17:11:49 -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
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
Evan Czaplicki
d97fe192e0 Merge branch 'markdown' into dev
Conflicts:
	Elm.cabal
2013-10-29 15:36:56 +01: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
dce5e3eade Add String as an appendable type 2013-10-02 16:04:30 -07:00
Evan Czaplicki
76b2e56981 Add Strings as a primitive in the compiler 2013-10-02 15:56:43 -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
7e1d95a108 Move the markdown function to the text library 2013-09-01 22:20:07 -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
95ec3a822e Stop using error when constraining patterns and when instantiating source types 2013-08-25 20:23:49 -07:00
Evan Czaplicki
60e90c0f95 Add a note about what canonicalRealias does 2013-08-24 14:50:40 -07:00
Evan Czaplicki
18c67cb345 Properly perform extraChecks 2013-08-21 19:45:23 -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