{-# LANGUAGE CPP, DeriveDataTypeable, FlexibleInstances, DeriveFunctor #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Language.Haskell.Exts.Parser
(
Parseable(parse, parseWithMode, parseWithComments)
, ParseMode(..), defaultParseMode, ParseResult(..), fromParseResult
, parseModule, parseModuleWithMode, parseModuleWithComments
, parseExp, parseExpWithMode, parseExpWithComments
, parseStmt, parseStmtWithMode, parseStmtWithComments
, parsePat, parsePatWithMode, parsePatWithComments
, parseDecl, parseDeclWithMode, parseDeclWithComments
, parseType, parseTypeWithMode, parseTypeWithComments
, parseImportDecl, parseImportDeclWithMode, parseImportDeclWithComments
, NonGreedy(..)
, ListOf(..), unListOf
, getTopPragmas
, PragmasAndModuleName(..)
, PragmasAndModuleHead(..)
, ModuleHeadAndImports(..)
) where
import Data.Data hiding (Fixity)
import Language.Haskell.Exts.Fixity
import Language.Haskell.Exts.Syntax
import Language.Haskell.Exts.Comments
import Language.Haskell.Exts.InternalParser
import Language.Haskell.Exts.ParseMonad
import Language.Haskell.Exts.SrcLoc
instance Parseable (Decl SrcSpanInfo) where parser :: Maybe [Fixity] -> P (Decl SrcSpanInfo)
parser = P (Decl SrcSpanInfo) -> Maybe [Fixity] -> P (Decl SrcSpanInfo)
forall (a :: * -> *).
AppFixity a =>
P (a SrcSpanInfo) -> Maybe [Fixity] -> P (a SrcSpanInfo)
normalParser P (Decl SrcSpanInfo)
mparseDecl
instance Parseable (Exp SrcSpanInfo) where parser :: Maybe [Fixity] -> P (Exp SrcSpanInfo)
parser = P (Exp SrcSpanInfo) -> Maybe [Fixity] -> P (Exp SrcSpanInfo)
forall (a :: * -> *).
AppFixity a =>
P (a SrcSpanInfo) -> Maybe [Fixity] -> P (a SrcSpanInfo)
normalParser P (Exp SrcSpanInfo)
mparseExp
instance Parseable (Module SrcSpanInfo) where parser :: Maybe [Fixity] -> P (Module SrcSpanInfo)
parser = P (Module SrcSpanInfo) -> Maybe [Fixity] -> P (Module SrcSpanInfo)
forall (a :: * -> *).
AppFixity a =>
P (a SrcSpanInfo) -> Maybe [Fixity] -> P (a SrcSpanInfo)
normalParser P (Module SrcSpanInfo)
mparseModule
instance Parseable (Pat SrcSpanInfo) where parser :: Maybe [Fixity] -> P (Pat SrcSpanInfo)
parser = P (Pat SrcSpanInfo) -> Maybe [Fixity] -> P (Pat SrcSpanInfo)
forall (a :: * -> *).
AppFixity a =>
P (a SrcSpanInfo) -> Maybe [Fixity] -> P (a SrcSpanInfo)
normalParser P (Pat SrcSpanInfo)
mparsePat
instance Parseable (Stmt SrcSpanInfo) where parser :: Maybe [Fixity] -> P (Stmt SrcSpanInfo)
parser = P (Stmt SrcSpanInfo) -> Maybe [Fixity] -> P (Stmt SrcSpanInfo)
forall (a :: * -> *).
AppFixity a =>
P (a SrcSpanInfo) -> Maybe [Fixity] -> P (a SrcSpanInfo)
normalParser P (Stmt SrcSpanInfo)
mparseStmt
instance Parseable (Type SrcSpanInfo) where parser :: Maybe [Fixity] -> P (Type SrcSpanInfo)
parser = P (Type SrcSpanInfo) -> Maybe [Fixity] -> P (Type SrcSpanInfo)
forall (a :: * -> *).
P (a SrcSpanInfo) -> Maybe [Fixity] -> P (a SrcSpanInfo)
normalParserNoFixity P (Type SrcSpanInfo)
mparseType
instance Parseable (ImportDecl SrcSpanInfo) where parser :: Maybe [Fixity] -> P (ImportDecl SrcSpanInfo)
parser = P (ImportDecl SrcSpanInfo)
-> Maybe [Fixity] -> P (ImportDecl SrcSpanInfo)
forall (a :: * -> *).
P (a SrcSpanInfo) -> Maybe [Fixity] -> P (a SrcSpanInfo)
normalParserNoFixity P (ImportDecl SrcSpanInfo)
mparseImportDecl
normalParser :: AppFixity a => P (a SrcSpanInfo) -> Maybe [Fixity] -> P (a SrcSpanInfo)
normalParser :: forall (a :: * -> *).
AppFixity a =>
P (a SrcSpanInfo) -> Maybe [Fixity] -> P (a SrcSpanInfo)
normalParser P (a SrcSpanInfo)
p Maybe [Fixity]
Nothing = P (a SrcSpanInfo)
p
normalParser P (a SrcSpanInfo)
p (Just [Fixity]
fixs) = P (a SrcSpanInfo)
p P (a SrcSpanInfo)
-> (a SrcSpanInfo -> P (a SrcSpanInfo)) -> P (a SrcSpanInfo)
forall a b. P a -> (a -> P b) -> P b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \a SrcSpanInfo
ast -> [Fixity] -> a SrcSpanInfo -> P (a SrcSpanInfo)
forall (m :: * -> *).
MonadFail m =>
[Fixity] -> a SrcSpanInfo -> m (a SrcSpanInfo)
forall (ast :: * -> *) (m :: * -> *).
(AppFixity ast, MonadFail m) =>
[Fixity] -> ast SrcSpanInfo -> m (ast SrcSpanInfo)
applyFixities [Fixity]
fixs a SrcSpanInfo
ast P (a SrcSpanInfo) -> SrcLoc -> P (a SrcSpanInfo)
forall a. P a -> SrcLoc -> P a
`atSrcLoc` SrcLoc
noLoc
normalParserNoFixity :: P (a SrcSpanInfo) -> Maybe [Fixity] -> P (a SrcSpanInfo)
normalParserNoFixity :: forall (a :: * -> *).
P (a SrcSpanInfo) -> Maybe [Fixity] -> P (a SrcSpanInfo)
normalParserNoFixity P (a SrcSpanInfo)
p Maybe [Fixity]
_ = P (a SrcSpanInfo)
p
parseModule :: String -> ParseResult (Module SrcSpanInfo)
parseModule :: String -> ParseResult (Module SrcSpanInfo)
parseModule = String -> ParseResult (Module SrcSpanInfo)
forall ast. Parseable ast => String -> ParseResult ast
parse
parseModuleWithMode :: ParseMode -> String -> ParseResult (Module SrcSpanInfo)
parseModuleWithMode :: ParseMode -> String -> ParseResult (Module SrcSpanInfo)
parseModuleWithMode = ParseMode -> String -> ParseResult (Module SrcSpanInfo)
forall ast. Parseable ast => ParseMode -> String -> ParseResult ast
parseWithMode
parseModuleWithComments :: ParseMode -> String -> ParseResult (Module SrcSpanInfo, [Comment])
= ParseMode -> String -> ParseResult (Module SrcSpanInfo, [Comment])
forall ast.
Parseable ast =>
ParseMode -> String -> ParseResult (ast, [Comment])
parseWithComments
parseExp :: String -> ParseResult (Exp SrcSpanInfo)
parseExp :: String -> ParseResult (Exp SrcSpanInfo)
parseExp = String -> ParseResult (Exp SrcSpanInfo)
forall ast. Parseable ast => String -> ParseResult ast
parse
parseExpWithMode :: ParseMode -> String -> ParseResult (Exp SrcSpanInfo)
parseExpWithMode :: ParseMode -> String -> ParseResult (Exp SrcSpanInfo)
parseExpWithMode = ParseMode -> String -> ParseResult (Exp SrcSpanInfo)
forall ast. Parseable ast => ParseMode -> String -> ParseResult ast
parseWithMode
parseExpWithComments :: ParseMode -> String -> ParseResult (Exp SrcSpanInfo, [Comment])
= ParseMode -> String -> ParseResult (Exp SrcSpanInfo, [Comment])
forall ast.
Parseable ast =>
ParseMode -> String -> ParseResult (ast, [Comment])
parseWithComments
parsePat :: String -> ParseResult (Pat SrcSpanInfo)
parsePat :: String -> ParseResult (Pat SrcSpanInfo)
parsePat = String -> ParseResult (Pat SrcSpanInfo)
forall ast. Parseable ast => String -> ParseResult ast
parse
parsePatWithMode :: ParseMode -> String -> ParseResult (Pat SrcSpanInfo)
parsePatWithMode :: ParseMode -> String -> ParseResult (Pat SrcSpanInfo)
parsePatWithMode = ParseMode -> String -> ParseResult (Pat SrcSpanInfo)
forall ast. Parseable ast => ParseMode -> String -> ParseResult ast
parseWithMode
parsePatWithComments :: ParseMode -> String -> ParseResult (Pat SrcSpanInfo, [Comment])
= ParseMode -> String -> ParseResult (Pat SrcSpanInfo, [Comment])
forall ast.
Parseable ast =>
ParseMode -> String -> ParseResult (ast, [Comment])
parseWithComments
parseDecl :: String -> ParseResult (Decl SrcSpanInfo)
parseDecl :: String -> ParseResult (Decl SrcSpanInfo)
parseDecl = String -> ParseResult (Decl SrcSpanInfo)
forall ast. Parseable ast => String -> ParseResult ast
parse
parseDeclWithMode :: ParseMode -> String -> ParseResult (Decl SrcSpanInfo)
parseDeclWithMode :: ParseMode -> String -> ParseResult (Decl SrcSpanInfo)
parseDeclWithMode = ParseMode -> String -> ParseResult (Decl SrcSpanInfo)
forall ast. Parseable ast => ParseMode -> String -> ParseResult ast
parseWithMode
parseDeclWithComments :: ParseMode -> String -> ParseResult (Decl SrcSpanInfo, [Comment])
= ParseMode -> String -> ParseResult (Decl SrcSpanInfo, [Comment])
forall ast.
Parseable ast =>
ParseMode -> String -> ParseResult (ast, [Comment])
parseWithComments
parseType :: String -> ParseResult (Type SrcSpanInfo)
parseType :: String -> ParseResult (Type SrcSpanInfo)
parseType = String -> ParseResult (Type SrcSpanInfo)
forall ast. Parseable ast => String -> ParseResult ast
parse
parseTypeWithMode :: ParseMode -> String -> ParseResult (Type SrcSpanInfo)
parseTypeWithMode :: ParseMode -> String -> ParseResult (Type SrcSpanInfo)
parseTypeWithMode = ParseMode -> String -> ParseResult (Type SrcSpanInfo)
forall ast. Parseable ast => ParseMode -> String -> ParseResult ast
parseWithMode
parseTypeWithComments :: ParseMode -> String -> ParseResult (Type SrcSpanInfo, [Comment])
= ParseMode -> String -> ParseResult (Type SrcSpanInfo, [Comment])
forall ast.
Parseable ast =>
ParseMode -> String -> ParseResult (ast, [Comment])
parseWithComments
parseStmt :: String -> ParseResult (Stmt SrcSpanInfo)
parseStmt :: String -> ParseResult (Stmt SrcSpanInfo)
parseStmt = String -> ParseResult (Stmt SrcSpanInfo)
forall ast. Parseable ast => String -> ParseResult ast
parse
parseStmtWithMode :: ParseMode -> String -> ParseResult (Stmt SrcSpanInfo)
parseStmtWithMode :: ParseMode -> String -> ParseResult (Stmt SrcSpanInfo)
parseStmtWithMode = ParseMode -> String -> ParseResult (Stmt SrcSpanInfo)
forall ast. Parseable ast => ParseMode -> String -> ParseResult ast
parseWithMode
parseStmtWithComments :: ParseMode -> String -> ParseResult (Stmt SrcSpanInfo, [Comment])
= ParseMode -> String -> ParseResult (Stmt SrcSpanInfo, [Comment])
forall ast.
Parseable ast =>
ParseMode -> String -> ParseResult (ast, [Comment])
parseWithComments
parseImportDecl :: String -> ParseResult (ImportDecl SrcSpanInfo)
parseImportDecl :: String -> ParseResult (ImportDecl SrcSpanInfo)
parseImportDecl = String -> ParseResult (ImportDecl SrcSpanInfo)
forall ast. Parseable ast => String -> ParseResult ast
parse
parseImportDeclWithMode :: ParseMode -> String -> ParseResult (ImportDecl SrcSpanInfo)
parseImportDeclWithMode :: ParseMode -> String -> ParseResult (ImportDecl SrcSpanInfo)
parseImportDeclWithMode = ParseMode -> String -> ParseResult (ImportDecl SrcSpanInfo)
forall ast. Parseable ast => ParseMode -> String -> ParseResult ast
parseWithMode
parseImportDeclWithComments :: ParseMode -> String -> ParseResult (ImportDecl SrcSpanInfo, [Comment])
= ParseMode
-> String -> ParseResult (ImportDecl SrcSpanInfo, [Comment])
forall ast.
Parseable ast =>
ParseMode -> String -> ParseResult (ast, [Comment])
parseWithComments
getTopPragmas :: String -> ParseResult [ModulePragma SrcSpanInfo]
getTopPragmas :: String -> ParseResult [ModulePragma SrcSpanInfo]
getTopPragmas = (NonGreedy (ListOf (ModulePragma SrcSpanInfo))
-> [ModulePragma SrcSpanInfo])
-> ParseResult (NonGreedy (ListOf (ModulePragma SrcSpanInfo)))
-> ParseResult [ModulePragma SrcSpanInfo]
forall a b. (a -> b) -> ParseResult a -> ParseResult b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (ListOf (ModulePragma SrcSpanInfo) -> [ModulePragma SrcSpanInfo]
forall a. ListOf a -> [a]
unListOf (ListOf (ModulePragma SrcSpanInfo) -> [ModulePragma SrcSpanInfo])
-> (NonGreedy (ListOf (ModulePragma SrcSpanInfo))
-> ListOf (ModulePragma SrcSpanInfo))
-> NonGreedy (ListOf (ModulePragma SrcSpanInfo))
-> [ModulePragma SrcSpanInfo]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NonGreedy (ListOf (ModulePragma SrcSpanInfo))
-> ListOf (ModulePragma SrcSpanInfo)
forall a. NonGreedy a -> a
unNonGreedy) (ParseResult (NonGreedy (ListOf (ModulePragma SrcSpanInfo)))
-> ParseResult [ModulePragma SrcSpanInfo])
-> (String
-> ParseResult (NonGreedy (ListOf (ModulePragma SrcSpanInfo))))
-> String
-> ParseResult [ModulePragma SrcSpanInfo]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String
-> ParseResult (NonGreedy (ListOf (ModulePragma SrcSpanInfo)))
forall ast. Parseable ast => String -> ParseResult ast
parse
instance Parseable (NonGreedy (ListOf (ModulePragma SrcSpanInfo))) where
parser :: Maybe [Fixity] -> P (NonGreedy (ListOf (ModulePragma SrcSpanInfo)))
parser = P ([ModulePragma SrcSpanInfo], [SrcSpan], SrcSpanInfo)
-> Maybe [Fixity]
-> P (NonGreedy (ListOf (ModulePragma SrcSpanInfo)))
forall (a :: * -> *).
P ([a SrcSpanInfo], [SrcSpan], SrcSpanInfo)
-> Maybe [Fixity] -> P (NonGreedy (ListOf (a SrcSpanInfo)))
nglistParserNoFixity P ([ModulePragma SrcSpanInfo], [SrcSpan], SrcSpanInfo)
ngparseModulePragmas
nglistParserNoFixity :: P ([a SrcSpanInfo], [SrcSpan], SrcSpanInfo) -> Maybe [Fixity] -> P (NonGreedy (ListOf (a SrcSpanInfo)))
nglistParserNoFixity :: forall (a :: * -> *).
P ([a SrcSpanInfo], [SrcSpan], SrcSpanInfo)
-> Maybe [Fixity] -> P (NonGreedy (ListOf (a SrcSpanInfo)))
nglistParserNoFixity P ([a SrcSpanInfo], [SrcSpan], SrcSpanInfo)
f = (([a SrcSpanInfo], [SrcSpan], SrcSpanInfo)
-> NonGreedy (ListOf (a SrcSpanInfo)))
-> P ([a SrcSpanInfo], [SrcSpan], SrcSpanInfo)
-> P (NonGreedy (ListOf (a SrcSpanInfo)))
forall a b. (a -> b) -> P a -> P b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (ListOf (a SrcSpanInfo) -> NonGreedy (ListOf (a SrcSpanInfo))
forall a. a -> NonGreedy a
NonGreedy (ListOf (a SrcSpanInfo) -> NonGreedy (ListOf (a SrcSpanInfo)))
-> (([a SrcSpanInfo], [SrcSpan], SrcSpanInfo)
-> ListOf (a SrcSpanInfo))
-> ([a SrcSpanInfo], [SrcSpan], SrcSpanInfo)
-> NonGreedy (ListOf (a SrcSpanInfo))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ([a SrcSpanInfo], [SrcSpan], SrcSpanInfo) -> ListOf (a SrcSpanInfo)
forall a. ([a], [SrcSpan], SrcSpanInfo) -> ListOf a
toListOf) (P ([a SrcSpanInfo], [SrcSpan], SrcSpanInfo)
-> P (NonGreedy (ListOf (a SrcSpanInfo))))
-> (Maybe [Fixity] -> P ([a SrcSpanInfo], [SrcSpan], SrcSpanInfo))
-> Maybe [Fixity]
-> P (NonGreedy (ListOf (a SrcSpanInfo)))
forall b c a. (b -> c) -> (a -> b) -> a -> c
. P ([a SrcSpanInfo], [SrcSpan], SrcSpanInfo)
-> Maybe [Fixity] -> P ([a SrcSpanInfo], [SrcSpan], SrcSpanInfo)
forall (a :: * -> *).
P (a SrcSpanInfo) -> Maybe [Fixity] -> P (a SrcSpanInfo)
normalParserNoFixity P ([a SrcSpanInfo], [SrcSpan], SrcSpanInfo)
f
data PragmasAndModuleName l = PragmasAndModuleName l
[ModulePragma l]
(Maybe (ModuleName l))
deriving (PragmasAndModuleName l -> PragmasAndModuleName l -> Bool
(PragmasAndModuleName l -> PragmasAndModuleName l -> Bool)
-> (PragmasAndModuleName l -> PragmasAndModuleName l -> Bool)
-> Eq (PragmasAndModuleName l)
forall l.
Eq l =>
PragmasAndModuleName l -> PragmasAndModuleName l -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall l.
Eq l =>
PragmasAndModuleName l -> PragmasAndModuleName l -> Bool
== :: PragmasAndModuleName l -> PragmasAndModuleName l -> Bool
$c/= :: forall l.
Eq l =>
PragmasAndModuleName l -> PragmasAndModuleName l -> Bool
/= :: PragmasAndModuleName l -> PragmasAndModuleName l -> Bool
Eq,Eq (PragmasAndModuleName l)
Eq (PragmasAndModuleName l) =>
(PragmasAndModuleName l -> PragmasAndModuleName l -> Ordering)
-> (PragmasAndModuleName l -> PragmasAndModuleName l -> Bool)
-> (PragmasAndModuleName l -> PragmasAndModuleName l -> Bool)
-> (PragmasAndModuleName l -> PragmasAndModuleName l -> Bool)
-> (PragmasAndModuleName l -> PragmasAndModuleName l -> Bool)
-> (PragmasAndModuleName l
-> PragmasAndModuleName l -> PragmasAndModuleName l)
-> (PragmasAndModuleName l
-> PragmasAndModuleName l -> PragmasAndModuleName l)
-> Ord (PragmasAndModuleName l)
PragmasAndModuleName l -> PragmasAndModuleName l -> Bool
PragmasAndModuleName l -> PragmasAndModuleName l -> Ordering
PragmasAndModuleName l
-> PragmasAndModuleName l -> PragmasAndModuleName l
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall l. Ord l => Eq (PragmasAndModuleName l)
forall l.
Ord l =>
PragmasAndModuleName l -> PragmasAndModuleName l -> Bool
forall l.
Ord l =>
PragmasAndModuleName l -> PragmasAndModuleName l -> Ordering
forall l.
Ord l =>
PragmasAndModuleName l
-> PragmasAndModuleName l -> PragmasAndModuleName l
$ccompare :: forall l.
Ord l =>
PragmasAndModuleName l -> PragmasAndModuleName l -> Ordering
compare :: PragmasAndModuleName l -> PragmasAndModuleName l -> Ordering
$c< :: forall l.
Ord l =>
PragmasAndModuleName l -> PragmasAndModuleName l -> Bool
< :: PragmasAndModuleName l -> PragmasAndModuleName l -> Bool
$c<= :: forall l.
Ord l =>
PragmasAndModuleName l -> PragmasAndModuleName l -> Bool
<= :: PragmasAndModuleName l -> PragmasAndModuleName l -> Bool
$c> :: forall l.
Ord l =>
PragmasAndModuleName l -> PragmasAndModuleName l -> Bool
> :: PragmasAndModuleName l -> PragmasAndModuleName l -> Bool
$c>= :: forall l.
Ord l =>
PragmasAndModuleName l -> PragmasAndModuleName l -> Bool
>= :: PragmasAndModuleName l -> PragmasAndModuleName l -> Bool
$cmax :: forall l.
Ord l =>
PragmasAndModuleName l
-> PragmasAndModuleName l -> PragmasAndModuleName l
max :: PragmasAndModuleName l
-> PragmasAndModuleName l -> PragmasAndModuleName l
$cmin :: forall l.
Ord l =>
PragmasAndModuleName l
-> PragmasAndModuleName l -> PragmasAndModuleName l
min :: PragmasAndModuleName l
-> PragmasAndModuleName l -> PragmasAndModuleName l
Ord,Int -> PragmasAndModuleName l -> ShowS
[PragmasAndModuleName l] -> ShowS
PragmasAndModuleName l -> String
(Int -> PragmasAndModuleName l -> ShowS)
-> (PragmasAndModuleName l -> String)
-> ([PragmasAndModuleName l] -> ShowS)
-> Show (PragmasAndModuleName l)
forall l. Show l => Int -> PragmasAndModuleName l -> ShowS
forall l. Show l => [PragmasAndModuleName l] -> ShowS
forall l. Show l => PragmasAndModuleName l -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall l. Show l => Int -> PragmasAndModuleName l -> ShowS
showsPrec :: Int -> PragmasAndModuleName l -> ShowS
$cshow :: forall l. Show l => PragmasAndModuleName l -> String
show :: PragmasAndModuleName l -> String
$cshowList :: forall l. Show l => [PragmasAndModuleName l] -> ShowS
showList :: [PragmasAndModuleName l] -> ShowS
Show,Typeable,Typeable (PragmasAndModuleName l)
Typeable (PragmasAndModuleName l) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PragmasAndModuleName l
-> c (PragmasAndModuleName l))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (PragmasAndModuleName l))
-> (PragmasAndModuleName l -> Constr)
-> (PragmasAndModuleName l -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c (PragmasAndModuleName l)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (PragmasAndModuleName l)))
-> ((forall b. Data b => b -> b)
-> PragmasAndModuleName l -> PragmasAndModuleName l)
-> (forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleName l
-> r)
-> (forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleName l
-> r)
-> (forall u.
(forall d. Data d => d -> u) -> PragmasAndModuleName l -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> PragmasAndModuleName l -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleName l -> m (PragmasAndModuleName l))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleName l -> m (PragmasAndModuleName l))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleName l -> m (PragmasAndModuleName l))
-> Data (PragmasAndModuleName l)
PragmasAndModuleName l -> Constr
PragmasAndModuleName l -> DataType
(forall b. Data b => b -> b)
-> PragmasAndModuleName l -> PragmasAndModuleName l
forall l. Data l => Typeable (PragmasAndModuleName l)
forall l. Data l => PragmasAndModuleName l -> Constr
forall l. Data l => PragmasAndModuleName l -> DataType
forall l.
Data l =>
(forall b. Data b => b -> b)
-> PragmasAndModuleName l -> PragmasAndModuleName l
forall l u.
Data l =>
Int -> (forall d. Data d => d -> u) -> PragmasAndModuleName l -> u
forall l u.
Data l =>
(forall d. Data d => d -> u) -> PragmasAndModuleName l -> [u]
forall l r r'.
Data l =>
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleName l
-> r
forall l r r'.
Data l =>
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleName l
-> r
forall l (m :: * -> *).
(Data l, Monad m) =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleName l -> m (PragmasAndModuleName l)
forall l (m :: * -> *).
(Data l, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleName l -> m (PragmasAndModuleName l)
forall l (c :: * -> *).
Data l =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (PragmasAndModuleName l)
forall l (c :: * -> *).
Data l =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PragmasAndModuleName l
-> c (PragmasAndModuleName l)
forall l (t :: * -> *) (c :: * -> *).
(Data l, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (PragmasAndModuleName l))
forall l (t :: * -> * -> *) (c :: * -> *).
(Data l, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (PragmasAndModuleName l))
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> PragmasAndModuleName l -> u
forall u.
(forall d. Data d => d -> u) -> PragmasAndModuleName l -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleName l
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleName l
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleName l -> m (PragmasAndModuleName l)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleName l -> m (PragmasAndModuleName l)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (PragmasAndModuleName l)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PragmasAndModuleName l
-> c (PragmasAndModuleName l)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (PragmasAndModuleName l))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (PragmasAndModuleName l))
$cgfoldl :: forall l (c :: * -> *).
Data l =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PragmasAndModuleName l
-> c (PragmasAndModuleName l)
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PragmasAndModuleName l
-> c (PragmasAndModuleName l)
$cgunfold :: forall l (c :: * -> *).
Data l =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (PragmasAndModuleName l)
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (PragmasAndModuleName l)
$ctoConstr :: forall l. Data l => PragmasAndModuleName l -> Constr
toConstr :: PragmasAndModuleName l -> Constr
$cdataTypeOf :: forall l. Data l => PragmasAndModuleName l -> DataType
dataTypeOf :: PragmasAndModuleName l -> DataType
$cdataCast1 :: forall l (t :: * -> *) (c :: * -> *).
(Data l, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (PragmasAndModuleName l))
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (PragmasAndModuleName l))
$cdataCast2 :: forall l (t :: * -> * -> *) (c :: * -> *).
(Data l, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (PragmasAndModuleName l))
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (PragmasAndModuleName l))
$cgmapT :: forall l.
Data l =>
(forall b. Data b => b -> b)
-> PragmasAndModuleName l -> PragmasAndModuleName l
gmapT :: (forall b. Data b => b -> b)
-> PragmasAndModuleName l -> PragmasAndModuleName l
$cgmapQl :: forall l r r'.
Data l =>
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleName l
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleName l
-> r
$cgmapQr :: forall l r r'.
Data l =>
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleName l
-> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleName l
-> r
$cgmapQ :: forall l u.
Data l =>
(forall d. Data d => d -> u) -> PragmasAndModuleName l -> [u]
gmapQ :: forall u.
(forall d. Data d => d -> u) -> PragmasAndModuleName l -> [u]
$cgmapQi :: forall l u.
Data l =>
Int -> (forall d. Data d => d -> u) -> PragmasAndModuleName l -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> PragmasAndModuleName l -> u
$cgmapM :: forall l (m :: * -> *).
(Data l, Monad m) =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleName l -> m (PragmasAndModuleName l)
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleName l -> m (PragmasAndModuleName l)
$cgmapMp :: forall l (m :: * -> *).
(Data l, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleName l -> m (PragmasAndModuleName l)
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleName l -> m (PragmasAndModuleName l)
$cgmapMo :: forall l (m :: * -> *).
(Data l, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleName l -> m (PragmasAndModuleName l)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleName l -> m (PragmasAndModuleName l)
Data)
instance Parseable (NonGreedy (PragmasAndModuleName SrcSpanInfo)) where
parser :: Maybe [Fixity] -> P (NonGreedy (PragmasAndModuleName SrcSpanInfo))
parser Maybe [Fixity]
_ = do
(([ModulePragma SrcSpanInfo]
pragmas, [SrcSpan]
pss, SrcSpanInfo
pl), Maybe (ModuleName SrcSpanInfo)
mn) <- P (([ModulePragma SrcSpanInfo], [SrcSpan], SrcSpanInfo),
Maybe (ModuleName SrcSpanInfo))
ngparsePragmasAndModuleName
let l :: SrcSpanInfo
l = SrcSpanInfo -> Maybe SrcSpanInfo -> SrcSpanInfo
combSpanMaybe (SrcSpanInfo
pl SrcSpanInfo -> [SrcSpan] -> SrcSpanInfo
<** [SrcSpan]
pss) ((ModuleName SrcSpanInfo -> SrcSpanInfo)
-> Maybe (ModuleName SrcSpanInfo) -> Maybe SrcSpanInfo
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ModuleName SrcSpanInfo -> SrcSpanInfo
forall l. ModuleName l -> l
forall (ast :: * -> *) l. Annotated ast => ast l -> l
ann Maybe (ModuleName SrcSpanInfo)
mn)
NonGreedy (PragmasAndModuleName SrcSpanInfo)
-> P (NonGreedy (PragmasAndModuleName SrcSpanInfo))
forall a. a -> P a
forall (m :: * -> *) a. Monad m => a -> m a
return (NonGreedy (PragmasAndModuleName SrcSpanInfo)
-> P (NonGreedy (PragmasAndModuleName SrcSpanInfo)))
-> NonGreedy (PragmasAndModuleName SrcSpanInfo)
-> P (NonGreedy (PragmasAndModuleName SrcSpanInfo))
forall a b. (a -> b) -> a -> b
$ PragmasAndModuleName SrcSpanInfo
-> NonGreedy (PragmasAndModuleName SrcSpanInfo)
forall a. a -> NonGreedy a
NonGreedy (PragmasAndModuleName SrcSpanInfo
-> NonGreedy (PragmasAndModuleName SrcSpanInfo))
-> PragmasAndModuleName SrcSpanInfo
-> NonGreedy (PragmasAndModuleName SrcSpanInfo)
forall a b. (a -> b) -> a -> b
$ SrcSpanInfo
-> [ModulePragma SrcSpanInfo]
-> Maybe (ModuleName SrcSpanInfo)
-> PragmasAndModuleName SrcSpanInfo
forall l.
l
-> [ModulePragma l]
-> Maybe (ModuleName l)
-> PragmasAndModuleName l
PragmasAndModuleName SrcSpanInfo
l [ModulePragma SrcSpanInfo]
pragmas Maybe (ModuleName SrcSpanInfo)
mn
data PragmasAndModuleHead l = PragmasAndModuleHead l
[ModulePragma l]
(Maybe (ModuleHead l))
deriving (PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool
(PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool)
-> (PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool)
-> Eq (PragmasAndModuleHead l)
forall l.
Eq l =>
PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall l.
Eq l =>
PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool
== :: PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool
$c/= :: forall l.
Eq l =>
PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool
/= :: PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool
Eq,Eq (PragmasAndModuleHead l)
Eq (PragmasAndModuleHead l) =>
(PragmasAndModuleHead l -> PragmasAndModuleHead l -> Ordering)
-> (PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool)
-> (PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool)
-> (PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool)
-> (PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool)
-> (PragmasAndModuleHead l
-> PragmasAndModuleHead l -> PragmasAndModuleHead l)
-> (PragmasAndModuleHead l
-> PragmasAndModuleHead l -> PragmasAndModuleHead l)
-> Ord (PragmasAndModuleHead l)
PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool
PragmasAndModuleHead l -> PragmasAndModuleHead l -> Ordering
PragmasAndModuleHead l
-> PragmasAndModuleHead l -> PragmasAndModuleHead l
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall l. Ord l => Eq (PragmasAndModuleHead l)
forall l.
Ord l =>
PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool
forall l.
Ord l =>
PragmasAndModuleHead l -> PragmasAndModuleHead l -> Ordering
forall l.
Ord l =>
PragmasAndModuleHead l
-> PragmasAndModuleHead l -> PragmasAndModuleHead l
$ccompare :: forall l.
Ord l =>
PragmasAndModuleHead l -> PragmasAndModuleHead l -> Ordering
compare :: PragmasAndModuleHead l -> PragmasAndModuleHead l -> Ordering
$c< :: forall l.
Ord l =>
PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool
< :: PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool
$c<= :: forall l.
Ord l =>
PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool
<= :: PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool
$c> :: forall l.
Ord l =>
PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool
> :: PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool
$c>= :: forall l.
Ord l =>
PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool
>= :: PragmasAndModuleHead l -> PragmasAndModuleHead l -> Bool
$cmax :: forall l.
Ord l =>
PragmasAndModuleHead l
-> PragmasAndModuleHead l -> PragmasAndModuleHead l
max :: PragmasAndModuleHead l
-> PragmasAndModuleHead l -> PragmasAndModuleHead l
$cmin :: forall l.
Ord l =>
PragmasAndModuleHead l
-> PragmasAndModuleHead l -> PragmasAndModuleHead l
min :: PragmasAndModuleHead l
-> PragmasAndModuleHead l -> PragmasAndModuleHead l
Ord,Int -> PragmasAndModuleHead l -> ShowS
[PragmasAndModuleHead l] -> ShowS
PragmasAndModuleHead l -> String
(Int -> PragmasAndModuleHead l -> ShowS)
-> (PragmasAndModuleHead l -> String)
-> ([PragmasAndModuleHead l] -> ShowS)
-> Show (PragmasAndModuleHead l)
forall l. Show l => Int -> PragmasAndModuleHead l -> ShowS
forall l. Show l => [PragmasAndModuleHead l] -> ShowS
forall l. Show l => PragmasAndModuleHead l -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall l. Show l => Int -> PragmasAndModuleHead l -> ShowS
showsPrec :: Int -> PragmasAndModuleHead l -> ShowS
$cshow :: forall l. Show l => PragmasAndModuleHead l -> String
show :: PragmasAndModuleHead l -> String
$cshowList :: forall l. Show l => [PragmasAndModuleHead l] -> ShowS
showList :: [PragmasAndModuleHead l] -> ShowS
Show,Typeable,Typeable (PragmasAndModuleHead l)
Typeable (PragmasAndModuleHead l) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PragmasAndModuleHead l
-> c (PragmasAndModuleHead l))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (PragmasAndModuleHead l))
-> (PragmasAndModuleHead l -> Constr)
-> (PragmasAndModuleHead l -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c (PragmasAndModuleHead l)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (PragmasAndModuleHead l)))
-> ((forall b. Data b => b -> b)
-> PragmasAndModuleHead l -> PragmasAndModuleHead l)
-> (forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleHead l
-> r)
-> (forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleHead l
-> r)
-> (forall u.
(forall d. Data d => d -> u) -> PragmasAndModuleHead l -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> PragmasAndModuleHead l -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleHead l -> m (PragmasAndModuleHead l))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleHead l -> m (PragmasAndModuleHead l))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleHead l -> m (PragmasAndModuleHead l))
-> Data (PragmasAndModuleHead l)
PragmasAndModuleHead l -> Constr
PragmasAndModuleHead l -> DataType
(forall b. Data b => b -> b)
-> PragmasAndModuleHead l -> PragmasAndModuleHead l
forall l. Data l => Typeable (PragmasAndModuleHead l)
forall l. Data l => PragmasAndModuleHead l -> Constr
forall l. Data l => PragmasAndModuleHead l -> DataType
forall l.
Data l =>
(forall b. Data b => b -> b)
-> PragmasAndModuleHead l -> PragmasAndModuleHead l
forall l u.
Data l =>
Int -> (forall d. Data d => d -> u) -> PragmasAndModuleHead l -> u
forall l u.
Data l =>
(forall d. Data d => d -> u) -> PragmasAndModuleHead l -> [u]
forall l r r'.
Data l =>
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleHead l
-> r
forall l r r'.
Data l =>
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleHead l
-> r
forall l (m :: * -> *).
(Data l, Monad m) =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleHead l -> m (PragmasAndModuleHead l)
forall l (m :: * -> *).
(Data l, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleHead l -> m (PragmasAndModuleHead l)
forall l (c :: * -> *).
Data l =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (PragmasAndModuleHead l)
forall l (c :: * -> *).
Data l =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PragmasAndModuleHead l
-> c (PragmasAndModuleHead l)
forall l (t :: * -> *) (c :: * -> *).
(Data l, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (PragmasAndModuleHead l))
forall l (t :: * -> * -> *) (c :: * -> *).
(Data l, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (PragmasAndModuleHead l))
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> PragmasAndModuleHead l -> u
forall u.
(forall d. Data d => d -> u) -> PragmasAndModuleHead l -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleHead l
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleHead l
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleHead l -> m (PragmasAndModuleHead l)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleHead l -> m (PragmasAndModuleHead l)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (PragmasAndModuleHead l)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PragmasAndModuleHead l
-> c (PragmasAndModuleHead l)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (PragmasAndModuleHead l))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (PragmasAndModuleHead l))
$cgfoldl :: forall l (c :: * -> *).
Data l =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PragmasAndModuleHead l
-> c (PragmasAndModuleHead l)
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> PragmasAndModuleHead l
-> c (PragmasAndModuleHead l)
$cgunfold :: forall l (c :: * -> *).
Data l =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (PragmasAndModuleHead l)
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (PragmasAndModuleHead l)
$ctoConstr :: forall l. Data l => PragmasAndModuleHead l -> Constr
toConstr :: PragmasAndModuleHead l -> Constr
$cdataTypeOf :: forall l. Data l => PragmasAndModuleHead l -> DataType
dataTypeOf :: PragmasAndModuleHead l -> DataType
$cdataCast1 :: forall l (t :: * -> *) (c :: * -> *).
(Data l, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (PragmasAndModuleHead l))
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (PragmasAndModuleHead l))
$cdataCast2 :: forall l (t :: * -> * -> *) (c :: * -> *).
(Data l, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (PragmasAndModuleHead l))
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (PragmasAndModuleHead l))
$cgmapT :: forall l.
Data l =>
(forall b. Data b => b -> b)
-> PragmasAndModuleHead l -> PragmasAndModuleHead l
gmapT :: (forall b. Data b => b -> b)
-> PragmasAndModuleHead l -> PragmasAndModuleHead l
$cgmapQl :: forall l r r'.
Data l =>
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleHead l
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleHead l
-> r
$cgmapQr :: forall l r r'.
Data l =>
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleHead l
-> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> PragmasAndModuleHead l
-> r
$cgmapQ :: forall l u.
Data l =>
(forall d. Data d => d -> u) -> PragmasAndModuleHead l -> [u]
gmapQ :: forall u.
(forall d. Data d => d -> u) -> PragmasAndModuleHead l -> [u]
$cgmapQi :: forall l u.
Data l =>
Int -> (forall d. Data d => d -> u) -> PragmasAndModuleHead l -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> PragmasAndModuleHead l -> u
$cgmapM :: forall l (m :: * -> *).
(Data l, Monad m) =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleHead l -> m (PragmasAndModuleHead l)
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleHead l -> m (PragmasAndModuleHead l)
$cgmapMp :: forall l (m :: * -> *).
(Data l, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleHead l -> m (PragmasAndModuleHead l)
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleHead l -> m (PragmasAndModuleHead l)
$cgmapMo :: forall l (m :: * -> *).
(Data l, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleHead l -> m (PragmasAndModuleHead l)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> PragmasAndModuleHead l -> m (PragmasAndModuleHead l)
Data)
instance Parseable (NonGreedy (PragmasAndModuleHead SrcSpanInfo)) where
parser :: Maybe [Fixity] -> P (NonGreedy (PragmasAndModuleHead SrcSpanInfo))
parser Maybe [Fixity]
_ = do
(([ModulePragma SrcSpanInfo]
pragmas, [SrcSpan]
pss, SrcSpanInfo
pl), Maybe (ModuleHead SrcSpanInfo)
mh) <- P (([ModulePragma SrcSpanInfo], [SrcSpan], SrcSpanInfo),
Maybe (ModuleHead SrcSpanInfo))
ngparsePragmasAndModuleHead
let l :: SrcSpanInfo
l = SrcSpanInfo -> Maybe SrcSpanInfo -> SrcSpanInfo
combSpanMaybe (SrcSpanInfo
pl SrcSpanInfo -> [SrcSpan] -> SrcSpanInfo
<** [SrcSpan]
pss) ((ModuleHead SrcSpanInfo -> SrcSpanInfo)
-> Maybe (ModuleHead SrcSpanInfo) -> Maybe SrcSpanInfo
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ModuleHead SrcSpanInfo -> SrcSpanInfo
forall l. ModuleHead l -> l
forall (ast :: * -> *) l. Annotated ast => ast l -> l
ann Maybe (ModuleHead SrcSpanInfo)
mh)
NonGreedy (PragmasAndModuleHead SrcSpanInfo)
-> P (NonGreedy (PragmasAndModuleHead SrcSpanInfo))
forall a. a -> P a
forall (m :: * -> *) a. Monad m => a -> m a
return (NonGreedy (PragmasAndModuleHead SrcSpanInfo)
-> P (NonGreedy (PragmasAndModuleHead SrcSpanInfo)))
-> NonGreedy (PragmasAndModuleHead SrcSpanInfo)
-> P (NonGreedy (PragmasAndModuleHead SrcSpanInfo))
forall a b. (a -> b) -> a -> b
$ PragmasAndModuleHead SrcSpanInfo
-> NonGreedy (PragmasAndModuleHead SrcSpanInfo)
forall a. a -> NonGreedy a
NonGreedy (PragmasAndModuleHead SrcSpanInfo
-> NonGreedy (PragmasAndModuleHead SrcSpanInfo))
-> PragmasAndModuleHead SrcSpanInfo
-> NonGreedy (PragmasAndModuleHead SrcSpanInfo)
forall a b. (a -> b) -> a -> b
$ SrcSpanInfo
-> [ModulePragma SrcSpanInfo]
-> Maybe (ModuleHead SrcSpanInfo)
-> PragmasAndModuleHead SrcSpanInfo
forall l.
l
-> [ModulePragma l]
-> Maybe (ModuleHead l)
-> PragmasAndModuleHead l
PragmasAndModuleHead SrcSpanInfo
l [ModulePragma SrcSpanInfo]
pragmas Maybe (ModuleHead SrcSpanInfo)
mh
data ModuleHeadAndImports l = ModuleHeadAndImports l
[ModulePragma l]
(Maybe (ModuleHead l))
[ImportDecl l]
deriving (ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool
(ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool)
-> (ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool)
-> Eq (ModuleHeadAndImports l)
forall l.
Eq l =>
ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall l.
Eq l =>
ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool
== :: ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool
$c/= :: forall l.
Eq l =>
ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool
/= :: ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool
Eq,Eq (ModuleHeadAndImports l)
Eq (ModuleHeadAndImports l) =>
(ModuleHeadAndImports l -> ModuleHeadAndImports l -> Ordering)
-> (ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool)
-> (ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool)
-> (ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool)
-> (ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool)
-> (ModuleHeadAndImports l
-> ModuleHeadAndImports l -> ModuleHeadAndImports l)
-> (ModuleHeadAndImports l
-> ModuleHeadAndImports l -> ModuleHeadAndImports l)
-> Ord (ModuleHeadAndImports l)
ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool
ModuleHeadAndImports l -> ModuleHeadAndImports l -> Ordering
ModuleHeadAndImports l
-> ModuleHeadAndImports l -> ModuleHeadAndImports l
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall l. Ord l => Eq (ModuleHeadAndImports l)
forall l.
Ord l =>
ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool
forall l.
Ord l =>
ModuleHeadAndImports l -> ModuleHeadAndImports l -> Ordering
forall l.
Ord l =>
ModuleHeadAndImports l
-> ModuleHeadAndImports l -> ModuleHeadAndImports l
$ccompare :: forall l.
Ord l =>
ModuleHeadAndImports l -> ModuleHeadAndImports l -> Ordering
compare :: ModuleHeadAndImports l -> ModuleHeadAndImports l -> Ordering
$c< :: forall l.
Ord l =>
ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool
< :: ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool
$c<= :: forall l.
Ord l =>
ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool
<= :: ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool
$c> :: forall l.
Ord l =>
ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool
> :: ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool
$c>= :: forall l.
Ord l =>
ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool
>= :: ModuleHeadAndImports l -> ModuleHeadAndImports l -> Bool
$cmax :: forall l.
Ord l =>
ModuleHeadAndImports l
-> ModuleHeadAndImports l -> ModuleHeadAndImports l
max :: ModuleHeadAndImports l
-> ModuleHeadAndImports l -> ModuleHeadAndImports l
$cmin :: forall l.
Ord l =>
ModuleHeadAndImports l
-> ModuleHeadAndImports l -> ModuleHeadAndImports l
min :: ModuleHeadAndImports l
-> ModuleHeadAndImports l -> ModuleHeadAndImports l
Ord,Int -> ModuleHeadAndImports l -> ShowS
[ModuleHeadAndImports l] -> ShowS
ModuleHeadAndImports l -> String
(Int -> ModuleHeadAndImports l -> ShowS)
-> (ModuleHeadAndImports l -> String)
-> ([ModuleHeadAndImports l] -> ShowS)
-> Show (ModuleHeadAndImports l)
forall l. Show l => Int -> ModuleHeadAndImports l -> ShowS
forall l. Show l => [ModuleHeadAndImports l] -> ShowS
forall l. Show l => ModuleHeadAndImports l -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall l. Show l => Int -> ModuleHeadAndImports l -> ShowS
showsPrec :: Int -> ModuleHeadAndImports l -> ShowS
$cshow :: forall l. Show l => ModuleHeadAndImports l -> String
show :: ModuleHeadAndImports l -> String
$cshowList :: forall l. Show l => [ModuleHeadAndImports l] -> ShowS
showList :: [ModuleHeadAndImports l] -> ShowS
Show,Typeable,Typeable (ModuleHeadAndImports l)
Typeable (ModuleHeadAndImports l) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ModuleHeadAndImports l
-> c (ModuleHeadAndImports l))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (ModuleHeadAndImports l))
-> (ModuleHeadAndImports l -> Constr)
-> (ModuleHeadAndImports l -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d))
-> Maybe (c (ModuleHeadAndImports l)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (ModuleHeadAndImports l)))
-> ((forall b. Data b => b -> b)
-> ModuleHeadAndImports l -> ModuleHeadAndImports l)
-> (forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> ModuleHeadAndImports l
-> r)
-> (forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> ModuleHeadAndImports l
-> r)
-> (forall u.
(forall d. Data d => d -> u) -> ModuleHeadAndImports l -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> ModuleHeadAndImports l -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ModuleHeadAndImports l -> m (ModuleHeadAndImports l))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ModuleHeadAndImports l -> m (ModuleHeadAndImports l))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ModuleHeadAndImports l -> m (ModuleHeadAndImports l))
-> Data (ModuleHeadAndImports l)
ModuleHeadAndImports l -> Constr
ModuleHeadAndImports l -> DataType
(forall b. Data b => b -> b)
-> ModuleHeadAndImports l -> ModuleHeadAndImports l
forall l. Data l => Typeable (ModuleHeadAndImports l)
forall l. Data l => ModuleHeadAndImports l -> Constr
forall l. Data l => ModuleHeadAndImports l -> DataType
forall l.
Data l =>
(forall b. Data b => b -> b)
-> ModuleHeadAndImports l -> ModuleHeadAndImports l
forall l u.
Data l =>
Int -> (forall d. Data d => d -> u) -> ModuleHeadAndImports l -> u
forall l u.
Data l =>
(forall d. Data d => d -> u) -> ModuleHeadAndImports l -> [u]
forall l r r'.
Data l =>
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> ModuleHeadAndImports l
-> r
forall l r r'.
Data l =>
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> ModuleHeadAndImports l
-> r
forall l (m :: * -> *).
(Data l, Monad m) =>
(forall d. Data d => d -> m d)
-> ModuleHeadAndImports l -> m (ModuleHeadAndImports l)
forall l (m :: * -> *).
(Data l, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> ModuleHeadAndImports l -> m (ModuleHeadAndImports l)
forall l (c :: * -> *).
Data l =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (ModuleHeadAndImports l)
forall l (c :: * -> *).
Data l =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ModuleHeadAndImports l
-> c (ModuleHeadAndImports l)
forall l (t :: * -> *) (c :: * -> *).
(Data l, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (ModuleHeadAndImports l))
forall l (t :: * -> * -> *) (c :: * -> *).
(Data l, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (ModuleHeadAndImports l))
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> ModuleHeadAndImports l -> u
forall u.
(forall d. Data d => d -> u) -> ModuleHeadAndImports l -> [u]
forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> ModuleHeadAndImports l
-> r
forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> ModuleHeadAndImports l
-> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ModuleHeadAndImports l -> m (ModuleHeadAndImports l)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ModuleHeadAndImports l -> m (ModuleHeadAndImports l)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (ModuleHeadAndImports l)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ModuleHeadAndImports l
-> c (ModuleHeadAndImports l)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (ModuleHeadAndImports l))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (ModuleHeadAndImports l))
$cgfoldl :: forall l (c :: * -> *).
Data l =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ModuleHeadAndImports l
-> c (ModuleHeadAndImports l)
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> ModuleHeadAndImports l
-> c (ModuleHeadAndImports l)
$cgunfold :: forall l (c :: * -> *).
Data l =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (ModuleHeadAndImports l)
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (ModuleHeadAndImports l)
$ctoConstr :: forall l. Data l => ModuleHeadAndImports l -> Constr
toConstr :: ModuleHeadAndImports l -> Constr
$cdataTypeOf :: forall l. Data l => ModuleHeadAndImports l -> DataType
dataTypeOf :: ModuleHeadAndImports l -> DataType
$cdataCast1 :: forall l (t :: * -> *) (c :: * -> *).
(Data l, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (ModuleHeadAndImports l))
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (ModuleHeadAndImports l))
$cdataCast2 :: forall l (t :: * -> * -> *) (c :: * -> *).
(Data l, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (ModuleHeadAndImports l))
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (ModuleHeadAndImports l))
$cgmapT :: forall l.
Data l =>
(forall b. Data b => b -> b)
-> ModuleHeadAndImports l -> ModuleHeadAndImports l
gmapT :: (forall b. Data b => b -> b)
-> ModuleHeadAndImports l -> ModuleHeadAndImports l
$cgmapQl :: forall l r r'.
Data l =>
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> ModuleHeadAndImports l
-> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r
-> (forall d. Data d => d -> r')
-> ModuleHeadAndImports l
-> r
$cgmapQr :: forall l r r'.
Data l =>
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> ModuleHeadAndImports l
-> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r
-> (forall d. Data d => d -> r')
-> ModuleHeadAndImports l
-> r
$cgmapQ :: forall l u.
Data l =>
(forall d. Data d => d -> u) -> ModuleHeadAndImports l -> [u]
gmapQ :: forall u.
(forall d. Data d => d -> u) -> ModuleHeadAndImports l -> [u]
$cgmapQi :: forall l u.
Data l =>
Int -> (forall d. Data d => d -> u) -> ModuleHeadAndImports l -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> ModuleHeadAndImports l -> u
$cgmapM :: forall l (m :: * -> *).
(Data l, Monad m) =>
(forall d. Data d => d -> m d)
-> ModuleHeadAndImports l -> m (ModuleHeadAndImports l)
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> ModuleHeadAndImports l -> m (ModuleHeadAndImports l)
$cgmapMp :: forall l (m :: * -> *).
(Data l, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> ModuleHeadAndImports l -> m (ModuleHeadAndImports l)
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ModuleHeadAndImports l -> m (ModuleHeadAndImports l)
$cgmapMo :: forall l (m :: * -> *).
(Data l, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> ModuleHeadAndImports l -> m (ModuleHeadAndImports l)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> ModuleHeadAndImports l -> m (ModuleHeadAndImports l)
Data)
instance Parseable (NonGreedy (ModuleHeadAndImports SrcSpanInfo)) where
parser :: Maybe [Fixity] -> P (NonGreedy (ModuleHeadAndImports SrcSpanInfo))
parser Maybe [Fixity]
_ = do
(([ModulePragma SrcSpanInfo]
pragmas, [SrcSpan]
pss, SrcSpanInfo
pl), Maybe (ModuleHead SrcSpanInfo)
mh, Maybe ([ImportDecl SrcSpanInfo], [SrcSpan], SrcSpanInfo)
mimps) <- P (([ModulePragma SrcSpanInfo], [SrcSpan], SrcSpanInfo),
Maybe (ModuleHead SrcSpanInfo),
Maybe ([ImportDecl SrcSpanInfo], [SrcSpan], SrcSpanInfo))
ngparseModuleHeadAndImports
let l :: SrcSpanInfo
l = (SrcSpanInfo
pl SrcSpanInfo -> [SrcSpan] -> SrcSpanInfo
<** [SrcSpan]
pss) SrcSpanInfo -> Maybe SrcSpanInfo -> SrcSpanInfo
`combSpanMaybe`
((ModuleHead SrcSpanInfo -> SrcSpanInfo)
-> Maybe (ModuleHead SrcSpanInfo) -> Maybe SrcSpanInfo
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ModuleHead SrcSpanInfo -> SrcSpanInfo
forall l. ModuleHead l -> l
forall (ast :: * -> *) l. Annotated ast => ast l -> l
ann Maybe (ModuleHead SrcSpanInfo)
mh) SrcSpanInfo -> Maybe SrcSpanInfo -> SrcSpanInfo
`combSpanMaybe`
((([ImportDecl SrcSpanInfo], [SrcSpan], SrcSpanInfo) -> SrcSpanInfo)
-> Maybe ([ImportDecl SrcSpanInfo], [SrcSpan], SrcSpanInfo)
-> Maybe SrcSpanInfo
forall a b. (a -> b) -> Maybe a -> Maybe b
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\([ImportDecl SrcSpanInfo]
_, [SrcSpan]
iss, SrcSpanInfo
il) -> SrcSpanInfo
il SrcSpanInfo -> [SrcSpan] -> SrcSpanInfo
<** [SrcSpan]
iss) Maybe ([ImportDecl SrcSpanInfo], [SrcSpan], SrcSpanInfo)
mimps)
imps :: [ImportDecl SrcSpanInfo]
imps = [ImportDecl SrcSpanInfo]
-> (([ImportDecl SrcSpanInfo], [SrcSpan], SrcSpanInfo)
-> [ImportDecl SrcSpanInfo])
-> Maybe ([ImportDecl SrcSpanInfo], [SrcSpan], SrcSpanInfo)
-> [ImportDecl SrcSpanInfo]
forall b a. b -> (a -> b) -> Maybe a -> b
maybe [] (\([ImportDecl SrcSpanInfo]
x, [SrcSpan]
_, SrcSpanInfo
_) -> [ImportDecl SrcSpanInfo]
x) Maybe ([ImportDecl SrcSpanInfo], [SrcSpan], SrcSpanInfo)
mimps
NonGreedy (ModuleHeadAndImports SrcSpanInfo)
-> P (NonGreedy (ModuleHeadAndImports SrcSpanInfo))
forall a. a -> P a
forall (m :: * -> *) a. Monad m => a -> m a
return (NonGreedy (ModuleHeadAndImports SrcSpanInfo)
-> P (NonGreedy (ModuleHeadAndImports SrcSpanInfo)))
-> NonGreedy (ModuleHeadAndImports SrcSpanInfo)
-> P (NonGreedy (ModuleHeadAndImports SrcSpanInfo))
forall a b. (a -> b) -> a -> b
$ ModuleHeadAndImports SrcSpanInfo
-> NonGreedy (ModuleHeadAndImports SrcSpanInfo)
forall a. a -> NonGreedy a
NonGreedy (ModuleHeadAndImports SrcSpanInfo
-> NonGreedy (ModuleHeadAndImports SrcSpanInfo))
-> ModuleHeadAndImports SrcSpanInfo
-> NonGreedy (ModuleHeadAndImports SrcSpanInfo)
forall a b. (a -> b) -> a -> b
$ SrcSpanInfo
-> [ModulePragma SrcSpanInfo]
-> Maybe (ModuleHead SrcSpanInfo)
-> [ImportDecl SrcSpanInfo]
-> ModuleHeadAndImports SrcSpanInfo
forall l.
l
-> [ModulePragma l]
-> Maybe (ModuleHead l)
-> [ImportDecl l]
-> ModuleHeadAndImports l
ModuleHeadAndImports SrcSpanInfo
l [ModulePragma SrcSpanInfo]
pragmas Maybe (ModuleHead SrcSpanInfo)
mh [ImportDecl SrcSpanInfo]
imps
newtype NonGreedy a = NonGreedy { forall a. NonGreedy a -> a
unNonGreedy :: a }
deriving (NonGreedy a -> NonGreedy a -> Bool
(NonGreedy a -> NonGreedy a -> Bool)
-> (NonGreedy a -> NonGreedy a -> Bool) -> Eq (NonGreedy a)
forall a. Eq a => NonGreedy a -> NonGreedy a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall a. Eq a => NonGreedy a -> NonGreedy a -> Bool
== :: NonGreedy a -> NonGreedy a -> Bool
$c/= :: forall a. Eq a => NonGreedy a -> NonGreedy a -> Bool
/= :: NonGreedy a -> NonGreedy a -> Bool
Eq,Eq (NonGreedy a)
Eq (NonGreedy a) =>
(NonGreedy a -> NonGreedy a -> Ordering)
-> (NonGreedy a -> NonGreedy a -> Bool)
-> (NonGreedy a -> NonGreedy a -> Bool)
-> (NonGreedy a -> NonGreedy a -> Bool)
-> (NonGreedy a -> NonGreedy a -> Bool)
-> (NonGreedy a -> NonGreedy a -> NonGreedy a)
-> (NonGreedy a -> NonGreedy a -> NonGreedy a)
-> Ord (NonGreedy a)
NonGreedy a -> NonGreedy a -> Bool
NonGreedy a -> NonGreedy a -> Ordering
NonGreedy a -> NonGreedy a -> NonGreedy a
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall a. Ord a => Eq (NonGreedy a)
forall a. Ord a => NonGreedy a -> NonGreedy a -> Bool
forall a. Ord a => NonGreedy a -> NonGreedy a -> Ordering
forall a. Ord a => NonGreedy a -> NonGreedy a -> NonGreedy a
$ccompare :: forall a. Ord a => NonGreedy a -> NonGreedy a -> Ordering
compare :: NonGreedy a -> NonGreedy a -> Ordering
$c< :: forall a. Ord a => NonGreedy a -> NonGreedy a -> Bool
< :: NonGreedy a -> NonGreedy a -> Bool
$c<= :: forall a. Ord a => NonGreedy a -> NonGreedy a -> Bool
<= :: NonGreedy a -> NonGreedy a -> Bool
$c> :: forall a. Ord a => NonGreedy a -> NonGreedy a -> Bool
> :: NonGreedy a -> NonGreedy a -> Bool
$c>= :: forall a. Ord a => NonGreedy a -> NonGreedy a -> Bool
>= :: NonGreedy a -> NonGreedy a -> Bool
$cmax :: forall a. Ord a => NonGreedy a -> NonGreedy a -> NonGreedy a
max :: NonGreedy a -> NonGreedy a -> NonGreedy a
$cmin :: forall a. Ord a => NonGreedy a -> NonGreedy a -> NonGreedy a
min :: NonGreedy a -> NonGreedy a -> NonGreedy a
Ord,Int -> NonGreedy a -> ShowS
[NonGreedy a] -> ShowS
NonGreedy a -> String
(Int -> NonGreedy a -> ShowS)
-> (NonGreedy a -> String)
-> ([NonGreedy a] -> ShowS)
-> Show (NonGreedy a)
forall a. Show a => Int -> NonGreedy a -> ShowS
forall a. Show a => [NonGreedy a] -> ShowS
forall a. Show a => NonGreedy a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall a. Show a => Int -> NonGreedy a -> ShowS
showsPrec :: Int -> NonGreedy a -> ShowS
$cshow :: forall a. Show a => NonGreedy a -> String
show :: NonGreedy a -> String
$cshowList :: forall a. Show a => [NonGreedy a] -> ShowS
showList :: [NonGreedy a] -> ShowS
Show,Typeable,Typeable (NonGreedy a)
Typeable (NonGreedy a) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NonGreedy a -> c (NonGreedy a))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (NonGreedy a))
-> (NonGreedy a -> Constr)
-> (NonGreedy a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (NonGreedy a)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (NonGreedy a)))
-> ((forall b. Data b => b -> b) -> NonGreedy a -> NonGreedy a)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NonGreedy a -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NonGreedy a -> r)
-> (forall u. (forall d. Data d => d -> u) -> NonGreedy a -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> NonGreedy a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NonGreedy a -> m (NonGreedy a))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NonGreedy a -> m (NonGreedy a))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NonGreedy a -> m (NonGreedy a))
-> Data (NonGreedy a)
NonGreedy a -> Constr
NonGreedy a -> DataType
(forall b. Data b => b -> b) -> NonGreedy a -> NonGreedy a
forall a. Data a => Typeable (NonGreedy a)
forall a. Data a => NonGreedy a -> Constr
forall a. Data a => NonGreedy a -> DataType
forall a.
Data a =>
(forall b. Data b => b -> b) -> NonGreedy a -> NonGreedy a
forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> NonGreedy a -> u
forall a u.
Data a =>
(forall d. Data d => d -> u) -> NonGreedy a -> [u]
forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NonGreedy a -> r
forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NonGreedy a -> r
forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> NonGreedy a -> m (NonGreedy a)
forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> NonGreedy a -> m (NonGreedy a)
forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (NonGreedy a)
forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NonGreedy a -> c (NonGreedy a)
forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (NonGreedy a))
forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (NonGreedy a))
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> NonGreedy a -> u
forall u. (forall d. Data d => d -> u) -> NonGreedy a -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NonGreedy a -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NonGreedy a -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NonGreedy a -> m (NonGreedy a)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NonGreedy a -> m (NonGreedy a)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (NonGreedy a)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NonGreedy a -> c (NonGreedy a)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (NonGreedy a))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (NonGreedy a))
$cgfoldl :: forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NonGreedy a -> c (NonGreedy a)
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NonGreedy a -> c (NonGreedy a)
$cgunfold :: forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (NonGreedy a)
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (NonGreedy a)
$ctoConstr :: forall a. Data a => NonGreedy a -> Constr
toConstr :: NonGreedy a -> Constr
$cdataTypeOf :: forall a. Data a => NonGreedy a -> DataType
dataTypeOf :: NonGreedy a -> DataType
$cdataCast1 :: forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (NonGreedy a))
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (NonGreedy a))
$cdataCast2 :: forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (NonGreedy a))
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (NonGreedy a))
$cgmapT :: forall a.
Data a =>
(forall b. Data b => b -> b) -> NonGreedy a -> NonGreedy a
gmapT :: (forall b. Data b => b -> b) -> NonGreedy a -> NonGreedy a
$cgmapQl :: forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NonGreedy a -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NonGreedy a -> r
$cgmapQr :: forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NonGreedy a -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NonGreedy a -> r
$cgmapQ :: forall a u.
Data a =>
(forall d. Data d => d -> u) -> NonGreedy a -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> NonGreedy a -> [u]
$cgmapQi :: forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> NonGreedy a -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NonGreedy a -> u
$cgmapM :: forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> NonGreedy a -> m (NonGreedy a)
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NonGreedy a -> m (NonGreedy a)
$cgmapMp :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> NonGreedy a -> m (NonGreedy a)
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NonGreedy a -> m (NonGreedy a)
$cgmapMo :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> NonGreedy a -> m (NonGreedy a)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NonGreedy a -> m (NonGreedy a)
Data)
instance Functor NonGreedy where
fmap :: forall a b. (a -> b) -> NonGreedy a -> NonGreedy b
fmap a -> b
f (NonGreedy a
x) = b -> NonGreedy b
forall a. a -> NonGreedy a
NonGreedy (a -> b
f a
x)
data ListOf a = ListOf SrcSpanInfo [a]
deriving (ListOf a -> ListOf a -> Bool
(ListOf a -> ListOf a -> Bool)
-> (ListOf a -> ListOf a -> Bool) -> Eq (ListOf a)
forall a. Eq a => ListOf a -> ListOf a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall a. Eq a => ListOf a -> ListOf a -> Bool
== :: ListOf a -> ListOf a -> Bool
$c/= :: forall a. Eq a => ListOf a -> ListOf a -> Bool
/= :: ListOf a -> ListOf a -> Bool
Eq,Eq (ListOf a)
Eq (ListOf a) =>
(ListOf a -> ListOf a -> Ordering)
-> (ListOf a -> ListOf a -> Bool)
-> (ListOf a -> ListOf a -> Bool)
-> (ListOf a -> ListOf a -> Bool)
-> (ListOf a -> ListOf a -> Bool)
-> (ListOf a -> ListOf a -> ListOf a)
-> (ListOf a -> ListOf a -> ListOf a)
-> Ord (ListOf a)
ListOf a -> ListOf a -> Bool
ListOf a -> ListOf a -> Ordering
ListOf a -> ListOf a -> ListOf a
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall a. Ord a => Eq (ListOf a)
forall a. Ord a => ListOf a -> ListOf a -> Bool
forall a. Ord a => ListOf a -> ListOf a -> Ordering
forall a. Ord a => ListOf a -> ListOf a -> ListOf a
$ccompare :: forall a. Ord a => ListOf a -> ListOf a -> Ordering
compare :: ListOf a -> ListOf a -> Ordering
$c< :: forall a. Ord a => ListOf a -> ListOf a -> Bool
< :: ListOf a -> ListOf a -> Bool
$c<= :: forall a. Ord a => ListOf a -> ListOf a -> Bool
<= :: ListOf a -> ListOf a -> Bool
$c> :: forall a. Ord a => ListOf a -> ListOf a -> Bool
> :: ListOf a -> ListOf a -> Bool
$c>= :: forall a. Ord a => ListOf a -> ListOf a -> Bool
>= :: ListOf a -> ListOf a -> Bool
$cmax :: forall a. Ord a => ListOf a -> ListOf a -> ListOf a
max :: ListOf a -> ListOf a -> ListOf a
$cmin :: forall a. Ord a => ListOf a -> ListOf a -> ListOf a
min :: ListOf a -> ListOf a -> ListOf a
Ord,Int -> ListOf a -> ShowS
[ListOf a] -> ShowS
ListOf a -> String
(Int -> ListOf a -> ShowS)
-> (ListOf a -> String) -> ([ListOf a] -> ShowS) -> Show (ListOf a)
forall a. Show a => Int -> ListOf a -> ShowS
forall a. Show a => [ListOf a] -> ShowS
forall a. Show a => ListOf a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: forall a. Show a => Int -> ListOf a -> ShowS
showsPrec :: Int -> ListOf a -> ShowS
$cshow :: forall a. Show a => ListOf a -> String
show :: ListOf a -> String
$cshowList :: forall a. Show a => [ListOf a] -> ShowS
showList :: [ListOf a] -> ShowS
Show,Typeable,Typeable (ListOf a)
Typeable (ListOf a) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ListOf a -> c (ListOf a))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (ListOf a))
-> (ListOf a -> Constr)
-> (ListOf a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (ListOf a)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (ListOf a)))
-> ((forall b. Data b => b -> b) -> ListOf a -> ListOf a)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ListOf a -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ListOf a -> r)
-> (forall u. (forall d. Data d => d -> u) -> ListOf a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> ListOf a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ListOf a -> m (ListOf a))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ListOf a -> m (ListOf a))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ListOf a -> m (ListOf a))
-> Data (ListOf a)
ListOf a -> Constr
ListOf a -> DataType
(forall b. Data b => b -> b) -> ListOf a -> ListOf a
forall a. Data a => Typeable (ListOf a)
forall a. Data a => ListOf a -> Constr
forall a. Data a => ListOf a -> DataType
forall a.
Data a =>
(forall b. Data b => b -> b) -> ListOf a -> ListOf a
forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> ListOf a -> u
forall a u.
Data a =>
(forall d. Data d => d -> u) -> ListOf a -> [u]
forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ListOf a -> r
forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ListOf a -> r
forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> ListOf a -> m (ListOf a)
forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> ListOf a -> m (ListOf a)
forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (ListOf a)
forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ListOf a -> c (ListOf a)
forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (ListOf a))
forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ListOf a))
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ListOf a -> u
forall u. (forall d. Data d => d -> u) -> ListOf a -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ListOf a -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ListOf a -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ListOf a -> m (ListOf a)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ListOf a -> m (ListOf a)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (ListOf a)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ListOf a -> c (ListOf a)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (ListOf a))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ListOf a))
$cgfoldl :: forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ListOf a -> c (ListOf a)
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ListOf a -> c (ListOf a)
$cgunfold :: forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (ListOf a)
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (ListOf a)
$ctoConstr :: forall a. Data a => ListOf a -> Constr
toConstr :: ListOf a -> Constr
$cdataTypeOf :: forall a. Data a => ListOf a -> DataType
dataTypeOf :: ListOf a -> DataType
$cdataCast1 :: forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (ListOf a))
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (ListOf a))
$cdataCast2 :: forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ListOf a))
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ListOf a))
$cgmapT :: forall a.
Data a =>
(forall b. Data b => b -> b) -> ListOf a -> ListOf a
gmapT :: (forall b. Data b => b -> b) -> ListOf a -> ListOf a
$cgmapQl :: forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ListOf a -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ListOf a -> r
$cgmapQr :: forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ListOf a -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ListOf a -> r
$cgmapQ :: forall a u.
Data a =>
(forall d. Data d => d -> u) -> ListOf a -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> ListOf a -> [u]
$cgmapQi :: forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> ListOf a -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ListOf a -> u
$cgmapM :: forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> ListOf a -> m (ListOf a)
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ListOf a -> m (ListOf a)
$cgmapMp :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> ListOf a -> m (ListOf a)
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ListOf a -> m (ListOf a)
$cgmapMo :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> ListOf a -> m (ListOf a)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ListOf a -> m (ListOf a)
Data,(forall a b. (a -> b) -> ListOf a -> ListOf b)
-> (forall a b. a -> ListOf b -> ListOf a) -> Functor ListOf
forall a b. a -> ListOf b -> ListOf a
forall a b. (a -> b) -> ListOf a -> ListOf b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
$cfmap :: forall a b. (a -> b) -> ListOf a -> ListOf b
fmap :: forall a b. (a -> b) -> ListOf a -> ListOf b
$c<$ :: forall a b. a -> ListOf b -> ListOf a
<$ :: forall a b. a -> ListOf b -> ListOf a
Functor)
unListOf :: ListOf a -> [a]
unListOf :: forall a. ListOf a -> [a]
unListOf (ListOf SrcSpanInfo
_ [a]
xs) = [a]
xs
toListOf :: ([a], [SrcSpan], SrcSpanInfo) -> ListOf a
toListOf :: forall a. ([a], [SrcSpan], SrcSpanInfo) -> ListOf a
toListOf ([a]
xs, [SrcSpan]
ss, SrcSpanInfo
l) = SrcSpanInfo -> [a] -> ListOf a
forall a. SrcSpanInfo -> [a] -> ListOf a
ListOf (SrcSpan -> [SrcSpan] -> SrcSpanInfo
infoSpan (SrcSpanInfo -> SrcSpan
srcInfoSpan SrcSpanInfo
l) [SrcSpan]
ss) [a]
xs