yi-mode-haskell-0.17.1: Yi editor haskell mode

LicenseGPL-2
Maintaineryi-devel@googlegroups.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010
Extensions
  • DeriveFunctor
  • DeriveFoldable

Yi.Syntax.Paren

Description

Parser for Haskell that only cares about parenthesis and layout.

Synopsis

Documentation

type Expr t = [Tree t] Source #

data Tree t Source #

Constructors

Paren t (Expr t) t 
Block [Tree t] 
Atom t 
Error t 
Expr [Tree t] 

Instances

Functor Tree Source # 

Methods

fmap :: (a -> b) -> Tree a -> Tree b #

(<$) :: a -> Tree b -> Tree a #

Foldable Tree Source # 

Methods

fold :: Monoid m => Tree m -> m #

foldMap :: Monoid m => (a -> m) -> Tree a -> m #

foldr :: (a -> b -> b) -> b -> Tree a -> b #

foldr' :: (a -> b -> b) -> b -> Tree a -> b #

foldl :: (b -> a -> b) -> b -> Tree a -> b #

foldl' :: (b -> a -> b) -> b -> Tree a -> b #

foldr1 :: (a -> a -> a) -> Tree a -> a #

foldl1 :: (a -> a -> a) -> Tree a -> a #

toList :: Tree a -> [a] #

null :: Tree a -> Bool #

length :: Tree a -> Int #

elem :: Eq a => a -> Tree a -> Bool #

maximum :: Ord a => Tree a -> a #

minimum :: Ord a => Tree a -> a #

sum :: Num a => Tree a -> a #

product :: Num a => Tree a -> a #

IsTree Tree Source # 

Methods

subtrees :: Tree t -> [Tree t] #

uniplate :: Tree t -> ([Tree t], [Tree t] -> Tree t) #

emptyNode :: Tree t #

Show t => Show (Tree t) Source # 

Methods

showsPrec :: Int -> Tree t -> ShowS #

show :: Tree t -> String #

showList :: [Tree t] -> ShowS #

getIndentingSubtree :: Tree TT -> Point -> Int -> Maybe (Tree TT) Source #

Search the given list, and return the 1st tree after the given point on the given line. This is the tree that will be moved if something is inserted at the point. Precondition: point is in the given line.

getSubtreeSpan :: Tree TT -> (Point, Int) Source #

Given a tree, return (first offset, number of lines).

parse' :: (TT -> Token) -> (Token -> TT) -> P TT [Tree TT] Source #

errTok :: Parser (Tok t) (Tok Token) Source #

Create a special error token. (e.g. fill in where there is no correct token to parse) Note that the position of the token has to be correct for correct computation of node spans.