Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Error = MultipleFunctionDeclaration String [Posn]
- data Warning = UnreachableCode Posn
- data Report
- verify :: Tree TT -> Writer (DList Report) ()
- checkMultipleFuns :: [Statement TT] -> Writer (DList Report) ()
- checkUnreachable :: [Statement TT] -> Writer (DList Report) ()
- ttEq :: Eq t => Tok t -> Tok t -> Bool
- say :: MonadWriter (DList a) m => a -> m ()
- isReturn :: Statement t -> Bool
- findFunctions :: [Statement t] -> [Statement t]
- funName :: Statement t -> t
- funBody :: Statement t -> [Statement t]
- nameOf :: Token -> String
- dropWhile' :: (a -> Bool) -> [a] -> [a]
- dupsBy :: (a -> a -> Bool) -> [a] -> [a]
Types
Instances
Main code
verify :: Tree TT -> Writer (DList Report) () Source #
The main verifier which calls the sub-verifiers.
checkMultipleFuns :: [Statement TT] -> Writer (DList Report) () Source #
Given a list of function declarations, checks for multiple function declarations, including the functions' subfunctions.
Helper functions
say :: MonadWriter (DList a) m => a -> m () Source #
findFunctions :: [Statement t] -> [Statement t] Source #
Returns a list of the functions in the given block.
Misc
dropWhile' :: (a -> Bool) -> [a] -> [a] Source #
Like dropWhile
but drops the first element in the result.