packages feed

miso 0.11.0.0 → 0.12.0.0

raw patch · 42 files changed

+128/−52 lines, 42 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2016-2017, David M. Johnson+Copyright (c) 2016-2018, David M. Johnson All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
README.md view
@@ -22,9 +22,6 @@   <a href="https://github.com/dmjio/miso/blob/master/LICENSE">     <img src="http://img.shields.io/badge/license-BSD3-brightgreen.svg?style=flat-square" alt="LICENSE">   </a>-  <a href="https://ci.appveyor.com/project/dmjio/miso">-    <img src="https://img.shields.io/appveyor/ci/dmjio/miso/master.svg?style=flat-square" alt="appveyor">-  </a>   <a href="https://hydra.dmj.io">     <img src="https://img.shields.io/badge/build-Hydra-00BDFD.svg?style=flat-square" alt="Miso Hydra">   </a>@@ -37,6 +34,7 @@  ## Table of Contents - [Quick Start](#quick-start)+  - [Begin](#begin)   - [Stack](#stack)   - [Nix](#nix)   - [Cabal](#cabal)@@ -63,6 +61,9 @@   - [GHCJS](#ghcjs) - [Sample Application](#sample-application) - [Building examples](#building-examples)+- [Pinning nixpkgs](#pinning-nixpkgs)+- [Binary cache](#binary-cache)+- [Benchmarks](#benchmarks) - [Maintainers](#maintainers) - [Contributing](#contributing) - [License](#license)@@ -72,6 +73,30 @@  All source code depicted below for the quick start app is available [here](https://github.com/dmjio/miso/tree/master/sample-app). +### Begin+We recommend using `nix` when working with `miso`, but it is just as fine to use `stack`. +To build the sample-app with `nix`, execute the command below:++```bash+git clone https://github.com/dmjio/miso && cd miso/sample-app && nix-build+```++To develop with `nix` run the below command (this will put you into a shell where you can iteratively develop the project with `cabal build`).++```bash+git clone https://github.com/dmjio/miso && cd miso/sample-app && nix-shell -A env+```++For more information on using `nix` w/ `miso`, see the [`nix` section below](#nix)++To build the sample-app with `stack`, execute the command below:+```bash+git clone https://github.com/dmjio/miso && cd miso/sample-app && stack setup && stack build+```++For more information on using `stack` w/ `miso`, see the [`stack` section below](#stack)++ ### Stack In the `miso` repository there is a [folder named `stack`](https://github.com/dmjio/miso/tree/master/stack) with "known to work" configurations for `GHCJS`. One stack file exists for both the `7.10.3` and `8.0.1` versions of `GHCJS`. In general, we recommend developing with the `7.10.3` version since it currently supports `GHCJSi` (a REPL that connects to the browser by way of a [`nodejs`](https://nodejs.org/en/) web server using [`socket.io`](https://socket.io/)) and building with the `8.0.1` version (if possible). For more information on using `stack` with `GHCJS`, please consult the [GHCJS section of the `stack` docs](https://docs.haskellstack.org/en/stable/ghcjs/). @@ -94,7 +119,7 @@ packages:  - '.' extra-deps:- - miso-0.10.0.0+ - miso-0.12.0.0  setup-info:   ghcjs:@@ -221,13 +246,19 @@  Write a `default.nix` (which calls `app.nix`), this fetches a recent version of `miso`. ```nix-{ pkgs ? import <nixpkgs> {} }:+{ pkgs ? import ((import <nixpkgs> {}).fetchFromGitHub {+    owner = "NixOS";+    repo = "nixpkgs";+    rev = "a0aeb23";+    sha256 = "04dgg0f2839c1kvlhc45hcksmjzr8a22q1bgfnrx71935ilxl33d";+  }){}+}: let   result = import (pkgs.fetchFromGitHub {     owner = "dmjio";     repo = "miso";-    sha256 = "18jhr1ihf0vwwvp134j24isvzq699x5iy7l9ihrah760zmcxi7d2";-    rev = "e3d3d874337a4a44adc4b6bdb8b18d907c6c1e34";+    sha256 = "03w1gffzw0qry6q5may5miyjf36574kx12pviywjddpckp62p8h3";+    rev = "2a42c67ef1f876b2f81dbcf18bcc18269d0f6876";   }) {}; in pkgs.haskell.packages.ghcjs.callPackage ./app.nix {   miso = result.miso-ghcjs;@@ -436,6 +467,35 @@ cd result/examples/todo-mvc.jsexe && python -m SimpleHTTPServer Serving HTTP on 0.0.0.0 port 8000 ... ```++## Pinning nixpkgs++By default `miso` uses a known-to-work, pinned version of [`nixpkgs`](https://github.com/dmjio/miso/blob/master/default.nix#L1-L6).+To override this to your system's version of `nixpkgs` write:++```+nix-build --arg nixpkgs 'import <nixpkgs> {}'+```++## Binary cache++`nix` users on a Linux distro can take advantage of a [binary cache](https://cache.dmj.io/nix-cache-info) for faster builds. To use the binary cache simply append `https://cache.dmj.io/nix-cache-info` during all `nix-shell` and/or `nix-build` invocations.++```bash+nix-build --option extra-binary-caches https://cache.dmj.io+```++Alternatively, add `https://cache.dmj.io` to your list of local binary caches in `nix.conf` (usually found in `/etc/nix/nix.conf`), and it will automatically be used on all invocations of `nix-build` and/or `nix-shell`.++```+binary-caches = https://cache.dmj.io/ https://cache.nixos.org/+```++## Benchmarks++[According to benchmarks](https://medium.com/@saurabhnanda/benchmarks-fp-languages-libraries-for-front-end-development-a11af0542f7e), `miso` is among the fastest functional programming web frameworks, second only to [Elm](http://elm-lang.org).++<img src="https://cdn-images-1.medium.com/max/1600/1*6EjJTf1mhlTxd4QWsygCwA.png" width="500" height="600" />  ## Maintainers 
examples/mario/Main.hs view
@@ -18,9 +18,6 @@   | WindowCoords !(Int,Int)   | NoOp -foreign import javascript unsafe "$r = performance.now();"-  now :: IO Double- spriteFrames :: [MisoString] spriteFrames = ["0 0", "-74px 0","-111px 0","-148px 0","-185px 0","-222px 0","-259px 0","-296px 0"] 
examples/three/Main.hs view
@@ -108,9 +108,6 @@ foreign import javascript unsafe "$1.showPanel(0);"   showPanel :: JSVal -> IO () -foreign import javascript unsafe "$r = performance.now();"-  now :: IO Double- foreign import javascript unsafe "$r = new THREE.Scene();"   newScene :: IO JSVal 
ghc-src/Miso.hs view
@@ -6,7 +6,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghc-src/Miso/Html/Internal.hs view
@@ -13,7 +13,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Html.Internal--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghc-src/Miso/String.hs view
@@ -4,7 +4,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.String--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso.hs view
@@ -7,7 +7,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental@@ -22,6 +22,7 @@   , module Miso.Subscription   , module Miso.Types   , module Miso.Router+  , module Miso.Util   ) where  import           Control.Concurrent@@ -38,6 +39,7 @@ import           Miso.Diff import           Miso.Effect import           Miso.Event+import           Miso.Util import           Miso.Html import           Miso.Router import           Miso.Subscription
ghcjs-src/Miso/Delegate.hs view
@@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Delegate--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso/Dev.hs view
@@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Dev--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso/Diff.hs view
@@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Diff--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso/Effect.hs view
@@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Effect--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso/Effect/DOM.hs view
@@ -2,7 +2,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Effect.DOM--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso/Effect/Storage.hs view
@@ -5,7 +5,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Effect.Storage--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso/Effect/XHR.hs view
@@ -10,7 +10,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Effect.XHR--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso/FFI.hs view
@@ -5,7 +5,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.FFI--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso/Html/Internal.hs view
@@ -19,7 +19,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Html.Internal--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso/String.hs view
@@ -7,7 +7,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.String--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso/Subscription.hs view
@@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Subscription--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso/Subscription/History.hs view
@@ -6,7 +6,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Subscription.History--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso/Subscription/Keyboard.hs view
@@ -5,7 +5,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Subscription.Keyboard--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso/Subscription/Mouse.hs view
@@ -3,7 +3,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Subscription.Mouse--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso/Subscription/SSE.hs view
@@ -4,7 +4,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Subscription.SSE--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso/Subscription/WebSocket.hs view
@@ -8,7 +8,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Subscription.WebSocket--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso/Subscription/Window.hs view
@@ -3,7 +3,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Subscription.Window--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
ghcjs-src/Miso/Types.hs view
@@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Types--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
+ ghcjs-src/Miso/Util.hs view
@@ -0,0 +1,19 @@+-----------------------------------------------------------------------------+-- |+-- Module      :  Miso.Util+-- Copyright   :  (C) 2016-2018 David M. Johnson+-- License     :  BSD3-style (see the file LICENSE)+-- Maintainer  :  David M. Johnson <djohnson.m@gmail.com>+-- Stability   :  experimental+-- Portability :  non-portable+----------------------------------------------------------------------------+module Miso.Util+  ( now+  , consoleLog+  , jsvalToValue+  , windowAddEventListener+  , stringify+  , parse+  ) where++import Miso.FFI
miso.cabal view
@@ -1,12 +1,12 @@ name:                miso-version:             0.11.0.0+version:             0.12.0.0 category:            Web, Miso, Data Structures license:             BSD3 license-file:        LICENSE author:              David M. Johnson <djohnson.m@gmail.com> maintainer:          David M. Johnson <djohnson.m@gmail.com> homepage:            http://github.com/dmjio/miso-copyright:           Copyright (c) 2017 David M. Johnson+copyright:           Copyright (c) 2017-2018 David M. Johnson build-type:          Simple extra-source-files:  README.md cabal-version:       >=1.22@@ -311,6 +311,7 @@       Miso.Subscription.Window       Miso.Subscription.SSE       Miso.Types+      Miso.Util     other-modules:       Miso.Diff       Miso.FFI
src/Miso/Concurrent.hs view
@@ -2,7 +2,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Concurrent--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
src/Miso/Event.hs view
@@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Event--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
src/Miso/Event/Decoder.hs view
@@ -3,7 +3,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Event.Decoder--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
src/Miso/Event/Types.hs view
@@ -4,7 +4,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Event.Types--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
src/Miso/Html.hs view
@@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Html--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
src/Miso/Html/Element.hs view
@@ -2,7 +2,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Html.Element--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
src/Miso/Html/Event.hs view
@@ -12,7 +12,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Html.Event--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
src/Miso/Html/Property.hs view
@@ -2,7 +2,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Html.Property--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
src/Miso/Lens.hs view
@@ -2,7 +2,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Lens--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
src/Miso/Router.hs view
@@ -15,7 +15,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Router--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
src/Miso/Svg.hs view
@@ -1,7 +1,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Svg--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
src/Miso/Svg/Attribute.hs view
@@ -3,7 +3,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Svg.Attribute--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
src/Miso/Svg/Element.hs view
@@ -3,7 +3,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Svg.Element--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental
src/Miso/Svg/Event.hs view
@@ -6,7 +6,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Miso.Svg.Events--- Copyright   :  (C) 2016-2017 David M. Johnson+-- Copyright   :  (C) 2016-2018 David M. Johnson -- License     :  BSD3-style (see the file LICENSE) -- Maintainer  :  David M. Johnson <djohnson.m@gmail.com> -- Stability   :  experimental