Commit graph

1920 commits

Author SHA1 Message Date
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
Evan Czaplicki
4b480a9010 Merge pull request #331 from jsl/327_fix_invalid_interface_map
Fix deserialization of interfaces in Prelude
2013-11-07 10:02:44 -08:00
Evan Czaplicki
3ce4b09013 Update README.md 2013-11-07 18:59:50 +01:00
Evan Czaplicki
0728d5feb3 try to make install instructions clearer 2013-11-07 18:59:08 +01:00
Evan Czaplicki
13928107eb Update README.md 2013-11-07 18:57:39 +01:00
Evan Czaplicki
3d9f242465 cosmetic change 2013-11-07 18:56:49 +01:00
Evan Czaplicki
87d339b7c9 add note about clang on OS X 10.9 2013-11-07 18:55:45 +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
Evan Czaplicki
b90e832e6b Merge pull request #330 from timthelion/patch-1
Update String.elm
2013-11-07 04:11:04 -08:00
timthelion
2d4d1678c3 Update String.elm
You had your types swapped.
2013-11-07 12:51:40 +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
Michael Sondergaard
158c70eee7 Fix typo 2013-11-04 21:09:22 +01:00
Michael Sondergaard
4a111890ed Add invalid serialization errors to Module.hs 2013-11-04 20:34:29 +01:00
Michael Sondergaard
67924d1c8a Remove catch-all match in Declaration
These ought to actually be written out, as the previous TODO message stated,
but at least this way the compiler will warn us when adding a new Decl.
2013-11-04 20:34:29 +01:00
Michael Sondergaard
a0cbe84f1d Throw an error when deserializing a bad type
This error should never be encountered, as long as we always update the get
function when the put function is, as required by get . put == id.
2013-11-04 20:32:53 +01:00
Evan Czaplicki
b3d5357287 Rename to findAll and find like everyone expects :/
It's not consistent with `split` but people seem okay with that.

Also make some examples nicer.
2013-11-04 17:06:48 +01:00
Evan Czaplicki
00dfb69367 Modify error messages for bad build artifacts to wrap more nicely on the terminal 2013-11-04 16:37:15 +01:00
Evan Czaplicki
5a1c9ed353 Unnecessary style changes
I don't really know why I felt the need to do this, but I am happier
now.
2013-11-04 13:28:03 +01:00
Evan Czaplicki
b1bca38488 Get rid of either-unwrap dependency and use fewer non-total library functions 2013-11-04 13:26:05 +01:00
Evan Czaplicki
0ffd3e20dd Merge pull request #319 from johnpmayer/dev
language-ecmascript before v0.15 does not have the Pretty(prettyPring) c...
2013-11-04 02:31:50 -08:00
Evan Czaplicki
5c5c05fed9 Merge pull request #320 from jsl/313_verify_serialized_interfaces
Give more helpful error messages when deserializing elmi files
2013-11-04 02:30:26 -08: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
82e9acf16e Change the internal representation of Text
Now generates significantly fewer spans and is a bit faster.
I also removed the `header` function.
2013-11-03 15:20:30 +01:00
Evan Czaplicki
46b9558b1a Get rid of unnecessary logging 2013-11-03 15:11:09 +01:00
Evan Czaplicki
b4440ad607 Stop creating dummy divs around every Element in a collage, fixes ordering issue in elm-at-pldi-2013 2013-11-03 02:29:51 +01:00
Evan Czaplicki
1e1b0c1281 merge find and replace in docs 2013-11-03 01:06:19 +01:00
Evan Czaplicki
ef2b38fe11 Always switch out Text elements 2013-11-02 23:17:29 +01:00
Evan Czaplicki
dd9c90d457 add note about Regex library 2013-11-02 19:47:21 +01:00
Evan Czaplicki
90e007730d introduce the padded function to use fewer whitespace markers 2013-11-02 19:21:26 +01:00
Evan Czaplicki
934e590a7b Be sure to avoid variable shadowing when generating temporary variables, fix for # 318 2013-11-02 19:05:07 +01:00
John P Mayer Jr
2ad4394eb1 language-ecmascript before v0.15 does not have the Pretty(prettyPring) class 2013-11-02 13:47:53 -04:00
Evan Czaplicki
a24872f330 cosmetic: remove a blank line 2013-11-01 23:51:49 +01:00
Evan Czaplicki
e411990a87 Create a Regex library 2013-11-01 23:51:23 +01:00
Evan Czaplicki
d1cee239d3 Add a couple type annotations 2013-11-01 13:58:18 +01:00
Evan Czaplicki
5eaa5b1c1e Merge branch 'master' into dev 2013-10-31 15:54:44 +01:00
Evan Czaplicki
e3c3d217f9 Merge branch 'dev' of https://github.com/evancz/Elm into dev 2013-10-31 15:53:35 +01:00
Tobias Hermann
1ed37fee60 type annotation of String.isEmpty: "isEmpty : String" => isEmpty : String -> Bool 2013-10-31 15:52:35 +01:00
Evan Czaplicki
4991cb17fa Add note about Transform2D improvements 2013-10-31 15:52:18 +01:00
Evan Czaplicki
a1b1b7473d Merge pull request #316 from Dobiasd/patch-1
type annotation of String.isEmpty: "isEmpty : String" => isEmpty : Strin...
2013-10-31 07:51:10 -07:00
Evan Czaplicki
0ec031440a Merge pull request #317 from Sheeo/dev-patch
[Cosmetic] Whitespace/indentation fixes in JS runtime
2013-10-31 07:31:42 -07:00
Michael Sondergaard
d57762e3ce Fix mixed indent and whitespace in Utils.js 2013-10-31 14:51:12 +01:00
Michael Sondergaard
9aa468e59a Fix newline at EOF in Element.js 2013-10-31 14:50:21 +01:00