Commit graph

331 commits

Author SHA1 Message Date
evancz
9b1fa9683b Document the basic input functions. 2013-05-17 23:13:32 +02:00
evancz
706d706e3f Simplify the Input API for basic widgets. 2013-05-17 23:00:25 +02:00
evancz
8823b012d1 Merge branch 'dev' of https://github.com/evancz/Elm into dev 2013-05-17 22:46:55 +02:00
evancz
c92dd2f921 Add lots of documentation and do some minor API clean up. 2013-05-17 22:46:08 +02:00
evancz
5044724cda Improve documentation a bit and get split working properly. 2013-05-17 12:49:31 +02:00
Evan Czaplicki
df73a090e4 Merge pull request #152 from perplexes/fix_http_json
Fix HTTP/JSON
2013-05-17 02:53:32 -07:00
evancz
a9400dbc63 Clean up some documentation and make some minor API tweaks. 2013-05-16 22:10:50 +02:00
evancz
6e1a3f5c0f fix minor mistake in adjustOffset 2013-05-15 07:53:01 +02:00
evancz
73fd3f345d Fix undefined variable usage in JS. 2013-05-15 07:48:45 +02:00
Colin Curtin
acd2b61e00 Merge remote-tracking branch 'evan/dev' into lint
Conflicts:
	runtime/Init.js
	runtime/Render/Collage.js
2013-05-14 09:18:38 -07:00
evancz
4bb23bc904 Merge branch 'dev' of https://github.com/evancz/Elm into dev 2013-05-14 16:30:36 +02:00
evancz
7ce550901c Move to initializing with three different functions: fullscreen, node, and worker.
Add code to ensure that mouse and touch positions are reported relative to the embedded Elm node.

Remove the elm_ prefix from the events for logging, redirects, and title changes. Should be silo'd by the `elm` and not escape into the global event namespace.
2013-05-14 16:29:06 +02:00
Evan Czaplicki
c575e4c3db Merge pull request #156 from perplexes/docs
Documentation, spelling.
2013-05-14 01:10:44 -07:00
Colin Curtin
0685425ace "float" is a reserved word in JS 2013-05-11 17:38:07 -07:00
Colin Curtin
dccb6257fb Prefer typeof over try/catch for feature detection. 2013-05-11 17:23:34 -07:00
Colin Curtin
98c0269edc Moar whitespace. 2013-05-11 17:15:45 -07:00
Colin Curtin
4495fdb592 Documentation, spelling. 2013-05-11 13:44:28 -07:00
Colin Curtin
2b90d0eb9e Whitespace, semicolons, lint etc. No functional changes. 2013-05-11 13:42:45 -07:00
Colin Curtin
8db9ccf57e Fix HTTP/JSON
* Elm Http: Signal (lift) was not imported
* Native Http: "Waiting" was not a string.
* Elm Json: find* weren't using the Json Object type (which find was expecting)
* Native Json: Utils was not imported (to use Tuple2)
2013-05-11 13:35:20 -07:00
evancz
b7e4f9b73b Get rid of logging 2013-05-11 12:34:12 -07:00
evancz
d8067fd8c4 Fix foldp 2013-05-06 02:41:22 -07:00
evancz
a8df7eb28a Minor bug fixes 2013-05-06 02:30:50 -07:00
evancz
3f8ce38f81 Rename some stuff in Graphics.Input 2013-05-06 02:30:11 -07:00
evancz
80b47ed0f5 Separate mouse drags. 2013-05-05 19:17:29 -07:00
evancz
04d320efac Fix Window.height in the first frame. 2013-05-05 17:52:00 -07:00
evancz
9f2964992a Add mouse support in the Touch library 2013-05-05 17:51:30 -07:00
evancz
82d753a685 Properly attach mouse events to document 2013-05-05 17:51:04 -07:00
evancz
934f37f882 Settle on name for lastKey and set the type as Signal KeyCode. 2013-05-05 17:49:28 -07:00
evancz
2f2898d8d8 Show escaped chars and function names. 2013-05-05 17:48:50 -07:00
evancz
7afe464ea8 Give curry and uncurry the correct implementations. They were swapped. 2013-05-05 17:48:20 -07:00
evancz
2ae0e90735 Add LineStyle to type aliases and add some annotations to the collage library 2013-05-05 12:11:45 -07:00
evancz
c2def3f29c Fix the directions of arrows and wasd. 2013-05-05 00:35:50 -07:00
evancz
ef1275e5a1 Add Touch and TextState aliases. 2013-05-04 18:58:10 -07:00
evancz
b359fd0b47 Revise elm-docs to copy the names of type variables in type annotations directly. 2013-05-04 18:19:54 -07:00
evancz
6ca373bdeb Move Geometry into Collage. Get rid of Graphics prefix as appropriate. 2013-04-28 20:57:48 -07:00
evancz
104faf10ea Fix mistaken function name. 2013-04-28 18:52:13 -07:00
evancz
d114746957 Rename some of the Graphics libraries 2013-04-28 05:21:46 -07:00
evancz
06e6b317dc Have equality work on any type. 2013-04-28 05:01:41 -07:00
evancz
2928e20c74 Move some modules out of Graphics/ 2013-04-28 05:01:27 -07:00
evancz
52f6c8957a Move record-to-object functions to JavaScript/Experimental.elm 2013-04-28 05:01:05 -07:00
evancz
dab4b7c7b8 Switch from ($) to (|>) and (<|). 2013-04-24 22:26:01 -07:00
evancz
00d3ad2db6 Shorten Libraries.hs, and fix some types in some of the libraries. 2013-04-22 02:36:11 -07:00
evancz
d2846a2534 Fix the default size of text blocks. 2013-04-14 18:07:26 -07:00
evancz
986010fb6a Add plainText back. Fix some types. Fix a bug in mergeEither. 2013-04-10 00:52:53 -07:00
evancz
82b7929ccf Get the core libraries compiling again. Fix type signatures that have super-types, and fix bugs in a couple files. 2013-04-09 22:15:06 -07:00
evancz
5b62c530d5 Add type annotations to more library files. 2013-04-08 01:49:44 -07:00
evancz
9c22031d28 Style tweak. 2013-04-07 17:58:43 -07:00
evancz
22890292b8 Correct resizing problems with static elements. Previously, no property updates occurred. 2013-04-07 17:57:57 -07:00
evancz
d47614cdd1 Fix indentation 2013-04-07 08:40:27 -07:00
evancz
60e403ba82 Fix show for ADTs and get parens in the right places.
Make `Elm.init(Elm.MyModule)` work nicer when it takes over the whole `document` and needs to resize with the window.
2013-04-06 16:48:20 -07:00
evancz
0354fad128 Explicitly list imports for a module. 2013-04-05 09:56:37 -07:00
evancz
613d9f5bc9 Fix bug in height and color 2013-04-05 09:52:18 -07:00
evancz
7664f71fc5 Fix combine function in Signal. 2013-04-03 10:35:18 -07:00
evancz
f3befa61cb Skip average for now. To be added back! 2013-04-03 10:33:13 -07:00
evancz
fc37907bc1 Move average to the automaton library. 2013-04-03 10:15:46 -07:00
evancz
d27ab15ec4 Add combine to the signal library. 2013-04-03 09:54:10 -07:00
evancz
1dbbc599f9 Reorder comments in List.elm 2013-04-03 00:33:55 -07:00
evancz
58640c553b Make sure that List only gets instantiated once. Requires that the list library is pure (never touches the elm variable) 2013-04-01 00:36:30 -07:00
evancz
475bc10876 Add implementation for checkboxes, passwords, and emails.
Ensure that direction of text selection is properly captured.
2013-04-01 00:35:18 -07:00
evancz
c15005f71c Get rid of special Input/Button.elm file, all will be in Graphics.Input. 2013-03-27 18:57:38 -07:00
evancz
a66a4b1fab Fix Automaton library to match PLDI paper. 2013-03-27 18:56:30 -07:00
evancz
ecaa5bdb29 Merge branch 'dev' of https://github.com/evancz/Elm into dev 2013-03-27 18:32:44 -07:00
ngunn
aa7a67fc85 List.js change: Nil checks all use .ctor
added comment on Nil handling
direct Nil comparison with ctor equiv.  see comments here: https://github.com/evancz/Elm/pull/130#issuecomment-15471337
2013-03-27 21:02:27 +00:00
evancz
c0a4286c16 Fix bug in lineStyle migration. 2013-03-27 09:52:16 -07:00
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
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
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
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
86a0a904d8 Fix oval and ngon. (It's PI, not pi!) 2013-03-22 18:27:03 -07:00
evancz
82a5a65dc9 Fix use of JS reserved word and get outline working. 2013-03-21 03:07:10 -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
7dbb052b22 Load json representation of types with Template Haskell, so library files are the base truth of type information.
Make minor fixes in libraries, such as adding the Char labrary and fixing the types in the Dict library.
2013-03-16 22:24:18 -07:00
evancz
194b25958b Get everything compiling again. 2013-03-16 13:00:59 -07:00
evancz
1822ebc160 Move the compiler down a directory, mostly. 2013-03-16 12:04:05 -07:00
evancz
3746c3217a Fill in some of Prelude.js 2013-03-16 02:02:16 -07:00
evancz
202aace362 Add the Prelude library with type annotations and docs. 2013-03-16 01:21:08 -07:00
evancz
0050bfa845 Add a matrix library and switch collage over to use it. 2013-03-16 01:11:15 -07:00
evancz
f1071b7614 Don't expose Matrix to people yet 2013-03-15 10:58:59 -07:00
evancz
481c2daab8 Switch to matrix representation of transformations. 2013-03-15 10:56:07 -07:00
evancz
42b4d5531f Add the Docs.hs file that extracts type annotations. 2013-03-14 01:04:51 -07:00
evancz
1b3480a522 Fix bug in Element module: using unbound variables. Need to make compiler check for this! 2013-03-13 10:31:37 -07:00
evancz
152ef51a98 Fix croppedImage, show for tuples, and init for resizing initial dom node. 2013-03-13 00:52:14 -07:00
evancz
6b071db7cc Correct Native.___ imports. 2013-03-13 00:03:54 -07:00
evancz
1552651eaf Make sure Mouse, Random, Window, and Time import their native implementation. 2013-03-13 00:00:02 -07:00
evancz
3540449119 Fix behavior of width and height to maintain the dimensions of images when resizing. Move htmlHeight into Utils so it can be used by both Element and Text. 2013-03-12 22:59:15 -07:00
evancz
609dc36596 Add height check and get rid of utils which was in the wrong place (i think) 2013-03-12 21:25:47 -07:00
evancz
d97027c118 More minor fixes to RTS. 2013-03-12 01:51:54 -07:00
evancz
a1b890adc3 Lots of tiny fixes to get the RTS working! 2013-03-12 00:48:11 -07:00
evancz
15c35c824b Clean out Input file! 2013-03-11 10:59:30 -07:00
evancz
213048dedd Move Geometry.elm into the Graphics/ directory. 2013-03-11 10:50:28 -07:00
evancz
34294a5f42 Strip out the unrelated things from Misc.js and rename it to Show.js, which is all it does now anyway! 2013-03-11 10:46:16 -07:00
evancz
db44b154b4 Combine Keyboard and Keyboard.Raw modules. 2013-03-11 10:38:52 -07:00
evancz
95679501d2 Add Build.hs which constructs the elm-runtime.
Found bugs in some files which are temporarily fixed: Weird type error in Either, name collision in LineStyle and syntax error in Json.Experimental
2013-03-10 22:42:57 -07:00
evancz
10f0a24449 Add the very important Signal library :P
Remove past versions of the RTS.
2013-03-10 19:03:42 -07:00
evancz
f903ff3fd8 Tweaks to the last of the library code. 2013-03-10 01:40:31 -08:00
evancz
b343564795 Finish tweaking the second half of .elm library files. 2013-03-10 01:07:17 -08:00
evancz
8a700e84d5 Update first half of .elm libraries 2013-03-10 00:54:37 -08:00
evancz
944a056122 Decide on convention that corresponding Native modules get exported automatically, no need to copy everything through in the Elm file.
Also extend `sort` to work on any comparable values.
2013-03-10 00:12:10 -08:00
evancz
851d2ff221 Create the Utils module which contains any utilities that can be created before all other modules. Switch to using Utils in existing modules.
Add the Error module for reporting the rare runtime errors that are possible.
2013-03-09 19:02:07 -08:00
evancz
6551ef14b2 Convert the Keyboard.Raw module and do minor fixes. 2013-03-09 00:39:58 -08:00
evancz
76e83e0e1b Convert Color and Text modules to new format. 2013-03-09 00:22:42 -08:00
evancz
0fe301aaba Convert the List and Misc modules. 2013-03-08 23:31:19 -08:00
evancz
8e6dbf8000 Convert the Date, JS, and Json modules. 2013-03-08 23:22:15 -08:00
evancz
86d02e22d5 convert WebSocket.js and Window.js to the new module format 2013-03-08 23:12:40 -08:00
evancz
ccf9917f2e Convert the random and touch modules to the new format. 2013-03-08 22:57:13 -08:00
evancz
f70fdaa300 Solidify format for modules. Convert the Time module. 2013-03-08 22:50:46 -08:00
evancz
9084db2b59 Switch module structure to permit on-demand initialization and multiple runtimes working simultaneously. 2013-03-08 20:17:01 -08:00
evancz
f589cf3899 Move all js files relevant to signals into the Native/Signal/ directory 2013-03-08 18:39:39 -08:00
evancz
24d508b8d2 Add the beginnings of a button module and mess with the definition of equality. 2013-03-07 23:17:34 -08:00
evancz
0ab2825d67 Get Graphics.Element in working order. 2013-03-07 11:06:48 -08:00
evancz
79a747cfc6 Rename core/ to libraries/ to make it more clear what is going on with the directory structure. 2013-03-06 09:28:53 -08:00