Commit graph

1945 commits

Author SHA1 Message Date
Evan Czaplicki
f619026fcc Handle function exports 2014-01-14 13:58:33 +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
6c1d2d7bf3 cosmetic: generalize collectLambdas to make a list of types, move prettifying code to the Pretty instance 2014-01-14 12:48:54 +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
2f38eec8f8 Show nicer error messages when module initialization fails due to invalid port values 2014-01-14 11:49:33 +01:00
Evan Czaplicki
cbf0b60df8 Fix checks for node.js on stdout and stderr ports 2014-01-14 11:48:58 +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
c9310cc4d5 cosmetic: simplify traversal of maybe 2014-01-14 11:45:40 +01:00
Evan Czaplicki
1650aad829 Allow the title port to work on Strings and Signals of Strings 2014-01-13 21:12:18 +01:00
Evan Czaplicki
32fbbca5b2 Generate conversion code for ports 2014-01-13 19:32:54 +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
e2aff93df9 Make the fix from #435 2014-01-13 11:01:10 +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
9c816d3a7a Merge pull request #445 from maxsnew/dict
Fix Dict Bug
2014-01-13 01:43:18 -08:00
Evan Czaplicki
8cadc4d92c Remove comment for things that no longer exist 2014-01-12 13:06:50 +01:00
Max New
efdea2f0b1 Fix Dict insert bug by using generalized balance function
Also removes now dead code and rearchitects a few things to statically
eliminate possible future bugs.
2014-01-08 19:02:06 -06:00
Evan Czaplicki
62bd720882 Make the char parser more restrictive to try to get better errors.
Before it permitted sequences of unescaped chars.
2014-01-08 11:36:51 +01:00
Evan Czaplicki
61dd68bcd3 Cosmetic: make some style changes to make it look more like the rest of the compiler
@maxsnew, I really want to make this more transparent and clear, sorry
for the total lack of clarity. Right now this is mostly “I prefer it
this way” and it’d be good to write down a set of rules and then
actually assess of that is a good way to write code.
2014-01-08 11:18:13 +01:00
Evan Czaplicki
aba241bf5b Merge pull request #443 from maxsnew/strchr
Fix String/Char Parse/Print Bugs
2014-01-08 00:06:26 -08:00
Max New
6b255fed59 Fix multiline string handling and add more tests. 2014-01-07 17:01:29 -06:00
Max New
cca69cf8e7 Fix Char literal printing bug. 2014-01-07 15:52:19 -06:00
Max New
5ea3ec7f80 Call out to stringLiteral/charLiteral for string/char literal parsing 2014-01-07 15:44:12 -06:00
Evan Czaplicki
ae3437196e Merge pull request #441 from ajhager/raf_detection
Fix window object not being detected in runtime.
2014-01-07 00:53:29 -08:00
Joseph Hager
d1a85fee9b Fix window object not being detected in runtime. 2014-01-06 15:05:10 -05:00
Evan Czaplicki
8bea3f073d cosmetic: make a block of code more whitespace friendly 2014-01-06 08:07:24 +01:00
Evan Czaplicki
96f55fceab Take ports out of MetadataModule, where it is no longer needed 2014-01-06 08:06:56 +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
85bf092192 Detect errors in port usage (i.e. too many or too few) 2014-01-06 07:49:04 +01:00
Evan Czaplicki
7e2deceb9a Add Native.Ports to prelude for user defined modules 2014-01-06 07:48:22 +01:00
Evan Czaplicki
3d7c8d2754 Add -W flag 2014-01-06 07:47:14 +01:00
Evan Czaplicki
d81941d9c0 Move JS code for ports to their own module 2014-01-06 07:47:05 +01:00
Evan Czaplicki
fd7707e649 cosmetic: use a slightly more descriptive names 2014-01-06 05:21:26 +01:00
Evan Czaplicki
502cfc0465 Handle values sent to incoming ports, still need to properly define Elm.input though 2014-01-05 13:47:01 +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
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
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
1eaa3043c8 define ports_out on the elm object 2014-01-04 16:16:50 +01:00
Evan Czaplicki
eed8fa1061 Add type annotations and make some -W recommendations 2014-01-04 16:16:21 +01:00
Evan Czaplicki
c03049a960 Simplify Build.Interface API, do not read "interfaces.data" when the --no-prelude flag is used 2014-01-04 15:59:24 +01:00
Evan Czaplicki
170006534d Rename InterfaceSerialization file and change the function names in it 2014-01-04 15:19:30 +01:00
Evan Czaplicki
7e64531d2e Switch from old FFI to new port interface for default output ports
Also add default handlers for stdout and stderr
2014-01-04 11:41:06 +01:00