ede-0.3.2.0: Templating language with similar syntax and features to Liquid or Jinja2.
Copyright(c) 2013-2020 Brendan Hay <brendan.g.hay@gmail.com>
LicenseThis Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. A copy of the MPL can be found in the LICENSE file or you can obtain it at http://mozilla.org/MPL/2.0/.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityexperimental
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Text.EDE.Internal.Quoting

Description

Warning: this is an internal module, and does not have a stable API or name. Functions in this module may not check or enforce preconditions expected by public modules. Use at your own risk!

Synopsis

Documentation

data Term Source #

A HOAS representation of (possibly partially applied) values in the environment.

Constructors

TVal !Value 
TLam (Term -> Result Term) 

Instances

Instances details
AnsiPretty Term Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

apretty :: Term -> AnsiDoc Source #

Quote Term Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

quote :: Id -> Int -> Term -> Term Source #

qapply :: Delta -> Term -> Term -> Result Term Source #

Fully apply two Terms.

qprim :: (ToJSON a, Quote a) => a -> Term Source #

Quote a primitive Value from the top-level.

class Unquote a where Source #

Minimal complete definition

Nothing

Methods

unquote :: Id -> Int -> Term -> Result a Source #

default unquote :: FromJSON a => Id -> Int -> Term -> Result a Source #

Instances

Instances details
Unquote Bool Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

unquote :: Id -> Int -> Term -> Result Bool Source #

Unquote Double Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

unquote :: Id -> Int -> Term -> Result Double Source #

Unquote Int Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

unquote :: Id -> Int -> Term -> Result Int Source #

Unquote Integer Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

unquote :: Id -> Int -> Term -> Result Integer Source #

Unquote Scientific Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

unquote :: Id -> Int -> Term -> Result Scientific Source #

Unquote Text Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

unquote :: Id -> Int -> Term -> Result Text Source #

Unquote Object Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

unquote :: Id -> Int -> Term -> Result Object Source #

Unquote Array Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

unquote :: Id -> Int -> Term -> Result Array Source #

Unquote Value Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

unquote :: Id -> Int -> Term -> Result Value Source #

Unquote Text Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

unquote :: Id -> Int -> Term -> Result Text Source #

Unquote Collection Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

unquote :: Id -> Int -> Term -> Result Collection Source #

Unquote [Text] Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

unquote :: Id -> Int -> Term -> Result [Text] Source #

class Quote a where Source #

Minimal complete definition

Nothing

Methods

quote :: Id -> Int -> a -> Term Source #

default quote :: ToJSON a => Id -> Int -> a -> Term Source #

Instances

Instances details
Quote Bool Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

quote :: Id -> Int -> Bool -> Term Source #

Quote Double Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

quote :: Id -> Int -> Double -> Term Source #

Quote Int Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

quote :: Id -> Int -> Int -> Term Source #

Quote Integer Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

quote :: Id -> Int -> Integer -> Term Source #

Quote Builder Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

quote :: Id -> Int -> Builder -> Term Source #

Quote Scientific Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

quote :: Id -> Int -> Scientific -> Term Source #

Quote Text Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

quote :: Id -> Int -> Text -> Term Source #

Quote Object Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

quote :: Id -> Int -> Object -> Term Source #

Quote Array Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

quote :: Id -> Int -> Array -> Term Source #

Quote Value Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

quote :: Id -> Int -> Value -> Term Source #

Quote Text Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

quote :: Id -> Int -> Text -> Term Source #

Quote Term Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

quote :: Id -> Int -> Term -> Term Source #

Quote [Text] Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

quote :: Id -> Int -> [Text] -> Term Source #

Quote [Value] Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

quote :: Id -> Int -> [Value] -> Term Source #

(Unquote a, Quote b) => Quote (a -> b) Source # 
Instance details

Defined in Text.EDE.Internal.Quoting

Methods

quote :: Id -> Int -> (a -> b) -> Term Source #

argumentErr :: Pretty a => Id -> Int -> a -> Result b Source #