shakespeare-2.0.11.2: 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 # |
Methods (==) :: Deref -> Deref -> Bool # (/=) :: Deref -> Deref -> Bool #
Data Deref # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Deref -> c Deref # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Deref # toConstr :: Deref -> Constr # dataTypeOf :: Deref -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Deref) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Deref) # gmapT :: (forall b. Data b => b -> b) -> Deref -> Deref # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Deref -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Deref -> r # gmapQ :: (forall d. Data d => d -> u) -> Deref -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Deref -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Deref -> m Deref # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Deref -> m Deref # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Deref -> m Deref #
Ord Deref # |
Methods compare :: Deref -> Deref -> Ordering # (<) :: Deref -> Deref -> Bool # (<=) :: Deref -> Deref -> Bool # (>) :: Deref -> Deref -> Bool # (>=) :: Deref -> Deref -> Bool # max :: Deref -> Deref -> Deref # min :: Deref -> Deref -> Deref #
Read Deref # |
Methods readsPrec :: Int -> ReadS Deref # readList :: ReadS [Deref] # readPrec :: ReadPrec Deref # readListPrec :: ReadPrec [Deref] #
Show Deref # |
Methods showsPrec :: Int -> Deref -> ShowS # show :: Deref -> String # showList :: [Deref] -> ShowS #
Lift Deref # |
Methods lift :: Deref -> Q Exp #

newtype Ident #

Constructors

Ident String |

Instances

Eq Ident # |
Methods (==) :: Ident -> Ident -> Bool # (/=) :: Ident -> Ident -> Bool #
Data Ident # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ident -> c Ident # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Ident # toConstr :: Ident -> Constr # dataTypeOf :: Ident -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Ident) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Ident) # gmapT :: (forall b. Data b => b -> b) -> Ident -> Ident # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ident -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ident -> r # gmapQ :: (forall d. Data d => d -> u) -> Ident -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Ident -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ident -> m Ident # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ident -> m Ident # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ident -> m Ident #
Ord Ident # |
Methods compare :: Ident -> Ident -> Ordering # (<) :: Ident -> Ident -> Bool # (<=) :: Ident -> Ident -> Bool # (>) :: Ident -> Ident -> Bool # (>=) :: Ident -> Ident -> Bool # max :: Ident -> Ident -> Ident # min :: Ident -> Ident -> Ident #
Read Ident # |
Methods readsPrec :: Int -> ReadS Ident # readList :: ReadS [Ident] # readPrec :: ReadPrec Ident # readListPrec :: ReadPrec [Ident] #
Show Ident # |
Methods showsPrec :: Int -> Ident -> ShowS # show :: Ident -> String # showList :: [Ident] -> ShowS #
Lift Ident # |
Methods lift :: Ident -> Q Exp #

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 #