olwrapper-0.3.7.5: snaplets/fay/src/Index.hs
{-# 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