haskell-template-task-0.2: A task type for haskell tasks developed for the e-learning platform Autotool
Safe HaskellSafe-Inferred
LanguageHaskell2010

Haskell.Template.Match

Synopsis

Documentation

data Where Source #

Instances

Instances details
Show Where Source # 
Instance details

Defined in Haskell.Template.Match

Methods

showsPrec :: Int -> Where -> ShowS #

show :: Where -> String #

showList :: [Where] -> ShowS #

Eq Where Source # 
Instance details

Defined in Haskell.Template.Match

Methods

(==) :: Where -> Where -> Bool #

(/=) :: Where -> Where -> Bool #

Ord Where Source # 
Instance details

Defined in Haskell.Template.Match

Methods

compare :: Where -> Where -> Ordering #

(<) :: Where -> Where -> Bool #

(<=) :: Where -> Where -> Bool #

(>) :: Where -> Where -> Bool #

(>=) :: Where -> Where -> Bool #

max :: Where -> Where -> Where #

min :: Where -> Where -> Where #

data What Source #

Instances

Instances details
Show What Source # 
Instance details

Defined in Haskell.Template.Match

Methods

showsPrec :: Int -> What -> ShowS #

show :: What -> String #

showList :: [What] -> ShowS #

Eq What Source # 
Instance details

Defined in Haskell.Template.Match

Methods

(==) :: What -> What -> Bool #

(/=) :: What -> What -> Bool #

Ord What Source # 
Instance details

Defined in Haskell.Template.Match

Methods

compare :: What -> What -> Ordering #

(<) :: What -> What -> Bool #

(<=) :: What -> What -> Bool #

(>) :: What -> What -> Bool #

(>=) :: What -> What -> Bool #

max :: What -> What -> What #

min :: What -> What -> What #

data Result a Source #

Constructors

Continue 
Fail [Location] 
Ok a 

Instances

Instances details
Show a => Show (Result a) Source # 
Instance details

Defined in Haskell.Template.Match

Methods

showsPrec :: Int -> Result a -> ShowS #

show :: Result a -> String #

showList :: [Result a] -> ShowS #

Eq a => Eq (Result a) Source # 
Instance details

Defined in Haskell.Template.Match

Methods

(==) :: Result a -> Result a -> Bool #

(/=) :: Result a -> Result a -> Bool #

Ord a => Ord (Result a) Source # 
Instance details

Defined in Haskell.Template.Match

Methods

compare :: Result a -> Result a -> Ordering #

(<) :: Result a -> Result a -> Bool #

(<=) :: Result a -> Result a -> Bool #

(>) :: Result a -> Result a -> Bool #

(>=) :: Result a -> Result a -> Bool #

max :: Result a -> Result a -> Result a #

min :: Result a -> Result a -> Result a #

newtype M a Source #

Constructors

M 

Fields

Instances

Instances details
Alternative M Source # 
Instance details

Defined in Haskell.Template.Match

Methods

empty :: M a #

(<|>) :: M a -> M a -> M a #

some :: M a -> M [a] #

many :: M a -> M [a] #

Applicative M Source # 
Instance details

Defined in Haskell.Template.Match

Methods

pure :: a -> M a #

(<*>) :: M (a -> b) -> M a -> M b #

liftA2 :: (a -> b -> c) -> M a -> M b -> M c #

(*>) :: M a -> M b -> M b #

(<*) :: M a -> M b -> M a #

Functor M Source # 
Instance details

Defined in Haskell.Template.Match

Methods

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

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

Monad M Source # 
Instance details

Defined in Haskell.Template.Match

Methods

(>>=) :: M a -> (a -> M b) -> M b #

(>>) :: M a -> M b -> M b #

return :: a -> M a #

MonadPlus M Source # 
Instance details

Defined in Haskell.Template.Match

Methods

mzero :: M a #

mplus :: M a -> M a -> M a #

highlight_ssi :: SrcSpanInfo -> Int -> String -> [String] Source #

underline the part of the input that is in the span, and add some lines of contexts before and after. Returns lines.

type Decl' l b = (DeclarationKind l, b) Source #

partitionByKind :: Ord l => [Decl' l b] -> ([Decl' l b], [Decl' l b], [Decl' l b]) Source #

failLoc :: forall a. M a Source #

continue :: forall a. M a Source #

matchUndef :: forall a. Maybe (Exp a) -> Bool Source #

matchSrcSpanInfoSub :: (Data a, Data b) => What -> a -> b -> M () Source #

Stores src span locations in state. In contrast to matchSrcSpanInfo it checks also arguments of constructors for existing SrcSpanInfo. (uses matchSrcSpanInfo)

withCast :: (Data a, Data b, Data t1, Data t2) => (t1 -> t2 -> [Location]) -> a -> b -> M c Source #

match :: Data a => What -> a -> GenericM M Source #

matchLocation :: (Data a, Data b) => What -> a -> b -> [Location] Source #

test :: Module SrcSpanInfo -> Module SrcSpanInfo -> Result () Source #

test whether m2 is a suitable template for m1 in case of an error, the returned '[Location]' gives the mismatching positions in the template

gzipWithM' :: Monad m => GenericQ (GenericM m) -> GenericQ (GenericM m) Source #

Twin map for monadic transformation

Unlike gzipWithM, process constructor arguments from left to right.

gmapAccumM' :: forall a d m. (Data d, Monad m) => (forall e. Data e => a -> e -> (a, m e)) -> a -> d -> (a, m d) Source #

gmapM with accumulation

Unlike gmapAccumM, process constructor arguments from left to right.