{-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilyDependencies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
module Language.Haskell.Syntax.Expr where
#include "HsVersions.h"
import GHC.Prelude
import Language.Haskell.Syntax.Decls
import Language.Haskell.Syntax.Pat
import Language.Haskell.Syntax.Lit
import Language.Haskell.Syntax.Extension
import Language.Haskell.Syntax.Type
import Language.Haskell.Syntax.Binds
import GHC.Tc.Types.Evidence
import GHC.Core.DataCon (FieldLabelString)
import GHC.Types.Name
import GHC.Types.Basic
import GHC.Types.Fixity
import GHC.Types.SourceText
import GHC.Types.SrcLoc
import GHC.Types.Tickish
import GHC.Core.ConLike
import GHC.Unit.Module (ModuleName)
import GHC.Utils.Outputable
import GHC.Utils.Panic
import GHC.Data.FastString
import GHC.Core.Type
import Data.Data hiding (Fixity(..))
import qualified Data.Data as Data (Fixity(..))
import Data.List.NonEmpty ( NonEmpty )
import GHCi.RemoteTypes ( ForeignRef )
import qualified Language.Haskell.TH as TH (Q)
newtype FieldLabelStrings p =
FieldLabelStrings [Located (HsFieldLabel p)]
instance Outputable (FieldLabelStrings p) where
ppr :: FieldLabelStrings p -> SDoc
ppr (FieldLabelStrings [Located (HsFieldLabel p)]
flds) =
[SDoc] -> SDoc
hcat (SDoc -> [SDoc] -> [SDoc]
punctuate SDoc
dot ((Located (HsFieldLabel p) -> SDoc)
-> [Located (HsFieldLabel p)] -> [SDoc]
forall a b. (a -> b) -> [a] -> [b]
map (HsFieldLabel p -> SDoc
forall a. Outputable a => a -> SDoc
ppr (HsFieldLabel p -> SDoc)
-> (Located (HsFieldLabel p) -> HsFieldLabel p)
-> Located (HsFieldLabel p)
-> SDoc
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Located (HsFieldLabel p) -> HsFieldLabel p
forall l e. GenLocated l e -> e
unLoc) [Located (HsFieldLabel p)]
flds))
instance OutputableBndr (FieldLabelStrings p) where
pprInfixOcc :: FieldLabelStrings p -> SDoc
pprInfixOcc = FieldLabelStrings p -> SDoc
forall p. FieldLabelStrings p -> SDoc
pprFieldLabelStrings
pprPrefixOcc :: FieldLabelStrings p -> SDoc
pprPrefixOcc = FieldLabelStrings p -> SDoc
forall p. FieldLabelStrings p -> SDoc
pprFieldLabelStrings
pprFieldLabelStrings :: FieldLabelStrings p -> SDoc
pprFieldLabelStrings :: forall p. FieldLabelStrings p -> SDoc
pprFieldLabelStrings (FieldLabelStrings [Located (HsFieldLabel p)]
flds) =
[SDoc] -> SDoc
hcat (SDoc -> [SDoc] -> [SDoc]
punctuate SDoc
dot ((Located (HsFieldLabel p) -> SDoc)
-> [Located (HsFieldLabel p)] -> [SDoc]
forall a b. (a -> b) -> [a] -> [b]
map (HsFieldLabel p -> SDoc
forall a. Outputable a => a -> SDoc
ppr (HsFieldLabel p -> SDoc)
-> (Located (HsFieldLabel p) -> HsFieldLabel p)
-> Located (HsFieldLabel p)
-> SDoc
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Located (HsFieldLabel p) -> HsFieldLabel p
forall l e. GenLocated l e -> e
unLoc) [Located (HsFieldLabel p)]
flds))
instance Outputable (HsFieldLabel p) where
ppr :: HsFieldLabel p -> SDoc
ppr (HsFieldLabel XCHsFieldLabel p
_ Located FastString
s) = Located FastString -> SDoc
forall a. Outputable a => a -> SDoc
ppr Located FastString
s
ppr XHsFieldLabel{} = String -> SDoc
text String
"XHsFieldLabel"
type RecProj p arg = HsRecField' (FieldLabelStrings p) arg
type LHsRecProj p arg = XRec p (RecProj p arg)
type RecUpdProj p = RecProj p (LHsExpr p)
type LHsRecUpdProj p = XRec p (RecUpdProj p)
type LHsExpr p = XRec p (HsExpr p)
type family SyntaxExpr p
type CmdSyntaxTable p = [(Name, HsExpr p)]
data HsExpr p
= HsVar (XVar p)
(LIdP p)
| HsUnboundVar (XUnboundVar p)
OccName
| HsConLikeOut (XConLikeOut p)
ConLike
| HsRecFld (XRecFld p)
(AmbiguousFieldOcc p)
| HsOverLabel (XOverLabel p) FastString
| HsIPVar (XIPVar p)
HsIPName
| HsOverLit (XOverLitE p)
(HsOverLit p)
| HsLit (XLitE p)
(HsLit p)
| HsLam (XLam p)
(MatchGroup p (LHsExpr p))
| HsLamCase (XLamCase p) (MatchGroup p (LHsExpr p))
| HsApp (XApp p) (LHsExpr p) (LHsExpr p)
| HsAppType (XAppTypeE p)
(LHsExpr p)
(LHsWcType (NoGhcTc p))
| OpApp (XOpApp p)
(LHsExpr p)
(LHsExpr p)
(LHsExpr p)
| NegApp (XNegApp p)
(LHsExpr p)
(SyntaxExpr p)
| HsPar (XPar p)
(LHsExpr p)
| SectionL (XSectionL p)
(LHsExpr p)
(LHsExpr p)
| SectionR (XSectionR p)
(LHsExpr p)
(LHsExpr p)
| ExplicitTuple
(XExplicitTuple p)
[HsTupArg p]
Boxity
| ExplicitSum
(XExplicitSum p)
ConTag
Arity
(LHsExpr p)
| HsCase (XCase p)
(LHsExpr p)
(MatchGroup p (LHsExpr p))
| HsIf (XIf p)
(LHsExpr p)
(LHsExpr p)
(LHsExpr p)
| HsMultiIf (XMultiIf p) [LGRHS p (LHsExpr p)]
| HsLet (XLet p)
(HsLocalBinds p)
(LHsExpr p)
| HsDo (XDo p)
(HsStmtContext (HsDoRn p))
(XRec p [ExprLStmt p])
| ExplicitList
(XExplicitList p)
[LHsExpr p]
| RecordCon
{ forall p. HsExpr p -> XRecordCon p
rcon_ext :: XRecordCon p
, forall p. HsExpr p -> XRec p (ConLikeP p)
rcon_con :: XRec p (ConLikeP p)
, forall p. HsExpr p -> HsRecordBinds p
rcon_flds :: HsRecordBinds p }
| RecordUpd
{ forall p. HsExpr p -> XRecordUpd p
rupd_ext :: XRecordUpd p
, forall p. HsExpr p -> LHsExpr p
rupd_expr :: LHsExpr p
, forall p. HsExpr p -> Either [LHsRecUpdField p] [LHsRecUpdProj p]
rupd_flds :: Either [LHsRecUpdField p] [LHsRecUpdProj p]
}
| HsGetField {
forall p. HsExpr p -> XGetField p
gf_ext :: XGetField p
, forall p. HsExpr p -> LHsExpr p
gf_expr :: LHsExpr p
, forall p. HsExpr p -> Located (HsFieldLabel p)
gf_field :: Located (HsFieldLabel p)
}
| HsProjection {
forall p. HsExpr p -> XProjection p
proj_ext :: XProjection p
, forall p. HsExpr p -> NonEmpty (Located (HsFieldLabel p))
proj_flds :: NonEmpty (Located (HsFieldLabel p))
}
| ExprWithTySig
(XExprWithTySig p)
(LHsExpr p)
(LHsSigWcType (NoGhcTc p))
| ArithSeq
(XArithSeq p)
(Maybe (SyntaxExpr p))
(ArithSeqInfo p)
| HsBracket (XBracket p) (HsBracket p)
| HsRnBracketOut
(XRnBracketOut p)
(HsBracket (HsBracketRn p))
[PendingRnSplice' p]
| HsTcBracketOut
(XTcBracketOut p)
(Maybe QuoteWrapper)
(HsBracket (HsBracketRn p))
[PendingTcSplice' p]
| HsSpliceE (XSpliceE p) (HsSplice p)
| HsProc (XProc p)
(LPat p)
(LHsCmdTop p)
| HsStatic (XStatic p)
(LHsExpr p)
| HsTick
(XTick p)
CoreTickish
(LHsExpr p)
| HsBinTick
(XBinTick p)
Int
Int
(LHsExpr p)
| HsPragE (XPragE p) (HsPragE p) (LHsExpr p)
| XExpr !(XXExpr p)
type family HsDoRn p
type family HsBracketRn p
type family PendingRnSplice' p
type family PendingTcSplice' p
data HsFieldLabel p
= HsFieldLabel
{ forall p. HsFieldLabel p -> XCHsFieldLabel p
hflExt :: XCHsFieldLabel p
, forall p. HsFieldLabel p -> Located FastString
hflLabel :: Located FieldLabelString
}
| XHsFieldLabel !(XXHsFieldLabel p)
data HsPragE p
= HsPragSCC (XSCC p)
SourceText
StringLiteral
| XHsPragE !(XXPragE p)
type LHsTupArg id = XRec id (HsTupArg id)
data HsTupArg id
= Present (XPresent id) (LHsExpr id)
| Missing (XMissing id)
| XTupArg !(XXTupArg id)
pprExternalSrcLoc :: (StringLiteral,(Int,Int),(Int,Int)) -> SDoc
pprExternalSrcLoc :: (StringLiteral, (Int, Int), (Int, Int)) -> SDoc
pprExternalSrcLoc (StringLiteral SourceText
_ FastString
src Maybe RealSrcSpan
_,(Int
n1,Int
n2),(Int
n3,Int
n4))
= (FastString, (Int, Int), (Int, Int)) -> SDoc
forall a. Outputable a => a -> SDoc
ppr (FastString
src,(Int
n1,Int
n2),(Int
n3,Int
n4))
type LHsCmd id = XRec id (HsCmd id)
data HsCmd id
= HsCmdArrApp
(XCmdArrApp id)
(LHsExpr id)
(LHsExpr id)
HsArrAppType
Bool
| HsCmdArrForm
(XCmdArrForm id)
(LHsExpr id)
LexicalFixity
(Maybe Fixity)
[LHsCmdTop id]
| HsCmdApp (XCmdApp id)
(LHsCmd id)
(LHsExpr id)
| HsCmdLam (XCmdLam id)
(MatchGroup id (LHsCmd id))
| HsCmdPar (XCmdPar id)
(LHsCmd id)
| HsCmdCase (XCmdCase id)
(LHsExpr id)
(MatchGroup id (LHsCmd id))
| HsCmdLamCase (XCmdLamCase id)
(MatchGroup id (LHsCmd id))
| HsCmdIf (XCmdIf id)
(SyntaxExpr id)
(LHsExpr id)
(LHsCmd id)
(LHsCmd id)
| HsCmdLet (XCmdLet id)
(HsLocalBinds id)
(LHsCmd id)
| HsCmdDo (XCmdDo id)
(XRec id [CmdLStmt id])
| XCmd !(XXCmd id)
data HsArrAppType = HsHigherOrderApp | HsFirstOrderApp
deriving Typeable HsArrAppType
Typeable HsArrAppType
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> HsArrAppType -> c HsArrAppType)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c HsArrAppType)
-> (HsArrAppType -> Constr)
-> (HsArrAppType -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c HsArrAppType))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c HsArrAppType))
-> ((forall b. Data b => b -> b) -> HsArrAppType -> HsArrAppType)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r)
-> (forall u. (forall d. Data d => d -> u) -> HsArrAppType -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> HsArrAppType -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType)
-> Data HsArrAppType
HsArrAppType -> DataType
HsArrAppType -> Constr
(forall b. Data b => b -> b) -> HsArrAppType -> HsArrAppType
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) -> HsArrAppType -> u
forall u. (forall d. Data d => d -> u) -> HsArrAppType -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c HsArrAppType
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> HsArrAppType -> c HsArrAppType
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c HsArrAppType)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c HsArrAppType)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> HsArrAppType -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> HsArrAppType -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> HsArrAppType -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> HsArrAppType -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r
gmapT :: (forall b. Data b => b -> b) -> HsArrAppType -> HsArrAppType
$cgmapT :: (forall b. Data b => b -> b) -> HsArrAppType -> HsArrAppType
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c HsArrAppType)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c HsArrAppType)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c HsArrAppType)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c HsArrAppType)
dataTypeOf :: HsArrAppType -> DataType
$cdataTypeOf :: HsArrAppType -> DataType
toConstr :: HsArrAppType -> Constr
$ctoConstr :: HsArrAppType -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c HsArrAppType
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c HsArrAppType
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> HsArrAppType -> c HsArrAppType
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> HsArrAppType -> c HsArrAppType
Data
type LHsCmdTop p = XRec p (HsCmdTop p)
data HsCmdTop p
= HsCmdTop (XCmdTop p)
(LHsCmd p)
| XCmdTop !(XXCmdTop p)
type HsRecordBinds p = HsRecFields p (LHsExpr p)
data MatchGroup p body
= MG { forall p body. MatchGroup p body -> XMG p body
mg_ext :: XMG p body
, forall p body. MatchGroup p body -> XRec p [LMatch p body]
mg_alts :: XRec p [LMatch p body]
, forall p body. MatchGroup p body -> Origin
mg_origin :: Origin }
| XMatchGroup !(XXMatchGroup p body)
data MatchGroupTc
= MatchGroupTc
{ MatchGroupTc -> [Scaled Type]
mg_arg_tys :: [Scaled Type]
, MatchGroupTc -> Type
mg_res_ty :: Type
} deriving Typeable MatchGroupTc
Typeable MatchGroupTc
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MatchGroupTc -> c MatchGroupTc)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MatchGroupTc)
-> (MatchGroupTc -> Constr)
-> (MatchGroupTc -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MatchGroupTc))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MatchGroupTc))
-> ((forall b. Data b => b -> b) -> MatchGroupTc -> MatchGroupTc)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r)
-> (forall u. (forall d. Data d => d -> u) -> MatchGroupTc -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> MatchGroupTc -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc)
-> Data MatchGroupTc
MatchGroupTc -> DataType
MatchGroupTc -> Constr
(forall b. Data b => b -> b) -> MatchGroupTc -> MatchGroupTc
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) -> MatchGroupTc -> u
forall u. (forall d. Data d => d -> u) -> MatchGroupTc -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MatchGroupTc
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MatchGroupTc -> c MatchGroupTc
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MatchGroupTc)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MatchGroupTc)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> MatchGroupTc -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> MatchGroupTc -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> MatchGroupTc -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> MatchGroupTc -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r
gmapT :: (forall b. Data b => b -> b) -> MatchGroupTc -> MatchGroupTc
$cgmapT :: (forall b. Data b => b -> b) -> MatchGroupTc -> MatchGroupTc
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MatchGroupTc)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MatchGroupTc)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MatchGroupTc)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MatchGroupTc)
dataTypeOf :: MatchGroupTc -> DataType
$cdataTypeOf :: MatchGroupTc -> DataType
toConstr :: MatchGroupTc -> Constr
$ctoConstr :: MatchGroupTc -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MatchGroupTc
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MatchGroupTc
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MatchGroupTc -> c MatchGroupTc
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MatchGroupTc -> c MatchGroupTc
Data
type LMatch id body = XRec id (Match id body)
data Match p body
= Match {
forall p body. Match p body -> XCMatch p body
m_ext :: XCMatch p body,
forall p body. Match p body -> HsMatchContext (NoGhcTc p)
m_ctxt :: HsMatchContext (NoGhcTc p),
forall p body. Match p body -> [LPat p]
m_pats :: [LPat p],
forall p body. Match p body -> GRHSs p body
m_grhss :: (GRHSs p body)
}
| XMatch !(XXMatch p body)
isInfixMatch :: Match id body -> Bool
isInfixMatch :: forall id body. Match id body -> Bool
isInfixMatch Match id body
match = case Match id body -> HsMatchContext (NoGhcTc id)
forall p body. Match p body -> HsMatchContext (NoGhcTc p)
m_ctxt Match id body
match of
FunRhs {mc_fixity :: forall p. HsMatchContext p -> LexicalFixity
mc_fixity = LexicalFixity
Infix} -> Bool
True
HsMatchContext (NoGhcTc id)
_ -> Bool
False
data GRHSs p body
= GRHSs {
forall p body. GRHSs p body -> XCGRHSs p body
grhssExt :: XCGRHSs p body,
forall p body. GRHSs p body -> [LGRHS p body]
grhssGRHSs :: [LGRHS p body],
forall p body. GRHSs p body -> HsLocalBinds p
grhssLocalBinds :: HsLocalBinds p
}
| XGRHSs !(XXGRHSs p body)
type LGRHS id body = XRec id (GRHS id body)
data GRHS p body = GRHS (XCGRHS p body)
[GuardLStmt p]
body
| XGRHS !(XXGRHS p body)
type LStmt id body = XRec id (StmtLR id id body)
type LStmtLR idL idR body = XRec idL (StmtLR idL idR body)
type Stmt id body = StmtLR id id body
type CmdLStmt id = LStmt id (LHsCmd id)
type CmdStmt id = Stmt id (LHsCmd id)
type ExprLStmt id = LStmt id (LHsExpr id)
type ExprStmt id = Stmt id (LHsExpr id)
type GuardLStmt id = LStmt id (LHsExpr id)
type GuardStmt id = Stmt id (LHsExpr id)
type GhciLStmt id = LStmt id (LHsExpr id)
type GhciStmt id = Stmt id (LHsExpr id)
data StmtLR idL idR body
= LastStmt
(XLastStmt idL idR body)
body
(Maybe Bool)
(SyntaxExpr idR)
| BindStmt (XBindStmt idL idR body)
(LPat idL)
body
| ApplicativeStmt
(XApplicativeStmt idL idR body)
[ ( SyntaxExpr idR
, ApplicativeArg idL) ]
(Maybe (SyntaxExpr idR))
| BodyStmt (XBodyStmt idL idR body)
body
(SyntaxExpr idR)
(SyntaxExpr idR)
| LetStmt (XLetStmt idL idR body) (HsLocalBindsLR idL idR)
| ParStmt (XParStmt idL idR body)
[ParStmtBlock idL idR]
(HsExpr idR)
(SyntaxExpr idR)
| TransStmt {
forall idL idR body. StmtLR idL idR body -> XTransStmt idL idR body
trS_ext :: XTransStmt idL idR body,
forall idL idR body. StmtLR idL idR body -> TransForm
trS_form :: TransForm,
forall idL idR body. StmtLR idL idR body -> [ExprLStmt idL]
trS_stmts :: [ExprLStmt idL],
forall idL idR body. StmtLR idL idR body -> [(IdP idR, IdP idR)]
trS_bndrs :: [(IdP idR, IdP idR)],
forall idL idR body. StmtLR idL idR body -> LHsExpr idR
trS_using :: LHsExpr idR,
forall idL idR body. StmtLR idL idR body -> Maybe (LHsExpr idR)
trS_by :: Maybe (LHsExpr idR),
forall idL idR body. StmtLR idL idR body -> SyntaxExpr idR
trS_ret :: SyntaxExpr idR,
forall idL idR body. StmtLR idL idR body -> SyntaxExpr idR
trS_bind :: SyntaxExpr idR,
forall idL idR body. StmtLR idL idR body -> HsExpr idR
trS_fmap :: HsExpr idR
}
| RecStmt
{ forall idL idR body. StmtLR idL idR body -> XRecStmt idL idR body
recS_ext :: XRecStmt idL idR body
, forall idL idR body.
StmtLR idL idR body -> XRec idR [LStmtLR idL idR body]
recS_stmts :: XRec idR [LStmtLR idL idR body]
, forall idL idR body. StmtLR idL idR body -> [IdP idR]
recS_later_ids :: [IdP idR]
, forall idL idR body. StmtLR idL idR body -> [IdP idR]
recS_rec_ids :: [IdP idR]
, forall idL idR body. StmtLR idL idR body -> SyntaxExpr idR
recS_bind_fn :: SyntaxExpr idR
, forall idL idR body. StmtLR idL idR body -> SyntaxExpr idR
recS_ret_fn :: SyntaxExpr idR
, forall idL idR body. StmtLR idL idR body -> SyntaxExpr idR
recS_mfix_fn :: SyntaxExpr idR
}
| XStmtLR !(XXStmtLR idL idR body)
data TransForm
= ThenForm
| GroupForm
deriving Typeable TransForm
Typeable TransForm
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TransForm -> c TransForm)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TransForm)
-> (TransForm -> Constr)
-> (TransForm -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TransForm))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TransForm))
-> ((forall b. Data b => b -> b) -> TransForm -> TransForm)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TransForm -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TransForm -> r)
-> (forall u. (forall d. Data d => d -> u) -> TransForm -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> TransForm -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TransForm -> m TransForm)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TransForm -> m TransForm)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TransForm -> m TransForm)
-> Data TransForm
TransForm -> DataType
TransForm -> Constr
(forall b. Data b => b -> b) -> TransForm -> TransForm
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) -> TransForm -> u
forall u. (forall d. Data d => d -> u) -> TransForm -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TransForm -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TransForm -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TransForm -> m TransForm
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TransForm -> m TransForm
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TransForm
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TransForm -> c TransForm
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TransForm)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TransForm)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TransForm -> m TransForm
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TransForm -> m TransForm
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TransForm -> m TransForm
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TransForm -> m TransForm
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TransForm -> m TransForm
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TransForm -> m TransForm
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TransForm -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TransForm -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> TransForm -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TransForm -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TransForm -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TransForm -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TransForm -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TransForm -> r
gmapT :: (forall b. Data b => b -> b) -> TransForm -> TransForm
$cgmapT :: (forall b. Data b => b -> b) -> TransForm -> TransForm
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TransForm)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TransForm)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TransForm)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TransForm)
dataTypeOf :: TransForm -> DataType
$cdataTypeOf :: TransForm -> DataType
toConstr :: TransForm -> Constr
$ctoConstr :: TransForm -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TransForm
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TransForm
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TransForm -> c TransForm
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TransForm -> c TransForm
Data
data ParStmtBlock idL idR
= ParStmtBlock
(XParStmtBlock idL idR)
[ExprLStmt idL]
[IdP idR]
(SyntaxExpr idR)
| XParStmtBlock !(XXParStmtBlock idL idR)
type FailOperator id = Maybe (SyntaxExpr id)
data ApplicativeArg idL
= ApplicativeArgOne
{ forall idL. ApplicativeArg idL -> XApplicativeArgOne idL
xarg_app_arg_one :: XApplicativeArgOne idL
, forall idL. ApplicativeArg idL -> LPat idL
app_arg_pattern :: LPat idL
, forall idL. ApplicativeArg idL -> LHsExpr idL
arg_expr :: LHsExpr idL
, forall idL. ApplicativeArg idL -> Bool
is_body_stmt :: Bool
}
| ApplicativeArgMany
{ forall idL. ApplicativeArg idL -> XApplicativeArgMany idL
xarg_app_arg_many :: XApplicativeArgMany idL
, forall idL. ApplicativeArg idL -> [ExprLStmt idL]
app_stmts :: [ExprLStmt idL]
, forall idL. ApplicativeArg idL -> HsExpr idL
final_expr :: HsExpr idL
, forall idL. ApplicativeArg idL -> LPat idL
bv_pattern :: LPat idL
, forall idL.
ApplicativeArg idL -> HsStmtContext (ApplicativeArgStmCtxPass idL)
stmt_context :: HsStmtContext (ApplicativeArgStmCtxPass idL)
}
| XApplicativeArg !(XXApplicativeArg idL)
type family ApplicativeArgStmCtxPass idL
data HsSplice id
= HsTypedSplice
(XTypedSplice id)
SpliceDecoration
(IdP id)
(LHsExpr id)
| HsUntypedSplice
(XUntypedSplice id)
SpliceDecoration
(IdP id)
(LHsExpr id)
| HsQuasiQuote
(XQuasiQuote id)
(IdP id)
(IdP id)
SrcSpan
FastString
| HsSpliced
(XSpliced id)
ThModFinalizers
(HsSplicedThing id)
| XSplice !(XXSplice id)
data SpliceDecoration
= DollarSplice
| BareSplice
deriving (Typeable SpliceDecoration
Typeable SpliceDecoration
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SpliceDecoration -> c SpliceDecoration)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SpliceDecoration)
-> (SpliceDecoration -> Constr)
-> (SpliceDecoration -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SpliceDecoration))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SpliceDecoration))
-> ((forall b. Data b => b -> b)
-> SpliceDecoration -> SpliceDecoration)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SpliceDecoration -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SpliceDecoration -> r)
-> (forall u.
(forall d. Data d => d -> u) -> SpliceDecoration -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> SpliceDecoration -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SpliceDecoration -> m SpliceDecoration)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SpliceDecoration -> m SpliceDecoration)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SpliceDecoration -> m SpliceDecoration)
-> Data SpliceDecoration
SpliceDecoration -> DataType
SpliceDecoration -> Constr
(forall b. Data b => b -> b)
-> SpliceDecoration -> SpliceDecoration
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) -> SpliceDecoration -> u
forall u. (forall d. Data d => d -> u) -> SpliceDecoration -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SpliceDecoration -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SpliceDecoration -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SpliceDecoration -> m SpliceDecoration
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SpliceDecoration -> m SpliceDecoration
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SpliceDecoration
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SpliceDecoration -> c SpliceDecoration
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SpliceDecoration)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SpliceDecoration)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SpliceDecoration -> m SpliceDecoration
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SpliceDecoration -> m SpliceDecoration
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SpliceDecoration -> m SpliceDecoration
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SpliceDecoration -> m SpliceDecoration
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SpliceDecoration -> m SpliceDecoration
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> SpliceDecoration -> m SpliceDecoration
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SpliceDecoration -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SpliceDecoration -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> SpliceDecoration -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SpliceDecoration -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SpliceDecoration -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SpliceDecoration -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SpliceDecoration -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> SpliceDecoration -> r
gmapT :: (forall b. Data b => b -> b)
-> SpliceDecoration -> SpliceDecoration
$cgmapT :: (forall b. Data b => b -> b)
-> SpliceDecoration -> SpliceDecoration
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SpliceDecoration)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SpliceDecoration)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SpliceDecoration)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SpliceDecoration)
dataTypeOf :: SpliceDecoration -> DataType
$cdataTypeOf :: SpliceDecoration -> DataType
toConstr :: SpliceDecoration -> Constr
$ctoConstr :: SpliceDecoration -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SpliceDecoration
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SpliceDecoration
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SpliceDecoration -> c SpliceDecoration
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SpliceDecoration -> c SpliceDecoration
Data, SpliceDecoration -> SpliceDecoration -> Bool
(SpliceDecoration -> SpliceDecoration -> Bool)
-> (SpliceDecoration -> SpliceDecoration -> Bool)
-> Eq SpliceDecoration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SpliceDecoration -> SpliceDecoration -> Bool
$c/= :: SpliceDecoration -> SpliceDecoration -> Bool
== :: SpliceDecoration -> SpliceDecoration -> Bool
$c== :: SpliceDecoration -> SpliceDecoration -> Bool
Eq, Int -> SpliceDecoration -> ShowS
[SpliceDecoration] -> ShowS
SpliceDecoration -> String
(Int -> SpliceDecoration -> ShowS)
-> (SpliceDecoration -> String)
-> ([SpliceDecoration] -> ShowS)
-> Show SpliceDecoration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SpliceDecoration] -> ShowS
$cshowList :: [SpliceDecoration] -> ShowS
show :: SpliceDecoration -> String
$cshow :: SpliceDecoration -> String
showsPrec :: Int -> SpliceDecoration -> ShowS
$cshowsPrec :: Int -> SpliceDecoration -> ShowS
Show)
instance Outputable SpliceDecoration where
ppr :: SpliceDecoration -> SDoc
ppr SpliceDecoration
x = String -> SDoc
text (String -> SDoc) -> String -> SDoc
forall a b. (a -> b) -> a -> b
$ SpliceDecoration -> String
forall a. Show a => a -> String
show SpliceDecoration
x
isTypedSplice :: HsSplice id -> Bool
isTypedSplice :: forall id. HsSplice id -> Bool
isTypedSplice (HsTypedSplice {}) = Bool
True
isTypedSplice HsSplice id
_ = Bool
False
newtype ThModFinalizers = ThModFinalizers [ForeignRef (TH.Q ())]
instance Data ThModFinalizers where
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ThModFinalizers
gunfold forall b r. Data b => c (b -> r) -> c r
_ forall r. r -> c r
z Constr
_ = ThModFinalizers -> c ThModFinalizers
forall r. r -> c r
z (ThModFinalizers -> c ThModFinalizers)
-> ThModFinalizers -> c ThModFinalizers
forall a b. (a -> b) -> a -> b
$ [ForeignRef (Q ())] -> ThModFinalizers
ThModFinalizers []
toConstr :: ThModFinalizers -> Constr
toConstr ThModFinalizers
a = DataType -> String -> [String] -> Fixity -> Constr
mkConstr (ThModFinalizers -> DataType
forall a. Data a => a -> DataType
dataTypeOf ThModFinalizers
a) String
"ThModFinalizers" [] Fixity
Data.Prefix
dataTypeOf :: ThModFinalizers -> DataType
dataTypeOf ThModFinalizers
a = String -> [Constr] -> DataType
mkDataType String
"HsExpr.ThModFinalizers" [ThModFinalizers -> Constr
forall a. Data a => a -> Constr
toConstr ThModFinalizers
a]
data HsSplicedThing id
= HsSplicedExpr (HsExpr id)
| HsSplicedTy (HsType id)
| HsSplicedPat (Pat id)
type SplicePointName = Name
data UntypedSpliceFlavour
= UntypedExpSplice
| UntypedPatSplice
| UntypedTypeSplice
| UntypedDeclSplice
deriving Typeable UntypedSpliceFlavour
Typeable UntypedSpliceFlavour
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> UntypedSpliceFlavour
-> c UntypedSpliceFlavour)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UntypedSpliceFlavour)
-> (UntypedSpliceFlavour -> Constr)
-> (UntypedSpliceFlavour -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UntypedSpliceFlavour))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c UntypedSpliceFlavour))
-> ((forall b. Data b => b -> b)
-> UntypedSpliceFlavour -> UntypedSpliceFlavour)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UntypedSpliceFlavour -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UntypedSpliceFlavour -> r)
-> (forall u.
(forall d. Data d => d -> u) -> UntypedSpliceFlavour -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> UntypedSpliceFlavour -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> UntypedSpliceFlavour -> m UntypedSpliceFlavour)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UntypedSpliceFlavour -> m UntypedSpliceFlavour)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UntypedSpliceFlavour -> m UntypedSpliceFlavour)
-> Data UntypedSpliceFlavour
UntypedSpliceFlavour -> DataType
UntypedSpliceFlavour -> Constr
(forall b. Data b => b -> b)
-> UntypedSpliceFlavour -> UntypedSpliceFlavour
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) -> UntypedSpliceFlavour -> u
forall u.
(forall d. Data d => d -> u) -> UntypedSpliceFlavour -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UntypedSpliceFlavour -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UntypedSpliceFlavour -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> UntypedSpliceFlavour -> m UntypedSpliceFlavour
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UntypedSpliceFlavour -> m UntypedSpliceFlavour
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UntypedSpliceFlavour
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> UntypedSpliceFlavour
-> c UntypedSpliceFlavour
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UntypedSpliceFlavour)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c UntypedSpliceFlavour)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UntypedSpliceFlavour -> m UntypedSpliceFlavour
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UntypedSpliceFlavour -> m UntypedSpliceFlavour
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UntypedSpliceFlavour -> m UntypedSpliceFlavour
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UntypedSpliceFlavour -> m UntypedSpliceFlavour
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> UntypedSpliceFlavour -> m UntypedSpliceFlavour
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> UntypedSpliceFlavour -> m UntypedSpliceFlavour
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> UntypedSpliceFlavour -> u
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> UntypedSpliceFlavour -> u
gmapQ :: forall u.
(forall d. Data d => d -> u) -> UntypedSpliceFlavour -> [u]
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> UntypedSpliceFlavour -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UntypedSpliceFlavour -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UntypedSpliceFlavour -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UntypedSpliceFlavour -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> UntypedSpliceFlavour -> r
gmapT :: (forall b. Data b => b -> b)
-> UntypedSpliceFlavour -> UntypedSpliceFlavour
$cgmapT :: (forall b. Data b => b -> b)
-> UntypedSpliceFlavour -> UntypedSpliceFlavour
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c UntypedSpliceFlavour)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c UntypedSpliceFlavour)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UntypedSpliceFlavour)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UntypedSpliceFlavour)
dataTypeOf :: UntypedSpliceFlavour -> DataType
$cdataTypeOf :: UntypedSpliceFlavour -> DataType
toConstr :: UntypedSpliceFlavour -> Constr
$ctoConstr :: UntypedSpliceFlavour -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UntypedSpliceFlavour
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UntypedSpliceFlavour
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> UntypedSpliceFlavour
-> c UntypedSpliceFlavour
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> UntypedSpliceFlavour
-> c UntypedSpliceFlavour
Data
data HsBracket p
= ExpBr (XExpBr p) (LHsExpr p)
| PatBr (XPatBr p) (LPat p)
| DecBrL (XDecBrL p) [LHsDecl p]
| DecBrG (XDecBrG p) (HsGroup p)
| TypBr (XTypBr p) (LHsType p)
| VarBr (XVarBr p) Bool (LIdP p)
| TExpBr (XTExpBr p) (LHsExpr p)
| XBracket !(XXBracket p)
isTypedBracket :: HsBracket id -> Bool
isTypedBracket :: forall id. HsBracket id -> Bool
isTypedBracket (TExpBr {}) = Bool
True
isTypedBracket HsBracket id
_ = Bool
False
data ArithSeqInfo id
= From (LHsExpr id)
| FromThen (LHsExpr id)
(LHsExpr id)
| FromTo (LHsExpr id)
(LHsExpr id)
| FromThenTo (LHsExpr id)
(LHsExpr id)
(LHsExpr id)
data HsMatchContext p
= FunRhs { forall p. HsMatchContext p -> LIdP p
mc_fun :: LIdP p
, forall p. HsMatchContext p -> LexicalFixity
mc_fixity :: LexicalFixity
, forall p. HsMatchContext p -> SrcStrictness
mc_strictness :: SrcStrictness
}
| LambdaExpr
| CaseAlt
| IfAlt
| ArrowMatchCtxt
HsArrowMatchContext
| PatBindRhs
| PatBindGuards
| RecUpd
| StmtCtxt (HsStmtContext p)
| ThPatSplice
| ThPatQuote
| PatSyn
isPatSynCtxt :: HsMatchContext p -> Bool
isPatSynCtxt :: forall p. HsMatchContext p -> Bool
isPatSynCtxt HsMatchContext p
ctxt =
case HsMatchContext p
ctxt of
HsMatchContext p
PatSyn -> Bool
True
HsMatchContext p
_ -> Bool
False
data HsStmtContext p
= ListComp
| MonadComp
| DoExpr (Maybe ModuleName)
| MDoExpr (Maybe ModuleName)
| ArrowExpr
| GhciStmtCtxt
| PatGuard (HsMatchContext p)
| ParStmtCtxt (HsStmtContext p)
| TransStmtCtxt (HsStmtContext p)
data HsArrowMatchContext
= ProcExpr
| ArrowCaseAlt
| KappaExpr
qualifiedDoModuleName_maybe :: HsStmtContext p -> Maybe ModuleName
qualifiedDoModuleName_maybe :: forall p. HsStmtContext p -> Maybe ModuleName
qualifiedDoModuleName_maybe HsStmtContext p
ctxt = case HsStmtContext p
ctxt of
DoExpr Maybe ModuleName
m -> Maybe ModuleName
m
MDoExpr Maybe ModuleName
m -> Maybe ModuleName
m
HsStmtContext p
_ -> Maybe ModuleName
forall a. Maybe a
Nothing
isComprehensionContext :: HsStmtContext id -> Bool
isComprehensionContext :: forall id. HsStmtContext id -> Bool
isComprehensionContext HsStmtContext id
ListComp = Bool
True
isComprehensionContext HsStmtContext id
MonadComp = Bool
True
isComprehensionContext (ParStmtCtxt HsStmtContext id
c) = HsStmtContext id -> Bool
forall id. HsStmtContext id -> Bool
isComprehensionContext HsStmtContext id
c
isComprehensionContext (TransStmtCtxt HsStmtContext id
c) = HsStmtContext id -> Bool
forall id. HsStmtContext id -> Bool
isComprehensionContext HsStmtContext id
c
isComprehensionContext HsStmtContext id
_ = Bool
False
isMonadStmtContext :: HsStmtContext id -> Bool
isMonadStmtContext :: forall id. HsStmtContext id -> Bool
isMonadStmtContext HsStmtContext id
MonadComp = Bool
True
isMonadStmtContext DoExpr{} = Bool
True
isMonadStmtContext MDoExpr{} = Bool
True
isMonadStmtContext HsStmtContext id
GhciStmtCtxt = Bool
True
isMonadStmtContext (ParStmtCtxt HsStmtContext id
ctxt) = HsStmtContext id -> Bool
forall id. HsStmtContext id -> Bool
isMonadStmtContext HsStmtContext id
ctxt
isMonadStmtContext (TransStmtCtxt HsStmtContext id
ctxt) = HsStmtContext id -> Bool
forall id. HsStmtContext id -> Bool
isMonadStmtContext HsStmtContext id
ctxt
isMonadStmtContext HsStmtContext id
_ = Bool
False
isMonadCompContext :: HsStmtContext id -> Bool
isMonadCompContext :: forall id. HsStmtContext id -> Bool
isMonadCompContext HsStmtContext id
MonadComp = Bool
True
isMonadCompContext HsStmtContext id
_ = Bool
False
matchSeparator :: HsMatchContext p -> SDoc
matchSeparator :: forall p. HsMatchContext p -> SDoc
matchSeparator (FunRhs {}) = String -> SDoc
text String
"="
matchSeparator HsMatchContext p
CaseAlt = String -> SDoc
text String
"->"
matchSeparator HsMatchContext p
IfAlt = String -> SDoc
text String
"->"
matchSeparator HsMatchContext p
LambdaExpr = String -> SDoc
text String
"->"
matchSeparator (ArrowMatchCtxt{})= String -> SDoc
text String
"->"
matchSeparator HsMatchContext p
PatBindRhs = String -> SDoc
text String
"="
matchSeparator HsMatchContext p
PatBindGuards = String -> SDoc
text String
"="
matchSeparator (StmtCtxt HsStmtContext p
_) = String -> SDoc
text String
"<-"
matchSeparator HsMatchContext p
RecUpd = String -> SDoc
text String
"="
matchSeparator HsMatchContext p
ThPatSplice = String -> SDoc
forall a. String -> a
panic String
"unused"
matchSeparator HsMatchContext p
ThPatQuote = String -> SDoc
forall a. String -> a
panic String
"unused"
matchSeparator HsMatchContext p
PatSyn = String -> SDoc
forall a. String -> a
panic String
"unused"
pprMatchContext :: (Outputable (IdP p), UnXRec p)
=> HsMatchContext p -> SDoc
pprMatchContext :: forall p.
(Outputable (IdP p), UnXRec p) =>
HsMatchContext p -> SDoc
pprMatchContext HsMatchContext p
ctxt
| HsMatchContext p -> Bool
forall p. HsMatchContext p -> Bool
want_an HsMatchContext p
ctxt = String -> SDoc
text String
"an" SDoc -> SDoc -> SDoc
<+> HsMatchContext p -> SDoc
forall p.
(Outputable (IdP p), UnXRec p) =>
HsMatchContext p -> SDoc
pprMatchContextNoun HsMatchContext p
ctxt
| Bool
otherwise = String -> SDoc
text String
"a" SDoc -> SDoc -> SDoc
<+> HsMatchContext p -> SDoc
forall p.
(Outputable (IdP p), UnXRec p) =>
HsMatchContext p -> SDoc
pprMatchContextNoun HsMatchContext p
ctxt
where
want_an :: HsMatchContext p -> Bool
want_an (FunRhs {}) = Bool
True
want_an (ArrowMatchCtxt HsArrowMatchContext
ProcExpr) = Bool
True
want_an (ArrowMatchCtxt HsArrowMatchContext
KappaExpr) = Bool
True
want_an HsMatchContext p
_ = Bool
False
pprMatchContextNoun :: forall p. (Outputable (IdP p), UnXRec p)
=> HsMatchContext p -> SDoc
pprMatchContextNoun :: forall p.
(Outputable (IdP p), UnXRec p) =>
HsMatchContext p -> SDoc
pprMatchContextNoun (FunRhs {mc_fun :: forall p. HsMatchContext p -> LIdP p
mc_fun=LIdP p
fun})
= String -> SDoc
text String
"equation for"
SDoc -> SDoc -> SDoc
<+> SDoc -> SDoc
quotes (IdP p -> SDoc
forall a. Outputable a => a -> SDoc
ppr (forall p a. UnXRec p => XRec p a -> a
unXRec @p LIdP p
fun))
pprMatchContextNoun HsMatchContext p
CaseAlt = String -> SDoc
text String
"case alternative"
pprMatchContextNoun HsMatchContext p
IfAlt = String -> SDoc
text String
"multi-way if alternative"
pprMatchContextNoun HsMatchContext p
RecUpd = String -> SDoc
text String
"record-update construct"
pprMatchContextNoun HsMatchContext p
ThPatSplice = String -> SDoc
text String
"Template Haskell pattern splice"
pprMatchContextNoun HsMatchContext p
ThPatQuote = String -> SDoc
text String
"Template Haskell pattern quotation"
pprMatchContextNoun HsMatchContext p
PatBindRhs = String -> SDoc
text String
"pattern binding"
pprMatchContextNoun HsMatchContext p
PatBindGuards = String -> SDoc
text String
"pattern binding guards"
pprMatchContextNoun HsMatchContext p
LambdaExpr = String -> SDoc
text String
"lambda abstraction"
pprMatchContextNoun (ArrowMatchCtxt HsArrowMatchContext
c)= HsArrowMatchContext -> SDoc
pprArrowMatchContextNoun HsArrowMatchContext
c
pprMatchContextNoun (StmtCtxt HsStmtContext p
ctxt) = String -> SDoc
text String
"pattern binding in"
SDoc -> SDoc -> SDoc
$$ HsStmtContext p -> SDoc
forall p. (Outputable (IdP p), UnXRec p) => HsStmtContext p -> SDoc
pprAStmtContext HsStmtContext p
ctxt
pprMatchContextNoun HsMatchContext p
PatSyn = String -> SDoc
text String
"pattern synonym declaration"
pprArrowMatchContextNoun :: HsArrowMatchContext -> SDoc
pprArrowMatchContextNoun :: HsArrowMatchContext -> SDoc
pprArrowMatchContextNoun HsArrowMatchContext
ProcExpr = String -> SDoc
text String
"arrow proc pattern"
pprArrowMatchContextNoun HsArrowMatchContext
ArrowCaseAlt = String -> SDoc
text String
"case alternative within arrow notation"
pprArrowMatchContextNoun HsArrowMatchContext
KappaExpr = String -> SDoc
text String
"arrow kappa abstraction"
pprAStmtContext, pprStmtContext :: (Outputable (IdP p), UnXRec p)
=> HsStmtContext p -> SDoc
pprAStmtContext :: forall p. (Outputable (IdP p), UnXRec p) => HsStmtContext p -> SDoc
pprAStmtContext HsStmtContext p
ctxt = SDoc
article SDoc -> SDoc -> SDoc
<+> HsStmtContext p -> SDoc
forall p. (Outputable (IdP p), UnXRec p) => HsStmtContext p -> SDoc
pprStmtContext HsStmtContext p
ctxt
where
pp_an :: SDoc
pp_an = String -> SDoc
text String
"an"
pp_a :: SDoc
pp_a = String -> SDoc
text String
"a"
article :: SDoc
article = case HsStmtContext p
ctxt of
MDoExpr Maybe ModuleName
Nothing -> SDoc
pp_an
HsStmtContext p
GhciStmtCtxt -> SDoc
pp_an
HsStmtContext p
_ -> SDoc
pp_a
pprStmtContext :: forall p. (Outputable (IdP p), UnXRec p) => HsStmtContext p -> SDoc
pprStmtContext HsStmtContext p
GhciStmtCtxt = String -> SDoc
text String
"interactive GHCi command"
pprStmtContext (DoExpr Maybe ModuleName
m) = Maybe ModuleName -> SDoc -> SDoc
prependQualified Maybe ModuleName
m (String -> SDoc
text String
"'do' block")
pprStmtContext (MDoExpr Maybe ModuleName
m) = Maybe ModuleName -> SDoc -> SDoc
prependQualified Maybe ModuleName
m (String -> SDoc
text String
"'mdo' block")
pprStmtContext HsStmtContext p
ArrowExpr = String -> SDoc
text String
"'do' block in an arrow command"
pprStmtContext HsStmtContext p
ListComp = String -> SDoc
text String
"list comprehension"
pprStmtContext HsStmtContext p
MonadComp = String -> SDoc
text String
"monad comprehension"
pprStmtContext (PatGuard HsMatchContext p
ctxt) = String -> SDoc
text String
"pattern guard for" SDoc -> SDoc -> SDoc
$$ HsMatchContext p -> SDoc
forall p.
(Outputable (IdP p), UnXRec p) =>
HsMatchContext p -> SDoc
pprMatchContext HsMatchContext p
ctxt
pprStmtContext (ParStmtCtxt HsStmtContext p
c) =
SDoc -> SDoc -> SDoc
ifPprDebug ([SDoc] -> SDoc
sep [String -> SDoc
text String
"parallel branch of", HsStmtContext p -> SDoc
forall p. (Outputable (IdP p), UnXRec p) => HsStmtContext p -> SDoc
pprAStmtContext HsStmtContext p
c])
(HsStmtContext p -> SDoc
forall p. (Outputable (IdP p), UnXRec p) => HsStmtContext p -> SDoc
pprStmtContext HsStmtContext p
c)
pprStmtContext (TransStmtCtxt HsStmtContext p
c) =
SDoc -> SDoc -> SDoc
ifPprDebug ([SDoc] -> SDoc
sep [String -> SDoc
text String
"transformed branch of", HsStmtContext p -> SDoc
forall p. (Outputable (IdP p), UnXRec p) => HsStmtContext p -> SDoc
pprAStmtContext HsStmtContext p
c])
(HsStmtContext p -> SDoc
forall p. (Outputable (IdP p), UnXRec p) => HsStmtContext p -> SDoc
pprStmtContext HsStmtContext p
c)
prependQualified :: Maybe ModuleName -> SDoc -> SDoc
prependQualified :: Maybe ModuleName -> SDoc -> SDoc
prependQualified Maybe ModuleName
Nothing SDoc
t = SDoc
t
prependQualified (Just ModuleName
_) SDoc
t = String -> SDoc
text String
"qualified" SDoc -> SDoc -> SDoc
<+> SDoc
t