packages feed

olwrapper 0.3.7.4 → 0.3.7.5

raw patch · 2 files changed

+30/−2 lines, 2 files

Files

olwrapper.cabal view
@@ -1,5 +1,5 @@ Name:           olwrapper-Version:        0.3.7.4+Version:        0.3.7.5 Synopsis:       An OpenLayers JavaScript Wrapper and Webframework with snaplet-fay Description:    test Author:         Thomas Edelmann@@ -28,6 +28,7 @@   other-modules:     Tutorial.OlApp     Tutorial.Traffic+    Index     Application     Main     Site@@ -35,7 +36,8 @@   build-depends:            fay-base                  == 0.19.4.1  ,     fay-text                  == 0.3.2     ,-    fay-jquery                == 0.6.0.2   +    fay-jquery                == 0.6.0.2   ,+    snaplet-fay               >= 0.3         executable olwrapper   hs-source-dirs:      src, snaplets/fay/src
+ snaplets/fay/src/Index.hs view
@@ -0,0 +1,26 @@+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE RebindableSyntax  #-}+{-# LANGUAGE EmptyDataDecls    #-}+{-# OPTIONS -Wall -fno-warn-name-shadowing -fno-warn-unused-do-bind #-}++module Index where++import           Prelude          hiding (void)+import           JQuery           hiding (Element)+import           Fay.Text                (Text, fromString)+import           FFI+import           OpenLayers -- include OpenLayers, to wrap the OlApp+++addOnload :: Fay f -> Fay ()+addOnload = ffi "window.addEventListener(\"load\", %1)"++main :: Fay ()+main = addOnload onload++void :: Fay f -> Fay ()+void f = f >> return ()++onload :: Fay ()+onload = void $ do+  olwrapperLoad  -- include OpenLayers