-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Stick your haskell variables into javascript/coffeescript at compile time.
--   
--   Shakespeare is a template family for type-safe, efficient templates
--   with simple variable interpolation . Shakespeare templates can be used
--   inline with a quasi-quoter or in an external file. Shakespeare
--   interpolates variables according to the type being inserted. In this
--   case, the variable type needs a ToJavascript instance.
--   
--   There is also shakespeare-coffeescript for coffeescript templates.
--   Coffescript is a language that compiles down to javascript. It expects
--   a coffeescript compiler in your path, and variable should be a
--   ToCoffee instance. And we even have a Roy template for the adventorous
--   FP addicts.
--   
--   Please see
--   http:<i></i>www.yesodweb.com<i>book</i>shakespearean-templates for a
--   more thorough description and examples
--   
--   shakespeare-js was originally called julius, and shakespeare
--   originated from the hamlet template package.
@package shakespeare-js
@version 1.1.0


-- | A Shakespearean module for Javascript templates, introducing
--   type-safe, compile-time variable and url interpolation.-- To use this
--   module, <tt>coffee</tt> must be installed on your system.
--   
--   You might consider trying <a>Coffee</a>, which compiles down to
--   Javascript.
--   
--   Further reading: <a>http://www.yesodweb.com/book/templates</a>
module Text.Julius
js :: QuasiQuoter
julius :: QuasiQuoter
juliusFile :: FilePath -> Q Exp
jsFile :: FilePath -> Q Exp

-- | <i>Deprecated: Please use juliusFileReload instead. </i>
juliusFileDebug :: FilePath -> Q Exp

-- | <i>Deprecated: Please use jsFileReload instead. </i>
jsFileDebug :: FilePath -> Q Exp
juliusFileReload :: FilePath -> Q Exp
jsFileReload :: FilePath -> Q Exp

-- | Return type of template-reading functions.
type JavascriptUrl url = (url -> [(Text, Text)] -> Text) -> Javascript

-- | Newtype wrapper of <a>Builder</a>.
newtype Javascript
Javascript :: Builder -> Javascript
unJavascript :: Javascript -> Builder
newtype RawJavascript
RawJavascript :: Builder -> RawJavascript

-- | A typeclass for types that can be interpolated in CoffeeScript
--   templates.
class ToJavascript a
toJavascript :: ToJavascript a => a -> Builder
class RawJS a
rawJS :: RawJS a => a -> RawJavascript
renderJavascript :: Javascript -> Text

-- | render with route interpolation. If using this module standalone,
--   apart from type-safe routes, a dummy renderer can be used:
--   
--   <pre>
--   renderJavascriptUrl (\_ _ -&gt; undefined) javascriptUrl
--   </pre>
--   
--   When using Yesod, a renderer is generated for you, which can be
--   accessed within the GHandler monad: <a>getUrlRenderParams</a>.
renderJavascriptUrl :: (url -> [(Text, Text)] -> Text) -> JavascriptUrl url -> Text
javascriptSettings :: Q ShakespeareSettings

-- | Determine which identifiers are used by the given template, useful for
--   creating systems like yesod devel.
juliusUsedIdentifiers :: String -> [(Deref, VarType)]
instance Monoid Javascript
instance RawJS Builder
instance RawJS Text
instance RawJS Text
instance RawJS [Char]
instance ToJavascript RawJavascript
instance ToJavascript Value


-- | A Shakespearean module for CoffeeScript, introducing type-safe,
--   compile-time variable and url interpolation. It is exactly the same as
--   <a>Text.Julius</a>, except that the template is first compiled to
--   Javascript with the system tool <tt>coffee</tt>.
--   
--   To use this module, <tt>coffee</tt> must be installed on your system.
--   
--   <tt>#{...}</tt> is the Shakespearean standard for variable
--   interpolation, but CoffeeScript already uses that sequence for string
--   interpolation. Therefore, Shakespearean interpolation is introduced
--   with <tt>%{...}</tt>.
--   
--   Further reading:
--   
--   <ol>
--   <li>Shakespearean templates:
--   <a>http://www.yesodweb.com/book/templates</a></li>
--   <li>CoffeeScript: <a>http://coffeescript.org/</a></li>
--   </ol>
module Text.Coffee

-- | Read inline, quasiquoted CoffeeScript.
coffee :: QuasiQuoter

-- | Read in a CoffeeScript template file. This function reads the file
--   once, at compile time.
coffeeFile :: FilePath -> Q Exp

-- | Read in a CoffeeScript template file. This impure function uses
--   unsafePerformIO to re-read the file on every call, allowing for rapid
--   iteration.
coffeeFileReload :: FilePath -> Q Exp

-- | Deprecated synonym for <a>coffeeFileReload</a>

-- | <i>Deprecated: Please use coffeeFileReload instead. </i>
coffeeFileDebug :: FilePath -> Q Exp


-- | A Shakespearean module for Roy, introducing type-safe, compile-time
--   variable and url interpolation. It is exactly the same as
--   <a>Text.Julius</a>, except that the template is first compiled to
--   Javascript with the system tool <tt>roy</tt>.
--   
--   To use this module, <tt>roy</tt> must be installed on your system.
--   
--   <tt>#{...}</tt> is the Shakespearean standard for variable
--   interpolation, but CoffeeScript already uses that sequence for string
--   interpolation. Therefore, it seems more future-proof to use
--   <tt>%{...}</tt> for interpolation
--   
--   Integration with Roy is a bit rough right now. You can only perorm a
--   shakespeare insertion inside a Roy string. This should work well for
--   urls and strings. Otherwise you should stick your Haskell into Julius
--   as a window variable, and then retrieve it in your Roy code.
--   
--   Further reading:
--   
--   <ol>
--   <li>Shakespearean templates:
--   <a>http://www.yesodweb.com/book/templates</a></li>
--   <li>Roy: <a>http://http://roy.brianmckenna.org/</a></li>
--   </ol>
module Text.Roy

-- | Read inline, quasiquoted Roy.
roy :: QuasiQuoter

-- | Read in a Roy template file. This function reads the file once, at
--   compile time.
royFile :: FilePath -> Q Exp

-- | Read in a Roy template file. This impure function uses unsafePerformIO
--   to re-read the file on every call, allowing for rapid iteration.
royFileReload :: FilePath -> Q Exp
