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

Safe Haskell | None

Text.Shakespeare.Base

Description

General parsers, functions and datatypes for all Shakespeare languages.

# Documentation

data Deref Source

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 |
Typeable Deref |
Lift Deref |

newtype Ident Source

Constructors

Ident String |

Instances

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

type Scope = [(Ident, Exp)]Source

parseDeref :: Parser Deref Source

parseHash :: Parser (Either String Deref)Source

parseVar :: Char -> Parser (Either String Deref)Source

parseVarString :: Char -> Parser (Either String String)Source

parseAt :: Parser (Either String (Deref, Bool))Source

parseUrl :: Char -> Char -> Parser (Either String (Deref, Bool))Source

parseUrlString :: Char -> Char -> Parser (Either String String)Source

parseCaret :: Parser (Either String Deref)Source

parseUnder :: Parser (Either String Deref)Source

parseInt :: Char -> Parser (Either String Deref)Source

parseIntString :: Char -> Parser (Either String String)Source

derefToExp :: Scope -> Deref -> Exp Source

flattenDeref :: Deref -> Maybe [String]Source

readUtf8File :: FilePath -> IO Text Source