Commit graph

705 commits

Author SHA1 Message Date
evancz
2aeeae7239 Fix rendering of lineJoin. 2013-03-26 19:31:31 -07:00
evancz
af64fc1848 Merge branch 'dev' of https://github.com/evancz/Elm into dev 2013-03-26 19:02:02 -07:00
evancz
e9d2288197 Move LineStyle into Collage. 2013-03-26 18:50:18 -07:00
Evan Czaplicki
0a8187257c Merge pull request #131 from ngunn/dev
List.js: fix long-standing bug in append (2 chr$ change)
2013-03-26 10:03:03 -07:00
ngunn
864761b56e List.js: fix long-standing bug in append (2 chr$ change)
Present since initial version: 389a6f5309
2013-03-26 14:21:57 +00:00
evancz
9a40392e00 Fix bugs in container and an empty flow 2013-03-26 00:12:31 -07:00
evancz
dd10e820de Merge branch 'dev' of https://github.com/evancz/Elm into dev 2013-03-25 19:09:07 -07:00
Evan Czaplicki
3759543128 Merge pull request #130 from ngunn/dev
Singleton Nil consequential change to compiler (minor)
2013-03-25 18:16:13 -07:00
ngunn
b6872d4bac Singleton Nil consequential change to compiler (minor)
CompileToJS generates objects using "ctor:"... for all non-primitives.
Added special handling for lists

Might be better to have a separate tag instead of: Data "Nil"

Test case:
main_join = let f x xs = (x::xs)
    in asText $ zipWith f ['c','m','t'] ["hop","ill","ape"]

 before fails with "xs: undefined".
2013-03-26 01:04:19 +00:00
Evan Czaplicki
3559c5374d Merge pull request #129 from ngunn/dev
List.js minor bugfixes (for review)
2013-03-25 14:28:59 -07:00
ngunn
93afe4cea8 List.js minor bugfixes (followup)
put foldl back as was + add type sig. to indicate why
replace use of xs.ctor with direct comparison against Nil.  This means the ctor field is no longer required (which is nice).

move .ctor in stor to the actual variable (doh)
2013-03-25 20:25:29 +00:00
ngunn
441e90770b List.js minor bugfixes
freeze Nil (one-time overhead for marginal safety)
don't do this for Cons (huge performance overhead)

use Nil throughout instead of making our own (if we're having a singleton, we should be consistently using it)

missing A2, A3 in places.

foldl function applied args in wrong order, foldl :: (a -> b -> a) -> a -> [b] -> a
sort: missing .ctor selector
2013-03-25 17:36:30 +00:00
evancz
93428aa21d Fix bug in export of List.member 2013-03-25 03:00:05 -07:00
evancz
545be51678 Fix behavior of customButton to avoid flicker. 2013-03-24 22:23:30 -07:00
evancz
24c90b3673 Fix rendering bug with standard input buttons. 2013-03-24 19:48:27 -07:00
evancz
63a40ea305 Fix import bugs in Input file. 2013-03-24 19:29:32 -07:00
evancz
9962ded3e2 Remove logging. 2013-03-24 19:20:52 -07:00
evancz
b930ac2984 Add implementation for buttons, customButtons, and textFields.
Also fix updating bug in `flow`.
2013-03-24 19:19:30 -07:00
evancz
87a275abeb Fix bugs:
* types rendered "::" instead of ":"
* `Signal.count` was broken
* Prelude didn't have `show`
2013-03-24 19:17:21 -07:00
evancz
26ddaf697e Add the basic proposal for an Input library. 2013-03-24 11:42:17 -07:00
evancz
cd6407c95a Add the Input library. 2013-03-24 11:08:48 -07:00
Evan Czaplicki
d2acbca4de Merge pull request #127 from madscoaducom/docs-update
Move of documentation to libraries - first round
2013-03-24 11:06:04 -07:00
Mads Flensted-Urech
441d09c4a7 Docs update: copy documentation from elm-lang.org
- Copy documentation from elm-lang.org (dev branch) to .elm files in
libraries folder
- Added TODO's for stuff that was not found in 0.8 version
- Added Review TODO in json.elm
2013-03-24 13:45:56 +01:00
evancz
893e4691e6 Add groupTransform function.
Add public Matrix library. Clean up and debug matrix implementation.
2013-03-23 23:54:00 -07:00
evancz
26bcdd201a Change type of toCode and fromCode 2013-03-23 19:30:49 -07:00
evancz
0fbc244bbb Change names back to be longer but better. 2013-03-23 18:22:25 -07:00
evancz
79093ff4da Change the name of Keyboard to Keys. Change some function names and change type of charPressed to be the latest char pressed (default is '\0') 2013-03-23 16:52:58 -07:00
evancz
e80f19b423 Fix move to have y-axis properly oriented.
Fix rotations (`degrees` and `turns` functions were broken because I used `Math.pi` instead of `Math.PI`...)
2013-03-23 13:20:30 -07:00
evancz
bbbd6eeb2c Merge branch 'dev' of https://github.com/evancz/Elm into dev 2013-03-22 18:28:46 -07:00
evancz
86a0a904d8 Fix oval and ngon. (It's PI, not pi!) 2013-03-22 18:27:03 -07:00
Evan Czaplicki
91de71a8a2 Merge pull request #125 from ngunn/dev
Fix cabal install missing docs.json (followup)
2013-03-22 11:13:30 -07:00
evancz
0034b1764c Merge branch 'dev' of https://github.com/evancz/Elm into dev 2013-03-22 10:36:55 -07:00
evancz
584782f5b2 Get dashed lines working again for shapes and paths.
Remove a lot of console.logs.

Start working on displaying Elements. It's trickier with group.
2013-03-22 10:36:12 -07:00
ngunn
175f268622 Fix cabal install missing docs.json (followup)
See: 14e32add30
for discussion on first attempt

Changed Librarys.hs and LoadLibraries.hs from TemplateHaskell to usafeIO.
Avoids needing to touch LoadLibraries after we change docs.json (as the file is loaded at runtime).
Also removes need for using CPP
Drawback of using unsafeIO is fairly well known/understood + this is a classic use-case.
Added error handling to LoadLibraries.hs

Setup.hs now uses "runProcess" instead of "system" to invoke elm compiler.
This allows us to set the environment variable "Elm_datadir" which is picked up by LoadLibraries and makes sure we get the just-built version in dist/data.
Also explicitly sets the RTS file to make sure we're not using one (as we're currently building it!)
Also change the folder the compiled JavaScript ends up in to dist/js.  Writing to the source tree, then deleting isn't very nice + this should make it easier to find elm compilation errors.  cabal clean handles the file deletion, too.

I think this fixes all the defects of the first version:
1. CPP is not needed
2. touch is not needed
3. building elm-runtime.js uses dist/data/docs.json
4. running elm after install uses the installed elm-runtime.js and docs.json
5. LoadLibraries.hs is simpler.  Doesn't use CPP or TemplateHaskell.  Has error handling and a decent error message
6. cabal clean && cabal install builds everything with the right data in the right order

(tested on ghc 7.4.1)
2013-03-22 15:52:40 +00:00
Evan Czaplicki
29153a88fd Merge pull request #122 from ngunn/dev
Dev (fix cabal install as per issue 120)
2013-03-21 11:21:55 -07:00
ngunn
14e32add30 Fix cabal install missing docs.json
See: https://github.com/evancz/Elm/issues/120

Add build-hook to Setup.hs so that elm-doc gets build and executed before library or elm exec gets built.
Add preprocessor to Elm.cabal so LoadLibraries.hs can load docs.json from the build folder instead of installed folder
Add touch to Setup.hs otherwise LoadLibraries.hs doesn't get recompiled.  This is non-portable, but I can't find a portable way (see Setup.hs for details)

cabal clean && cabal install now works
(tested on ghc 7.4.1)
2013-03-21 13:31:55 +00:00
ngunn
0064813300 trivial Docs.hs (generating docs.json missing " on type line)
Was a quote before the type value, but not after, leading to unhelpful error:
elm: Illegal unescaped character in string:
2013-03-21 13:27:04 +00:00
evancz
82a5a65dc9 Fix use of JS reserved word and get outline working. 2013-03-21 03:07:10 -07:00
evancz
fa9d3bf132 Merge branch 'dev' of https://github.com/evancz/Elm into dev
Conflicts:
	libraries/Graphics/Collage.elm
	runtime/Render/Collage.js
	runtime/Render/Element.js
2013-03-21 02:38:32 -07:00
evancz
4b8c9796a5 Add some files 2013-03-21 02:35:36 -07:00
evancz
131a2b6818 Get sprites working in collage. temporary fix for docs.json issue. Looks like git thinks we're in the past, so a bunch of changes that have already happened as well. 2013-03-21 02:29:23 -07:00
evancz
794b7f2b93 Fix the build issue people were having. Sorry ngunn :( I couldn't stop thinking about it! 2013-03-20 22:28:18 -07:00
evancz
212543f51a Get some basic collage functions working: forms excluding embedded elements, rect is known to work. 2013-03-18 02:53:36 -07:00
evancz
f7f137f553 Add support for Custom elements in the renderer. Move the CSS transform setters into Utils so they can be used by both elements and forms. 2013-03-18 00:58:36 -07:00
evancz
0b0c37c2b4 More work getting Collage in shape. 2013-03-18 00:16:07 -07:00
evancz
4587d3d3e4 - Break common functions into Utils files.
- Add support for no-graphics mode (e.g. for use with node.js)
- Change order of arguments for matrix transformms
- Begin getting Collage.js in order.
2013-03-17 21:36:05 -07:00
evancz
b1d0c74c2d Get elm-doc to extract comments! 2013-03-17 16:36:24 -07:00
evancz
9c74b8697d Fix join and fix show 2013-03-17 13:42:13 -07:00
evancz
6bcf63a0d8 Add split to List module and rename intercalate to join. 2013-03-17 13:01:50 -07:00
evancz
263bf1c0cc Import qualified name by default. 2013-03-17 00:12:33 -07:00