Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Text.Shakespeare.Base
Description
General parsers, functions and datatypes for all Shakespeare languages.
Synopsis
- data Deref
- = DerefModulesIdent [String] Ident
- | DerefIdent Ident
- | DerefIntegral Integer
- | DerefRational Rational
- | DerefString String
- | DerefBranch Deref Deref
- | DerefList [Deref]
- | DerefTuple [Deref]
- | DerefGetField Deref String
- newtype Ident = Ident String
- 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
- readUtf8FileString :: FilePath -> IO String
- readFileQ :: FilePath -> Q String
- readFileRecompileQ :: FilePath -> Q String
Documentation
Constructors
DerefModulesIdent [String] Ident | |
DerefIdent Ident | |
DerefIntegral Integer | |
DerefRational Rational | |
DerefString String | |
DerefBranch Deref Deref | |
DerefList [Deref] | |
DerefTuple [Deref] | |
DerefGetField Deref String | Record field access via Since: 2.1.0 |
Instances
Data Deref Source # | |
Defined in Text.Shakespeare.Base 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 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 :: forall r r'. (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 | |
Read Deref Source # | |
Defined in Text.Shakespeare.Base | |
Show Deref Source # | |
Eq Deref Source # | |
Ord Deref Source # | |
Lift Deref Source # | |
Constructors
Ident String |
Instances
Data Ident Source # | |
Defined in Text.Shakespeare.Base 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 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 :: forall r r'. (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 | |
Read Ident Source # | |
Defined in Text.Shakespeare.Base | |
Show Ident Source # | |
Eq Ident Source # | |
Ord Ident Source # | |
Lift Ident Source # | |
parseDeref :: UserParser a Deref Source #
parseVarString :: Char -> UserParser a (Either String String) Source #
parseUrlString :: Char -> Char -> UserParser a (Either String String) Source #
parseCaret :: UserParser a (Either String Deref) Source #
parseUnder :: UserParser a (Either String Deref) Source #
parseIntString :: Char -> UserParser a (Either String String) Source #
derefToExp :: Scope -> Deref -> Exp Source #
flattenDeref :: Deref -> Maybe [String] Source #
readUtf8File :: FilePath -> IO Text Source #
readUtf8FileString :: FilePath -> IO String Source #
Read file's content as String
, converting newlines
Since: 2.0.19
readFileRecompileQ :: FilePath -> Q String Source #
Embed file's content, converting newlines and track file via ghc dependencies, recompiling on changes
Since: 2.0.19