Commit graph

388 commits

Author SHA1 Message Date
Evan Czaplicki
97a4628976 Get rid of dead code: showErr is not used any more 2013-08-06 13:40:54 -07:00
Evan Czaplicki
a446d609f2 Ensure that binary serialization works on Windows. Previously had issues with line ending conversions messing with binary data. 2013-08-06 00:36:07 -07:00
Evan Czaplicki
1df206dcc9 Clean up mistakes from the merge 2013-08-04 15:44:47 -07:00
Evan Czaplicki
51dfa676d9 Merge branch 'types'
Conflicts:
	compiler/Compiler.hs
	compiler/Model/Ast.hs
	libraries/Automaton.elm
	libraries/Dict.elm
2013-08-04 15:40:24 -07:00
Evan Czaplicki
62bb8ab3ad Add missing paren 2013-08-04 12:52:33 -07:00
Evan Czaplicki
0cd594c13c Better JS for function composition, runtime errors report which module they came from 2013-08-04 12:51:52 -07:00
Evan Czaplicki
a268421893 Get show, readInt, and readFloat working again 2013-08-04 12:22:58 -07:00
Evan Czaplicki
e1bccca1de Nicer error messages for unfound variables 2013-08-03 12:55:07 -07:00
Evan Czaplicki
3c05f538d0 Make error messages prettier 2013-08-03 12:28:59 -07:00
Evan Czaplicki
cb1a7a2355 Make formatting nicer for type errors 2013-08-03 12:02:59 -07:00
Evan Czaplicki
20047ec0eb Show source strings in error messages when possible 2013-08-03 11:41:47 -07:00
Evan Czaplicki
51bc878b51 Use new Located datastructure, add source strings where appropriate 2013-08-03 11:41:33 -07:00
Evan Czaplicki
177a03750b Add source code to locations for better error messages 2013-08-03 11:40:53 -07:00
Evan Czaplicki
1f390072c6 Add more space between type errors 2013-08-03 11:39:56 -07:00
Evan Czaplicki
37417e154c print file path when compiling and enable multithreaded execution 2013-08-02 22:20:55 -07:00
Evan Czaplicki
8000b8b4b9 Stop exposing the QuasiQuoting library.
I have not looked at this code in many versions, so I don't think it's
good for me to keep "maintaining" it even though I don't think people
should really use this.
2013-08-02 17:37:30 -07:00
Evan Czaplicki
e4e8d89393 Fix "hiding" of thing that does not exist 2013-08-02 16:51:29 -07:00
Evan Czaplicki
9f2b81e4a9 Unhide thing that does not exist 2013-08-02 16:09:06 -07:00
Evan Czaplicki
520c81f9d4 Better names for files when no name is given 2013-08-02 15:01:03 -07:00
Evan Czaplicki
78c6db644e Fix problem in generating pattern matching code for records 2013-08-02 14:49:31 -07:00
Evan Czaplicki
28d256876d Fix record constructor for extension 2013-08-02 10:51:12 -07:00
Evan Czaplicki
070d02c914 deprime all exports, fix accidental variable capture in (.) 2013-08-02 10:50:54 -07:00
Evan Czaplicki
8bc39cd620 change error message 2013-08-02 01:53:40 -07:00
Evan Czaplicki
96136beaf5 Get the correct exports 2013-08-01 22:48:05 -07:00
Evan Czaplicki
c85fed1024 Put exports at the end of a file, making sure the value is always defined. 2013-08-01 21:46:58 -07:00
Evan Czaplicki
dd8843f8e4 Take correct file path, even if module name is not given 2013-08-01 17:22:44 -07:00
Evan Czaplicki
8e54751626 Correctly generate a type for markdown blocks 2013-08-01 17:19:34 -07:00
Evan Czaplicki
20e2ff0a28 Properly handle the qualified Text type 2013-08-01 15:38:40 -07:00
Evan Czaplicki
51ba512914 Parse qualified infix functions
It is okay to say

    4 `Time.since` Mouse.clicks
2013-08-01 15:38:19 -07:00
Evan Czaplicki
66e2a97d2a Allow prefixes on FFI types 2013-08-01 15:37:34 -07:00
Evan Czaplicki
f9cc4516d8 Import qualified Text module by default 2013-07-31 23:47:29 -07:00
Evan Czaplicki
8f1f15cfeb Fix pattern matching 2013-07-31 23:47:16 -07:00
Evan Czaplicki
ce527c0c07 Style change 2013-07-31 12:12:57 -07:00
Evan Czaplicki
4f595c2ca5 Eliminate dead code and reduce dependencies 2013-07-31 12:12:52 -07:00
Evan Czaplicki
a56efd851b Check that imports actually exist in the known interfaces 2013-07-31 12:12:30 -07:00
Evan Czaplicki
2c96bf0c33 Get the haskell library working 2013-07-31 09:31:48 -07:00
Evan Czaplicki
e677f27bc5 add a type signature 2013-07-31 07:42:31 -07:00
Evan Czaplicki
a400ab140a Get compling 2013-07-31 07:42:21 -07:00
Evan Czaplicki
3ef5284afd Stop using the MultiWayIf extension 2013-07-30 22:57:13 -07:00
Evan Czaplicki
8006d8e54a Report line numbers in type errors 2013-07-30 16:22:20 -07:00
Evan Czaplicki
b1f53d04ed Pipe source locations through the type checker 2013-07-30 16:01:20 -07:00
Evan Czaplicki
c6868f1bd6 cosmetic change 2013-07-30 11:57:58 -07:00
Evan Czaplicki
a4c4cf0493 Use Location.none less 2013-07-30 11:55:41 -07:00
Evan Czaplicki
b26edcc46e Simplify representation of source locations 2013-07-30 11:43:42 -07:00
Evan Czaplicki
3065f58924 Support appendable types 2013-07-30 08:58:09 -07:00
Evan Czaplicki
ae6a3b36b5 Fix runtime code for comparing things 2013-07-30 08:44:23 -07:00
Evan Czaplicki
fa448548b8 Make error messages nicer 2013-07-30 08:31:05 -07:00
Evan Czaplicki
a1b7336547 Make comparable work fully and clean up code 2013-07-30 08:30:49 -07:00
Evan Czaplicki
3da8a71d00 Add ability to collect App1's into a Type constructor
Useful for determining if something is a Tuple or List
2013-07-30 08:29:52 -07:00
Evan Czaplicki
dfb27a7c67 Get rid of Paths_Elm to make sure things build properly for people. 2013-07-29 19:48:04 -07:00
Evan Czaplicki
1273f4deb3 Make sure that basic math operations generate the correct JS code. 2013-07-29 19:34:00 -07:00
Evan Czaplicki
25474f8310 Function args were in the reverse order! 2013-07-29 23:44:15 +02:00
Evan Czaplicki
a98a7be9f8 Export ADT constructors too 2013-07-29 23:43:57 +02:00
Evan Czaplicki
2d4afca06f Fix JS generation
correct generation of binops
use correct calling conventions for defining functions
only import modules by name since everything is canonical (no more
eval!)
simplify exports
have _op be a per module object (resolves "overwriting" problem)
2013-07-29 23:22:33 +02:00
Evan Czaplicki
2f6d3227e9 If no exports are listed, everything gets exported 2013-07-29 23:19:32 +02:00
Evan Czaplicki
66515259cf Only deprime when generating JavaScript, better to preserve information 2013-07-29 23:19:16 +02:00
Evan Czaplicki
f8fe8e4495 Properly convert Type.Type to SourceSyntax.Type 2013-07-29 20:23:42 +02:00
Evan Czaplicki
ac450ae944 restrict exports to def and term 2013-07-29 19:49:09 +02:00
Evan Czaplicki
ec24738e9c Get rid of dead code 2013-07-29 19:25:58 +02:00
Evan Czaplicki
fda1d2f979 Add canonicalization for aliases and ADTs 2013-07-29 19:25:24 +02:00
Evan Czaplicki
6ace8a0bf7 Move the definition of the Signal type out of the compiler and into the Signal library 2013-07-29 15:47:48 +02:00
Evan Czaplicki
0f3910d59e Make SortDefinitions aware of ADT constructors, gave incorrect sorts before 2013-07-29 15:29:23 +02:00
Evan Czaplicki
46cb850570 Whitespace cleanup 2013-07-29 13:23:14 +02:00
Evan Czaplicki
3f96acf1f1 Get rid of logging and add Int, Float, Char, Bool to the global environment 2013-07-29 13:23:02 +02:00
Evan Czaplicki
2f49151c29 Cosmetic changes 2013-07-29 13:22:23 +02:00
Evan Czaplicki
ab00bce769 Remove SourceSyntax.Rename
I think keeping this file up to date is unnecessary
2013-07-29 13:21:59 +02:00
Evan Czaplicki
f8182740bc Prettify code to print program 2013-07-29 13:21:34 +02:00
Evan Czaplicki
2f5639c4fb Introduce Transform.Canonicalize
Run this to create a properly formatted ModuleInterface
2013-07-29 11:59:55 +02:00
Evan Czaplicki
02ab90e794 No need to derename, names will be preserved 2013-07-29 11:55:17 +02:00
Evan Czaplicki
1418bde44d Remove use of SourceSyntax.Rename, which no longer exists 2013-07-29 11:54:50 +02:00
Evan Czaplicki
e22c7d455e Add types and deprime function to SourceSyntax.Helpers 2013-07-29 11:54:33 +02:00
Evan Czaplicki
eb96d7ad8d Get rid of current canonicalization code 2013-07-29 11:53:45 +02:00
Evan Czaplicki
e8ab1c28ae Remove SourceSyntax.Rename, which was unused 2013-07-29 11:52:34 +02:00
Evan Czaplicki
fa132ea6a8 Change name of Prelude to Basic, matching change in libraries/ 2013-07-28 02:35:52 +02:00
Evan Czaplicki
0a6bd8bd96 Generate and use interfaces.data so standard library types are available 2013-07-28 02:24:17 +02:00
Evan Czaplicki
da346ea6a1 Show type errors in the order they appear in the source file 2013-07-27 00:53:34 +02:00
Evan Czaplicki
272557d785 Fix for "trying to write to a file in a non-existant directory" 2013-07-27 00:39:40 +02:00
Evan Czaplicki
fd63aff70b Correct the code that unifies records 2013-07-27 00:15:26 +02:00
Evan Czaplicki
576e979483 Simplify code to generate record constraints 2013-07-27 00:14:38 +02:00
Evan Czaplicki
ab41d0c0e8 Take out types that were listed as "builtin" 2013-07-26 21:19:08 +02:00
Evan Czaplicki
c1d5f86e82 Simplify type error messages 2013-07-26 21:18:44 +02:00
Evan Czaplicki
42065eb075 Generate fewer intermediate variables during record unification 2013-07-26 19:39:42 +02:00
Evan Czaplicki
ebcaad0004 Fix possibility of calling maximum on empty lists 2013-07-26 19:39:12 +02:00
Evan Czaplicki
2a51470fc1 Implement unification for records 2013-07-26 19:04:43 +02:00
Evan Czaplicki
760ad905cf Add record constructors, begin using lists to represent fields in record types to maintain ordering from the source program 2013-07-26 18:20:57 +02:00
Evan Czaplicki
2a5bee06fc Include type aliases from dependencies 2013-07-26 17:35:48 +02:00
Evan Czaplicki
39f2a8717d Rewrite readDeps so that modules are never read more than once 2013-07-26 16:38:40 +02:00
Evan Czaplicki
0f85a2fcfa Resolve type aliases in instantiator 2013-07-26 15:08:04 +02:00
Evan Czaplicki
46631c3616 Remove dead code 2013-07-26 15:07:35 +02:00
Evan Czaplicki
637c7e0da0 Put type aliases in ModuleInterface 2013-07-26 15:06:35 +02:00
Evan Czaplicki
6948858f78 Allow multiple different imports of the same module, clean up canonicalize code 2013-07-26 12:56:36 +02:00
Evan Czaplicki
938675110d Fix parser for "import List" which before was not importing anything. 2013-07-26 12:31:49 +02:00
Evan Czaplicki
0681fbe583 Get rid of dead function and give instantiateTypeWithContext a shorter name 2013-07-26 12:22:15 +02:00
Evan Czaplicki
32a331b3b0 Load ADTs into the environment to fix constraint generation for patterns 2013-07-26 12:19:24 +02:00
Evan Czaplicki
2b2bc087e4 Minor cosmetic change 2013-07-26 11:40:44 +02:00
Evan Czaplicki
ff67c667a0 Get Matrix2D and Signal compiling 2013-07-26 00:33:59 +02:00
Evan Czaplicki
c19ccfe56a Stop importing the Native library by default 2013-07-26 00:19:43 +02:00
Evan Czaplicki
727d708289 Get libraries to compile 2013-07-26 00:19:21 +02:00
Evan Czaplicki
ec8687610f Move type annotations out of Environment and into the Basics library 2013-07-26 00:06:52 +02:00
Evan Czaplicki
eba7e6292e Trim some unused dependencies 2013-07-25 20:53:54 +02:00