axiom 0.4.3 → 0.4.4
raw patch · 4 files changed
+29/−18 lines, 4 filessetup-changedPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- README.md +18/−6
- Setup.lhs +6/−6
- axiom.cabal +3/−3
- src/GHCJS/HPlay/View.hs +2/−3
README.md view
@@ -1,19 +1,31 @@ [](http://hackage.haskell.org/package/ghcjs-hplay) [](http://stackage.org/lts/package/ghcjs-hplay) [](http://stackage.org/nightly/package/ghcjs-hplay) -[](https://travis-ci.org/agocorona/ghcjs-hplay) +[](https://travis-ci.org/agocorona/ghcjs-hplay) -ghcjs-hplay +Axiom (ghcjs-hplay) ========== + - +For some examples, see the [transient-examples](https://github.com/transient-haskell/transient-examples) repository: [distributedApps.hs](https://github.com/transient-haskell/transient-examples/blob/master/distributedApps.hs) and [webapp.hs](https://github.com/transient-haskell/transient-examples/blob/master/webapp.hs) +The source code can be executed in the commmand line if you have docker installed. + [](https://gitter.im/Transient-Transient-Universe-HPlay/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link) -This package [hplayground](https://github.com/agocorona/hplayground) is compilable with [GHCJS](https://github.com/ghcjs), the Haskell-to-JavaScript compiler. It is also the Web user interface of [Transient](https://github.com/agocorona/transient). +Axiom (the new name of ghcjs-hplay) is also the Web user interface of [Transient](https://github.com/agocorona/transient). The Web functionality of transient will be called **Axiom**, like the cruise starship of Wall-e. Axiom is made to let you navigate the universe of nodes in the cloud trough your browser while you are comfortably seated in your [hoverchair](https://www.youtube.com/watch?v=uOL2W9JQmo8). -Unlike hplayground, ghcjs-hplay has full integration with Transient and can run widgets that run code on the server, the client or both. +Unlike his predecessor, [hplayground](http://github.com/agocorona/hplayground), Axiom has full integration with Transient and can run widgets that run code on the server, the client or both. +Axiom execute browser widgets that are reactive, can be composed monadically and algebraically (applicative, alternative, monoidal..). At the same time they participate in cloud computations. A widget can execute code in the server and, trough the server, in any node on the cloud using the same cloud primitives defined in transient-universe. The example applications include widgets that perform distributed map-reduce and federated chat servers as well as stream fibonacci numbers from server to client and from client to server. + To see how it integrates with Transient and how to create client-server applications, see the web paragraphs of the [transient tutorial](https://github.com/agocorona/transient/wiki/Transient-tutorial). -To see how to create client side applications and widgets (not yet with full server code integration), look for the [hplayground](https://github.com/agocorona/hplayground) package. +To see how to create client side applications and widgets (with no server code integration), look for [hplayground](https://github.com/agocorona/hplayground) package. [Tutorial](https://www.airpair.com/haskell-tutorial/intro-to-haskell-web-apps) + +Plans: +====== + +Axiom is in the process of becoming a Server-side as well as Client-side library for creating Web application. The last release support page templates for the creation of server-side content. + +In the future it will manage routes in the server side besides client side, and will generate dinamic HTML content in the server as well as in the client.
Setup.lhs view
@@ -1,6 +1,6 @@-#!/usr/bin/runhaskell -> module Main where-> import Distribution.Simple-> main :: IO ()-> main = defaultMain-+#!/usr/bin/runhaskell +> module Main where +> import Distribution.Simple +> main :: IO () +> main = defaultMain +
axiom.cabal view
@@ -1,6 +1,6 @@ name: axiom -version: 0.4.3 +version: 0.4.4 cabal-version: >=1.10 build-type: Simple @@ -11,7 +11,7 @@ homepage: https://github.com/transient-haskell/axiom bug-reports: https://github.com/transient-haskell/axiom/issues -synopsis: Web EDSL running over transient running in browsers and server nodes +synopsis: Web EDSL for running in browsers and server nodes using transient description: Client-and Server-side Haskell framework that compiles to javascript with the GHCJS compiler and run over Transient. See homepage category: Web cabal-version: >=1.10 @@ -23,7 +23,7 @@ source-repository head type: git - location: http://github.com/transient-haskell/axiom + location: http://github.com/agocorona/ghcjs-hplay library build-depends: base > 4.0 && <6.0
src/GHCJS/HPlay/View.hs view
@@ -105,7 +105,7 @@ ) where -import Transient.Internals hiding (input, option, parent, try) +import Transient.Internals hiding (input, option, parent) import Transient.Logged import Transient.Move.Utils import qualified Prelude(id,span,div) @@ -278,6 +278,7 @@ Widget . Transient $ do mn <- getData mrepeat <-getData + liftIO $ print ("IDNUM",mn) when (isJust mn && mrepeat == Just ExecEvent) $ do let IDNUM n = fromJust mn in modify $ \s -> s{mfSequence= n} -- !> ("SET IDMUN", n) @@ -1351,9 +1352,7 @@ -- must be an identifier instead of an DOM element since links may reload the whole page data IdLine= IdLine Int JSString -- deriving(Read,Show) - data ExecMode= ExecEvent deriving (Eq, Read, Show) - execTemplate= unsafePerformIO $ newIORef False