Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
AST-path is a representation for predicting program properties.
Synopsis
- type HalfPath = [String]
- type ASTPath = (String, HalfPath, HalfPath)
- toList :: ASTPath -> [String]
- astPath :: AST a => a -> [ASTPath]
- class AST a where
- astPathWithHalf :: a -> String -> ([ASTPath], [HalfPath])
- treePath :: forall a. (Generic a, AST' (Rep a)) => a -> String -> ([ASTPath], [HalfPath])
- terminalPath :: (a -> String) -> a -> String -> ([ASTPath], [HalfPath])
- nullPath :: a -> String -> ([ASTPath], [HalfPath])
- class AST' f where
- astPathWithHalf' :: f a -> String -> ([ASTPath], [HalfPath])
Documentation
Typeclass for tree or terminal node.
treePath :: forall a. (Generic a, AST' (Rep a)) => a -> String -> ([ASTPath], [HalfPath]) Source #
Default implementation for tree type.
terminalPath :: (a -> String) -> a -> String -> ([ASTPath], [HalfPath]) Source #
Typical implementation for terminal node type.
nullPath :: a -> String -> ([ASTPath], [HalfPath]) Source #
No path implementation for auxiliary data type.
Class of generic representation types that can be parsed into paths.
astPathWithHalf' :: f a -> String -> ([ASTPath], [HalfPath]) Source #
Default implementation for generic instances of AST
.
Instances
AST' (V1 :: Type -> Type) Source # | |
Defined in Data.ASTPath | |
AST' (U1 :: Type -> Type) Source # | |
Defined in Data.ASTPath | |
AST a => AST' (K1 i a :: Type -> Type) Source # | |
Defined in Data.ASTPath | |
(AST' f, AST' g) => AST' (f :+: g) Source # | |
Defined in Data.ASTPath | |
(AST' f, AST' g) => AST' (f :*: g) Source # | |
Defined in Data.ASTPath | |
(AST' f, Datatype d) => AST' (D1 d f) Source # | |
Defined in Data.ASTPath | |
(AST' f, Constructor c) => AST' (C1 c f) Source # | |
Defined in Data.ASTPath | |
(AST' f, Selector s) => AST' (S1 s f) Source # | |
Defined in Data.ASTPath |