packages feed

ghcjs-dom-hello (empty) → 1.0.0.0

raw patch · 4 files changed

+71/−0 lines, 4 filesdep +basedep +ghcjs-domsetup-changed

Dependencies added: base, ghcjs-dom

Files

+ LICENSE view
@@ -0,0 +1,23 @@+The MIT License (MIT)++Copyright (c) 2014 Hamish Mackenzie++Permission is hereby granted, free of charge, to any person obtaining+a copy of this software and associated documentation files (the+"Software"), to deal in the Software without restriction, including+without limitation the rights to use, copy, modify, merge, publish,+distribute, sublicense, and/or sell copies of the Software, and to+permit persons to whom the Software is furnished to do so, subject to+the following conditions:++The above copyright notice and this permission notice shall be+included in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.+
+ Setup.hs view
@@ -0,0 +1,6 @@+module Main (main) where++import Distribution.Simple++main :: IO ()+main = defaultMain
+ ghcjs-dom-hello.cabal view
@@ -0,0 +1,30 @@+name: ghcjs-dom-hello+version: 1.0.0.0+cabal-version: >=1.6+build-type: Simple+license: MIT+license-file: LICENSE+copyright: (c) Hamish Mackenzie+maintainer: Hamish Mackenzie <Hamish.K.Mackenzie@gmail.com>+stability: stable+homepage: https://github.com/ghcjs/ghcjs-dom-hello+bug-reports: https://github.com/ghcjs/ghcjs-dom-hello/issues+synopsis: GHCJS DOM Hello World, an example package+description: This is an implementation of the classic "Hello World" program using GHCJS DOM,+             as an example of how to create a minimal GHCJS DOM application.+             Please submit any suggestions and improvements.+category: Web+author: Hamish Mackenzie+data-dir: ""+ +source-repository head+    type: git+    location: https://github.com/ghcjs/ghcjs-dom-hello+ +executable ghcjs-dom-hello+    build-depends: base >=4.2 && <5, ghcjs-dom >=0.0.7 && <0.1+    main-is: Main.hs+    buildable: True+    hs-source-dirs: src+ + 
+ src/Main.hs view
@@ -0,0 +1,12 @@+module Main (+    main+) where++import GHCJS.DOM (webViewGetDomDocument, runWebGUI)+import GHCJS.DOM.Document (documentGetBody)+import GHCJS.DOM.HTMLElement (htmlElementSetInnerHTML)++main = runWebGUI $ \ webView -> do+    Just doc <- webViewGetDomDocument webView+    Just body <- documentGetBody doc+    htmlElementSetInnerHTML body "<h1>Hello World</h1>"