Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type AST a = [Decl a]
- data Decl a = Decl a Span String (Expr a)
- data Expr a
- exBasic :: String
- exPrettier :: String
- exComment :: String
- exPaper :: String
- refactorZero :: AST Bool -> AST Bool
- exprReprinter :: Reprinting String Identity
- prettyExpr :: Expr a -> String
- refactor :: String -> String
- commentPrinter :: Reprinting String (State [(String, Int)])
- eval :: Expr a -> State [(String, Int)] (Maybe Int)
- refactorComment :: String -> String
- parse :: String -> AST Bool
- type Parser = State (String, Position)
- parseDecl :: Parser (AST Bool)
- commentPrefix :: String -> Maybe (String, String)
- parseExpr :: Parser (Expr Bool)
- getPos :: Parser Position
- many :: (Char -> Bool) -> Parser String
- spaces :: Parser String
- char :: Char -> Parser ()
- charP :: Char -> Parser Bool
- peekChar :: (Char -> Bool) -> Parser Bool
Documentation
Instances
Eq a => Eq (Decl a) Source # | |
Data a => Data (Decl a) Source # | |
Defined in Text.Reprinter.Example gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Decl a -> c (Decl a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Decl a) # toConstr :: Decl a -> Constr # dataTypeOf :: Decl a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Decl a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Decl a)) # gmapT :: (forall b. Data b => b -> b) -> Decl a -> Decl a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Decl a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Decl a -> r # gmapQ :: (forall d. Data d => d -> u) -> Decl a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Decl a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Decl a -> m (Decl a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Decl a -> m (Decl a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Decl a -> m (Decl a) # | |
Show a => Show (Decl a) Source # | |
Instances
Eq a => Eq (Expr a) Source # | |
Data a => Data (Expr a) Source # | |
Defined in Text.Reprinter.Example gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Expr a -> c (Expr a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Expr a) # toConstr :: Expr a -> Constr # dataTypeOf :: Expr a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Expr a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Expr a)) # gmapT :: (forall b. Data b => b -> b) -> Expr a -> Expr a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Expr a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Expr a -> r # gmapQ :: (forall d. Data d => d -> u) -> Expr a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Expr a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Expr a -> m (Expr a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr a -> m (Expr a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Expr a -> m (Expr a) # | |
Show a => Show (Expr a) Source # | |
Refactorable (Expr Bool) Source # | |
Defined in Text.Reprinter.Example |
exPrettier :: String Source #
prettyExpr :: Expr a -> String Source #
Print an expression in canonical string form.
refactor :: String -> String Source #
Parse and refactor, then run the reprinter with the original source and updated AST.
commentPrinter :: Reprinting String (State [(String, Int)]) Source #
refactorComment :: String -> String Source #