yesod-purescript-0.0.4.1: PureScript integration for Yesod

Safe HaskellNone
LanguageHaskell98

Yesod.PureScript

Synopsis

Documentation

data PureScriptSite Source

Yesod sub site for PureScript.

Instances

RenderRoute PureScriptSite 
ParseRoute PureScriptSite 
RouteAttrs PureScriptSite 
YesodPureScript master => YesodSubDispatch PureScriptSite (HandlerT master IO)

All things that are "YesodPureScript master", are also this other thing, because they nobody knows, because TH.

Eq (Route PureScriptSite) 
Read (Route PureScriptSite) 
Show (Route PureScriptSite) 
data Route PureScriptSite = PureScriptCompiledR Texts 

class Yesod master => YesodPureScript master Source

Things that are Yesod master can also be YesodPureScript master.

data YesodPureScriptOptions Source

Options for Yesod PureScript.

Constructors

YesodPureScriptOptions 

Fields

ypsoMode :: Mode

Mode of compilation: dynamic or static.

ypsoSourceDirectories :: [Text]

Source directories to look for ".purs" files.

ypsoCompileOptions :: [CompileOptions]

Defines what and how to compile.

ypsoErrorDivId :: Maybe Text

Optionally specifies div id in parent page that will be used to display compilation error if any. This is because usually resulting JS is loaded by HTML page, and it might save a time (esp for trivial errors) if error is displayed directly in HTML.

ypsoVerboseErrors :: Bool

Option passed to PureScript compiler, makes errors verbose.

Instances

Default YesodPureScriptOptions

YesodPureScriptOptions thing is also Data.Default.Default, because it has "def", which is defaultYesodPureScriptOptions.

createYesodPureScriptSite :: YesodPureScriptOptions -> IO PureScriptSite Source

Create pure script site. Initialises MVar of compiled modules to empty map.

defaultYesodPureScriptOptions :: YesodPureScriptOptions Source

Default options for YesodPureScript. Needed when creating PureScriptSite. Please don't create YesodPureScriptOptions by calling constructor directly, so I can add more options without breaking your code.

getPureScriptRoute :: [Text] -> Route PureScriptSite Source

For convenience: turns a path as list into a route.