Text.Shakespeare.Base

shakespeare-2.0.8: A toolkit for making compile-time interpolated templates

Safe Haskell | None
Language | Haskell98

Text.Shakespeare.Base

Description

General parsers, functions and datatypes for all Shakespeare languages.

# Documentation

data Deref

Constructors

DerefModulesIdent [String] Ident |
DerefIdent Ident |
DerefIntegral Integer |
DerefRational Rational |
DerefString String |
DerefBranch Deref Deref |
DerefList [Deref] |
DerefTuple [Deref] |

Instances

Eq Deref |
Data Deref |
Ord Deref |
Read Deref |
Show Deref |
Lift Deref |

newtype Ident

Constructors

Ident String |

Instances

Eq Ident |
Data Ident |
Ord Ident |
Read Ident |
Show Ident |
Lift Ident |

type Scope = [(Ident, Exp)]

parseDeref :: UserParser a Deref

parseHash :: UserParser a (Either String Deref)

parseVar :: Char -> UserParser a (Either String Deref)

parseVarString :: Char -> UserParser a (Either String String)

parseAt :: UserParser a (Either String (Deref, Bool))

parseUrl :: Char -> Char -> UserParser a (Either String (Deref, Bool))

parseUrlString :: Char -> Char -> UserParser a (Either String String)

parseCaret :: UserParser a (Either String Deref)

parseUnder :: UserParser a (Either String Deref)

parseInt :: Char -> UserParser a (Either String Deref)

parseIntString :: Char -> UserParser a (Either String String)

derefToExp :: Scope -> Deref -> Exp

flattenDeref :: Deref -> Maybe [String]

readUtf8File :: FilePath -> IO Text