{-# 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
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.Core.DataCon (FieldLabelString)
import GHC.Types.Name
import GHC.Types.Basic
import GHC.Types.Fixity
import GHC.Types.Name.Reader
import GHC.Types.SourceText
import GHC.Types.SrcLoc
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)
type LFieldLabelStrings p = XRec p (FieldLabelStrings p)
newtype FieldLabelStrings p =
FieldLabelStrings [XRec p (DotFieldOcc p)]
instance (UnXRec p, Outputable (XRec p FieldLabelString)) => Outputable (FieldLabelStrings p) where
ppr :: FieldLabelStrings p -> SDoc
ppr (FieldLabelStrings [XRec p (DotFieldOcc p)]
flds) =
[SDoc] -> SDoc
hcat (SDoc -> [SDoc] -> [SDoc]
punctuate SDoc
dot ((XRec p (DotFieldOcc p) -> SDoc)
-> [XRec p (DotFieldOcc p)] -> [SDoc]
forall a b. (a -> b) -> [a] -> [b]
map (DotFieldOcc p -> SDoc
forall a. Outputable a => a -> SDoc
ppr (DotFieldOcc p -> SDoc)
-> (XRec p (DotFieldOcc p) -> DotFieldOcc p)
-> XRec p (DotFieldOcc p)
-> SDoc
forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall p a. UnXRec p => XRec p a -> a
unXRec @p) [XRec p (DotFieldOcc p)]
flds))
instance (UnXRec p, Outputable (XRec p FieldLabelString)) => OutputableBndr (FieldLabelStrings p) where
pprInfixOcc :: FieldLabelStrings p -> SDoc
pprInfixOcc = FieldLabelStrings p -> SDoc
forall p.
(UnXRec p, Outputable (XRec p FastString)) =>
FieldLabelStrings p -> SDoc
pprFieldLabelStrings
pprPrefixOcc :: FieldLabelStrings p -> SDoc
pprPrefixOcc = FieldLabelStrings p -> SDoc
forall p.
(UnXRec p, Outputable (XRec p FastString)) =>
FieldLabelStrings p -> SDoc
pprFieldLabelStrings
instance (UnXRec p, Outputable (XRec p FieldLabelString)) => OutputableBndr (Located (FieldLabelStrings p)) where
pprInfixOcc :: Located (FieldLabelStrings p) -> SDoc
pprInfixOcc = FieldLabelStrings p -> SDoc
forall a. OutputableBndr a => a -> SDoc
pprInfixOcc (FieldLabelStrings p -> SDoc)
-> (Located (FieldLabelStrings p) -> FieldLabelStrings p)
-> Located (FieldLabelStrings p)
-> SDoc
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Located (FieldLabelStrings p) -> FieldLabelStrings p
forall l e. GenLocated l e -> e
unLoc
pprPrefixOcc :: Located (FieldLabelStrings p) -> SDoc
pprPrefixOcc = FieldLabelStrings p -> SDoc
forall a. OutputableBndr a => a -> SDoc
pprInfixOcc (FieldLabelStrings p -> SDoc)
-> (Located (FieldLabelStrings p) -> FieldLabelStrings p)
-> Located (FieldLabelStrings p)
-> SDoc
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Located (FieldLabelStrings p) -> FieldLabelStrings p
forall l e. GenLocated l e -> e
unLoc
pprFieldLabelStrings :: forall p. (UnXRec p, Outputable (XRec p FieldLabelString)) => FieldLabelStrings p -> SDoc
pprFieldLabelStrings :: forall p.
(UnXRec p, Outputable (XRec p FastString)) =>
FieldLabelStrings p -> SDoc
pprFieldLabelStrings (FieldLabelStrings [XRec p (DotFieldOcc p)]
flds) =
[SDoc] -> SDoc
hcat (SDoc -> [SDoc] -> [SDoc]
punctuate SDoc
dot ((XRec p (DotFieldOcc p) -> SDoc)
-> [XRec p (DotFieldOcc p)] -> [SDoc]
forall a b. (a -> b) -> [a] -> [b]
map (DotFieldOcc p -> SDoc
forall a. Outputable a => a -> SDoc
ppr (DotFieldOcc p -> SDoc)
-> (XRec p (DotFieldOcc p) -> DotFieldOcc p)
-> XRec p (DotFieldOcc p)
-> SDoc
forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall p a. UnXRec p => XRec p a -> a
unXRec @p) [XRec p (DotFieldOcc p)]
flds))
pprPrefixFieldLabelStrings :: forall p. (UnXRec p, Outputable (XRec p FieldLabelString))
=> FieldLabelStrings p -> SDoc
pprPrefixFieldLabelStrings :: forall p.
(UnXRec p, Outputable (XRec p FastString)) =>
FieldLabelStrings p -> SDoc
pprPrefixFieldLabelStrings (FieldLabelStrings [XRec p (DotFieldOcc p)]
flds) =
[SDoc] -> SDoc
hcat (SDoc -> [SDoc] -> [SDoc]
punctuate SDoc
dot ((XRec p (DotFieldOcc p) -> SDoc)
-> [XRec p (DotFieldOcc p)] -> [SDoc]
forall a b. (a -> b) -> [a] -> [b]
map (DotFieldOcc p -> SDoc
forall p. UnXRec p => DotFieldOcc p -> SDoc
pprPrefixFieldLabelString (DotFieldOcc p -> SDoc)
-> (XRec p (DotFieldOcc p) -> DotFieldOcc p)
-> XRec p (DotFieldOcc p)
-> SDoc
forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall p a. UnXRec p => XRec p a -> a
unXRec @p) [XRec p (DotFieldOcc p)]
flds))
pprPrefixFieldLabelString :: forall p. UnXRec p => DotFieldOcc p -> SDoc
pprPrefixFieldLabelString :: forall p. UnXRec p => DotFieldOcc p -> SDoc
pprPrefixFieldLabelString (DotFieldOcc XCDotFieldOcc p
_ XRec p FastString
s) = (FastString -> SDoc
pprPrefixFastString (FastString -> SDoc)
-> (XRec p FastString -> FastString) -> XRec p FastString -> SDoc
forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall p a. UnXRec p => XRec p a -> a
unXRec @p) XRec p FastString
s
pprPrefixFieldLabelString XDotFieldOcc{} = String -> SDoc
text String
"XDotFieldOcc"
pprPrefixFastString :: FastString -> SDoc
pprPrefixFastString :: FastString -> SDoc
pprPrefixFastString FastString
fs = RdrName -> SDoc
forall a. OutputableBndr a => a -> SDoc
pprPrefixOcc (FastString -> RdrName
mkVarUnqual FastString
fs)
instance UnXRec p => Outputable (DotFieldOcc p) where
ppr :: DotFieldOcc p -> SDoc
ppr (DotFieldOcc XCDotFieldOcc p
_ XRec p FastString
s) = (FastString -> SDoc
pprPrefixFastString (FastString -> SDoc)
-> (XRec p FastString -> FastString) -> XRec p FastString -> SDoc
forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall p a. UnXRec p => XRec p a -> a
unXRec @p) XRec p FastString
s
ppr XDotFieldOcc{} = String -> SDoc
text String
"XDotFieldOcc"
type RecProj p arg = HsFieldBind (LFieldLabelStrings 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
| HsRecSel (XRecSel p)
(FieldOcc 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) LamCaseVariant (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)
!(LHsToken "(" p)
(LHsExpr p)
!(LHsToken ")" 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)
!(LHsToken "let" p)
(HsLocalBinds p)
!(LHsToken "in" p)
(LHsExpr p)
| HsDo (XDo p)
HsDoFlavour
(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 -> XRec p (DotFieldOcc p)
gf_field :: XRec p (DotFieldOcc p)
}
| HsProjection {
forall p. HsExpr p -> XProjection p
proj_ext :: XProjection p
, forall p. HsExpr p -> NonEmpty (XRec p (DotFieldOcc p))
proj_flds :: NonEmpty (XRec p (DotFieldOcc p))
}
| ExprWithTySig
(XExprWithTySig p)
(LHsExpr p)
(LHsSigWcType (NoGhcTc p))
| ArithSeq
(XArithSeq p)
(Maybe (SyntaxExpr p))
(ArithSeqInfo p)
| HsTypedBracket (XTypedBracket p) (LHsExpr p)
| HsUntypedBracket (XUntypedBracket p) (HsQuote p)
| HsSpliceE (XSpliceE p) (HsSplice p)
| HsProc (XProc p)
(LPat p)
(LHsCmdTop p)
| HsStatic (XStatic p)
(LHsExpr p)
| HsPragE (XPragE p) (HsPragE p) (LHsExpr p)
| XExpr !(XXExpr p)
data DotFieldOcc p
= DotFieldOcc
{ forall p. DotFieldOcc p -> XCDotFieldOcc p
dfoExt :: XCDotFieldOcc p
, forall p. DotFieldOcc p -> XRec p FastString
dfoLabel :: XRec p FieldLabelString
}
| XDotFieldOcc !(XXDotFieldOcc 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)
data LamCaseVariant
= LamCase
| LamCases
deriving (Typeable LamCaseVariant
Typeable LamCaseVariant
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LamCaseVariant -> c LamCaseVariant)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LamCaseVariant)
-> (LamCaseVariant -> Constr)
-> (LamCaseVariant -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LamCaseVariant))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LamCaseVariant))
-> ((forall b. Data b => b -> b)
-> LamCaseVariant -> LamCaseVariant)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LamCaseVariant -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LamCaseVariant -> r)
-> (forall u.
(forall d. Data d => d -> u) -> LamCaseVariant -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> LamCaseVariant -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> LamCaseVariant -> m LamCaseVariant)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LamCaseVariant -> m LamCaseVariant)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LamCaseVariant -> m LamCaseVariant)
-> Data LamCaseVariant
LamCaseVariant -> Constr
LamCaseVariant -> DataType
(forall b. Data b => b -> b) -> LamCaseVariant -> LamCaseVariant
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) -> LamCaseVariant -> u
forall u. (forall d. Data d => d -> u) -> LamCaseVariant -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LamCaseVariant -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LamCaseVariant -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> LamCaseVariant -> m LamCaseVariant
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LamCaseVariant -> m LamCaseVariant
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LamCaseVariant
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LamCaseVariant -> c LamCaseVariant
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LamCaseVariant)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LamCaseVariant)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LamCaseVariant -> c LamCaseVariant
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> LamCaseVariant -> c LamCaseVariant
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LamCaseVariant
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c LamCaseVariant
$ctoConstr :: LamCaseVariant -> Constr
toConstr :: LamCaseVariant -> Constr
$cdataTypeOf :: LamCaseVariant -> DataType
dataTypeOf :: LamCaseVariant -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LamCaseVariant)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c LamCaseVariant)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LamCaseVariant)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c LamCaseVariant)
$cgmapT :: (forall b. Data b => b -> b) -> LamCaseVariant -> LamCaseVariant
gmapT :: (forall b. Data b => b -> b) -> LamCaseVariant -> LamCaseVariant
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LamCaseVariant -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> LamCaseVariant -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LamCaseVariant -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> LamCaseVariant -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> LamCaseVariant -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> LamCaseVariant -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> LamCaseVariant -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> LamCaseVariant -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> LamCaseVariant -> m LamCaseVariant
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> LamCaseVariant -> m LamCaseVariant
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LamCaseVariant -> m LamCaseVariant
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LamCaseVariant -> m LamCaseVariant
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LamCaseVariant -> m LamCaseVariant
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> LamCaseVariant -> m LamCaseVariant
Data, LamCaseVariant -> LamCaseVariant -> Bool
(LamCaseVariant -> LamCaseVariant -> Bool)
-> (LamCaseVariant -> LamCaseVariant -> Bool) -> Eq LamCaseVariant
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LamCaseVariant -> LamCaseVariant -> Bool
== :: LamCaseVariant -> LamCaseVariant -> Bool
$c/= :: LamCaseVariant -> LamCaseVariant -> Bool
/= :: LamCaseVariant -> LamCaseVariant -> Bool
Eq)
lamCaseKeyword :: LamCaseVariant -> SDoc
lamCaseKeyword :: LamCaseVariant -> SDoc
lamCaseKeyword LamCaseVariant
LamCase = String -> SDoc
text String
"\\case"
lamCaseKeyword LamCaseVariant
LamCases = String -> SDoc
text String
"\\cases"
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)
!(LHsToken "(" id)
(LHsCmd id)
!(LHsToken ")" id)
| HsCmdCase (XCmdCase id)
(LHsExpr id)
(MatchGroup id (LHsCmd id))
| HsCmdLamCase (XCmdLamCase id) LamCaseVariant
(MatchGroup id (LHsCmd id))
| HsCmdIf (XCmdIf id)
(SyntaxExpr id)
(LHsExpr id)
(LHsCmd id)
(LHsCmd id)
| HsCmdLet (XCmdLet id)
!(LHsToken "let" id)
(HsLocalBinds id)
!(LHsToken "in" 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 -> Constr
HsArrAppType -> DataType
(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)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> HsArrAppType -> c HsArrAppType
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> HsArrAppType -> c HsArrAppType
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c HsArrAppType
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c HsArrAppType
$ctoConstr :: HsArrAppType -> Constr
toConstr :: HsArrAppType -> Constr
$cdataTypeOf :: HsArrAppType -> DataType
dataTypeOf :: HsArrAppType -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c HsArrAppType)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c HsArrAppType)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c HsArrAppType)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c HsArrAppType)
$cgmapT :: (forall b. Data b => b -> b) -> HsArrAppType -> HsArrAppType
gmapT :: (forall b. Data b => b -> b) -> HsArrAppType -> HsArrAppType
$cgmapQl :: 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
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> HsArrAppType -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> HsArrAppType -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> HsArrAppType -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> HsArrAppType -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> HsArrAppType -> u
$cgmapM :: forall (m :: * -> *).
Monad 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
$cgmapMp :: 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
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> HsArrAppType -> m HsArrAppType
Data
pprHsArrType :: HsArrAppType -> SDoc
pprHsArrType :: HsArrAppType -> SDoc
pprHsArrType HsArrAppType
HsHigherOrderApp = String -> SDoc
text String
"higher order arrow application"
pprHsArrType HsArrAppType
HsFirstOrderApp = String -> SDoc
text String
"first order arrow application"
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 -> Constr
MatchGroupTc -> DataType
(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)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MatchGroupTc -> c MatchGroupTc
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> MatchGroupTc -> c MatchGroupTc
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MatchGroupTc
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c MatchGroupTc
$ctoConstr :: MatchGroupTc -> Constr
toConstr :: MatchGroupTc -> Constr
$cdataTypeOf :: MatchGroupTc -> DataType
dataTypeOf :: MatchGroupTc -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MatchGroupTc)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c MatchGroupTc)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MatchGroupTc)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c MatchGroupTc)
$cgmapT :: (forall b. Data b => b -> b) -> MatchGroupTc -> MatchGroupTc
gmapT :: (forall b. Data b => b -> b) -> MatchGroupTc -> MatchGroupTc
$cgmapQl :: 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
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> MatchGroupTc -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> MatchGroupTc -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> MatchGroupTc -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> MatchGroupTc -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> MatchGroupTc -> u
$cgmapM :: forall (m :: * -> *).
Monad 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
$cgmapMp :: 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
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MatchGroupTc -> m MatchGroupTc
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> MatchGroupTc -> m 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 p
m_ctxt :: HsMatchContext 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 id
forall p body. Match p body -> HsMatchContext p
m_ctxt Match id body
match of
FunRhs {mc_fixity :: forall p. HsMatchContext p -> LexicalFixity
mc_fixity = LexicalFixity
Infix} -> Bool
True
HsMatchContext 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 -> Constr
TransForm -> DataType
(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)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TransForm -> c TransForm
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TransForm -> c TransForm
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TransForm
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TransForm
$ctoConstr :: TransForm -> Constr
toConstr :: TransForm -> Constr
$cdataTypeOf :: TransForm -> DataType
dataTypeOf :: TransForm -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TransForm)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TransForm)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TransForm)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TransForm)
$cgmapT :: (forall b. Data b => b -> b) -> TransForm -> TransForm
gmapT :: (forall b. Data b => b -> b) -> TransForm -> TransForm
$cgmapQl :: 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
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TransForm -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TransForm -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TransForm -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> TransForm -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TransForm -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TransForm -> u
$cgmapM :: forall (m :: * -> *).
Monad 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
$cgmapMp :: 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
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TransForm -> m TransForm
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TransForm -> m 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 -> HsDoFlavour
stmt_context :: HsDoFlavour
}
| XApplicativeArg !(XXApplicativeArg 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 -> Constr
SpliceDecoration -> DataType
(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)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SpliceDecoration -> c SpliceDecoration
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> SpliceDecoration -> c SpliceDecoration
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SpliceDecoration
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c SpliceDecoration
$ctoConstr :: SpliceDecoration -> Constr
toConstr :: SpliceDecoration -> Constr
$cdataTypeOf :: SpliceDecoration -> DataType
dataTypeOf :: SpliceDecoration -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SpliceDecoration)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c SpliceDecoration)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SpliceDecoration)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c SpliceDecoration)
$cgmapT :: (forall b. Data b => b -> b)
-> SpliceDecoration -> SpliceDecoration
gmapT :: (forall b. Data b => b -> b)
-> SpliceDecoration -> SpliceDecoration
$cgmapQl :: 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
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SpliceDecoration -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> SpliceDecoration -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> SpliceDecoration -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> SpliceDecoration -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SpliceDecoration -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> SpliceDecoration -> u
$cgmapM :: forall (m :: * -> *).
Monad 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
$cgmapMp :: 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
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SpliceDecoration -> m SpliceDecoration
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> SpliceDecoration -> m SpliceDecoration
Data, SpliceDecoration -> SpliceDecoration -> Bool
(SpliceDecoration -> SpliceDecoration -> Bool)
-> (SpliceDecoration -> SpliceDecoration -> Bool)
-> Eq SpliceDecoration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SpliceDecoration -> SpliceDecoration -> Bool
== :: SpliceDecoration -> SpliceDecoration -> Bool
$c/= :: SpliceDecoration -> SpliceDecoration -> Bool
/= :: 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
$cshowsPrec :: Int -> SpliceDecoration -> ShowS
showsPrec :: Int -> SpliceDecoration -> ShowS
$cshow :: SpliceDecoration -> String
show :: SpliceDecoration -> String
$cshowList :: [SpliceDecoration] -> ShowS
showList :: [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)
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 -> Constr
UntypedSpliceFlavour -> DataType
(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)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> UntypedSpliceFlavour
-> c UntypedSpliceFlavour
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g)
-> UntypedSpliceFlavour
-> c UntypedSpliceFlavour
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UntypedSpliceFlavour
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c UntypedSpliceFlavour
$ctoConstr :: UntypedSpliceFlavour -> Constr
toConstr :: UntypedSpliceFlavour -> Constr
$cdataTypeOf :: UntypedSpliceFlavour -> DataType
dataTypeOf :: UntypedSpliceFlavour -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UntypedSpliceFlavour)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c UntypedSpliceFlavour)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c UntypedSpliceFlavour)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c UntypedSpliceFlavour)
$cgmapT :: (forall b. Data b => b -> b)
-> UntypedSpliceFlavour -> UntypedSpliceFlavour
gmapT :: (forall b. Data b => b -> b)
-> UntypedSpliceFlavour -> UntypedSpliceFlavour
$cgmapQl :: 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
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UntypedSpliceFlavour -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> UntypedSpliceFlavour -> r
$cgmapQ :: forall u.
(forall d. Data d => d -> u) -> UntypedSpliceFlavour -> [u]
gmapQ :: forall u.
(forall d. Data d => d -> u) -> UntypedSpliceFlavour -> [u]
$cgmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> UntypedSpliceFlavour -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> UntypedSpliceFlavour -> u
$cgmapM :: forall (m :: * -> *).
Monad 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
$cgmapMp :: 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
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UntypedSpliceFlavour -> m UntypedSpliceFlavour
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> UntypedSpliceFlavour -> m UntypedSpliceFlavour
Data
data HsQuote 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)
| XQuote !(XXQuote p)
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 (NoGhcTc p)
mc_fun :: LIdP (NoGhcTc p)
, forall p. HsMatchContext p -> LexicalFixity
mc_fixity :: LexicalFixity
, forall p. HsMatchContext p -> SrcStrictness
mc_strictness :: SrcStrictness
}
| LambdaExpr
| CaseAlt
| LamCaseAlt LamCaseVariant
| 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
= HsDoStmt HsDoFlavour
| PatGuard (HsMatchContext p)
| ParStmtCtxt (HsStmtContext p)
| TransStmtCtxt (HsStmtContext p)
| ArrowExpr
data HsArrowMatchContext
= ProcExpr
| ArrowCaseAlt
| ArrowLamCaseAlt LamCaseVariant
| KappaExpr
data HsDoFlavour
= DoExpr (Maybe ModuleName)
| MDoExpr (Maybe ModuleName)
| GhciStmtCtxt
| ListComp
| MonadComp
qualifiedDoModuleName_maybe :: HsStmtContext p -> Maybe ModuleName
qualifiedDoModuleName_maybe :: forall p. HsStmtContext p -> Maybe ModuleName
qualifiedDoModuleName_maybe HsStmtContext p
ctxt = case HsStmtContext p
ctxt of
HsDoStmt (DoExpr Maybe ModuleName
m) -> Maybe ModuleName
m
HsDoStmt (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 (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
ArrowExpr = Bool
False
isComprehensionContext (PatGuard HsMatchContext id
_) = Bool
False
isComprehensionContext (HsDoStmt HsDoFlavour
flavour) = HsDoFlavour -> Bool
isDoComprehensionContext HsDoFlavour
flavour
isDoComprehensionContext :: HsDoFlavour -> Bool
isDoComprehensionContext :: HsDoFlavour -> Bool
isDoComprehensionContext HsDoFlavour
GhciStmtCtxt = Bool
False
isDoComprehensionContext (DoExpr Maybe ModuleName
_) = Bool
False
isDoComprehensionContext (MDoExpr Maybe ModuleName
_) = Bool
False
isDoComprehensionContext HsDoFlavour
ListComp = Bool
True
isDoComprehensionContext HsDoFlavour
MonadComp = Bool
True
isMonadStmtContext :: HsStmtContext id -> Bool
isMonadStmtContext :: forall id. HsStmtContext id -> Bool
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 (HsDoStmt HsDoFlavour
flavour) = HsDoFlavour -> Bool
isMonadDoStmtContext HsDoFlavour
flavour
isMonadStmtContext (PatGuard HsMatchContext id
_) = Bool
False
isMonadStmtContext HsStmtContext id
ArrowExpr = Bool
False
isMonadDoStmtContext :: HsDoFlavour -> Bool
isMonadDoStmtContext :: HsDoFlavour -> Bool
isMonadDoStmtContext HsDoFlavour
ListComp = Bool
False
isMonadDoStmtContext HsDoFlavour
MonadComp = Bool
True
isMonadDoStmtContext DoExpr{} = Bool
True
isMonadDoStmtContext MDoExpr{} = Bool
True
isMonadDoStmtContext HsDoFlavour
GhciStmtCtxt = Bool
True
isMonadCompContext :: HsStmtContext id -> Bool
isMonadCompContext :: forall id. HsStmtContext id -> Bool
isMonadCompContext (HsDoStmt HsDoFlavour
flavour) = HsDoFlavour -> Bool
isMonadDoCompContext HsDoFlavour
flavour
isMonadCompContext (ParStmtCtxt HsStmtContext id
_) = Bool
False
isMonadCompContext (TransStmtCtxt HsStmtContext id
_) = Bool
False
isMonadCompContext (PatGuard HsMatchContext id
_) = Bool
False
isMonadCompContext HsStmtContext id
ArrowExpr = Bool
False
isMonadDoCompContext :: HsDoFlavour -> Bool
isMonadDoCompContext :: HsDoFlavour -> Bool
isMonadDoCompContext HsDoFlavour
MonadComp = Bool
True
isMonadDoCompContext HsDoFlavour
ListComp = Bool
False
isMonadDoCompContext HsDoFlavour
GhciStmtCtxt = Bool
False
isMonadDoCompContext (DoExpr Maybe ModuleName
_) = Bool
False
isMonadDoCompContext (MDoExpr Maybe ModuleName
_) = 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 LamCaseAlt{} = 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{} = 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 (NoGhcTc p)), UnXRec (NoGhcTc p))
=> HsMatchContext p -> SDoc
pprMatchContext :: forall p.
(Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc 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 (NoGhcTc p)), UnXRec (NoGhcTc 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 (NoGhcTc p)), UnXRec (NoGhcTc 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 (NoGhcTc p)), UnXRec (NoGhcTc p))
=> HsMatchContext p -> SDoc
pprMatchContextNoun :: forall p.
(Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) =>
HsMatchContext p -> SDoc
pprMatchContextNoun (FunRhs {mc_fun :: forall p. HsMatchContext p -> LIdP (NoGhcTc p)
mc_fun=LIdP (NoGhcTc p)
fun}) = String -> SDoc
text String
"equation for"
SDoc -> SDoc -> SDoc
<+> SDoc -> SDoc
quotes (IdP (NoGhcTc p) -> SDoc
forall a. Outputable a => a -> SDoc
ppr (forall p a. UnXRec p => XRec p a -> a
unXRec @(NoGhcTc p) LIdP (NoGhcTc p)
fun))
pprMatchContextNoun HsMatchContext p
CaseAlt = String -> SDoc
text String
"case alternative"
pprMatchContextNoun (LamCaseAlt LamCaseVariant
lc_variant) = LamCaseVariant -> SDoc
lamCaseKeyword LamCaseVariant
lc_variant
SDoc -> SDoc -> SDoc
<+> String -> SDoc
text String
"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 (NoGhcTc p)), UnXRec (NoGhcTc p)) =>
HsStmtContext p -> SDoc
pprAStmtContext HsStmtContext p
ctxt
pprMatchContextNoun HsMatchContext p
PatSyn = String -> SDoc
text String
"pattern synonym declaration"
pprMatchContextNouns :: forall p. (Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p))
=> HsMatchContext p -> SDoc
pprMatchContextNouns :: forall p.
(Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) =>
HsMatchContext p -> SDoc
pprMatchContextNouns (FunRhs {mc_fun :: forall p. HsMatchContext p -> LIdP (NoGhcTc p)
mc_fun=LIdP (NoGhcTc p)
fun}) = String -> SDoc
text String
"equations for"
SDoc -> SDoc -> SDoc
<+> SDoc -> SDoc
quotes (IdP (NoGhcTc p) -> SDoc
forall a. Outputable a => a -> SDoc
ppr (forall p a. UnXRec p => XRec p a -> a
unXRec @(NoGhcTc p) LIdP (NoGhcTc p)
fun))
pprMatchContextNouns HsMatchContext p
PatBindGuards = String -> SDoc
text String
"pattern binding guards"
pprMatchContextNouns (ArrowMatchCtxt HsArrowMatchContext
c) = HsArrowMatchContext -> SDoc
pprArrowMatchContextNouns HsArrowMatchContext
c
pprMatchContextNouns (StmtCtxt HsStmtContext p
ctxt) = String -> SDoc
text String
"pattern bindings in"
SDoc -> SDoc -> SDoc
$$ HsStmtContext p -> SDoc
forall p.
(Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) =>
HsStmtContext p -> SDoc
pprAStmtContext HsStmtContext p
ctxt
pprMatchContextNouns HsMatchContext p
ctxt = HsMatchContext p -> SDoc
forall p.
(Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) =>
HsMatchContext p -> SDoc
pprMatchContextNoun HsMatchContext p
ctxt SDoc -> SDoc -> SDoc
<> Char -> SDoc
char Char
's'
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 (ArrowLamCaseAlt LamCaseVariant
lc_variant) = LamCaseVariant -> SDoc
lamCaseKeyword LamCaseVariant
lc_variant
SDoc -> SDoc -> SDoc
<+> String -> SDoc
text String
"alternative within arrow notation"
pprArrowMatchContextNoun HsArrowMatchContext
KappaExpr = String -> SDoc
text String
"arrow kappa abstraction"
pprArrowMatchContextNouns :: HsArrowMatchContext -> SDoc
pprArrowMatchContextNouns :: HsArrowMatchContext -> SDoc
pprArrowMatchContextNouns HsArrowMatchContext
ArrowCaseAlt = String -> SDoc
text String
"case alternatives within arrow notation"
pprArrowMatchContextNouns (ArrowLamCaseAlt LamCaseVariant
lc_variant) = LamCaseVariant -> SDoc
lamCaseKeyword LamCaseVariant
lc_variant
SDoc -> SDoc -> SDoc
<+> String -> SDoc
text String
"alternatives within arrow notation"
pprArrowMatchContextNouns HsArrowMatchContext
ctxt = HsArrowMatchContext -> SDoc
pprArrowMatchContextNoun HsArrowMatchContext
ctxt SDoc -> SDoc -> SDoc
<> Char -> SDoc
char Char
's'
pprAStmtContext, pprStmtContext :: (Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p))
=> HsStmtContext p -> SDoc
pprAStmtContext :: forall p.
(Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) =>
HsStmtContext p -> SDoc
pprAStmtContext (HsDoStmt HsDoFlavour
flavour) = HsDoFlavour -> SDoc
pprAHsDoFlavour HsDoFlavour
flavour
pprAStmtContext HsStmtContext p
ctxt = String -> SDoc
text String
"a" SDoc -> SDoc -> SDoc
<+> HsStmtContext p -> SDoc
forall p.
(Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) =>
HsStmtContext p -> SDoc
pprStmtContext HsStmtContext p
ctxt
pprStmtContext :: forall p.
(Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) =>
HsStmtContext p -> SDoc
pprStmtContext (HsDoStmt HsDoFlavour
flavour) = HsDoFlavour -> SDoc
pprHsDoFlavour HsDoFlavour
flavour
pprStmtContext (PatGuard HsMatchContext p
ctxt) = String -> SDoc
text String
"pattern guard for" SDoc -> SDoc -> SDoc
$$ HsMatchContext p -> SDoc
forall p.
(Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) =>
HsMatchContext p -> SDoc
pprMatchContext HsMatchContext p
ctxt
pprStmtContext HsStmtContext p
ArrowExpr = String -> SDoc
text String
"'do' block in an arrow command"
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 (NoGhcTc p)), UnXRec (NoGhcTc p)) =>
HsStmtContext p -> SDoc
pprAStmtContext HsStmtContext p
c])
(HsStmtContext p -> SDoc
forall p.
(Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc 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 (NoGhcTc p)), UnXRec (NoGhcTc p)) =>
HsStmtContext p -> SDoc
pprAStmtContext HsStmtContext p
c])
(HsStmtContext p -> SDoc
forall p.
(Outputable (IdP (NoGhcTc p)), UnXRec (NoGhcTc p)) =>
HsStmtContext p -> SDoc
pprStmtContext HsStmtContext p
c)
pprAHsDoFlavour, pprHsDoFlavour :: HsDoFlavour -> SDoc
pprAHsDoFlavour :: HsDoFlavour -> SDoc
pprAHsDoFlavour HsDoFlavour
flavour = SDoc
article SDoc -> SDoc -> SDoc
<+> HsDoFlavour -> SDoc
pprHsDoFlavour HsDoFlavour
flavour
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 HsDoFlavour
flavour of
MDoExpr Maybe ModuleName
Nothing -> SDoc
pp_an
HsDoFlavour
GhciStmtCtxt -> SDoc
pp_an
HsDoFlavour
_ -> SDoc
pp_a
pprHsDoFlavour :: HsDoFlavour -> SDoc
pprHsDoFlavour (DoExpr Maybe ModuleName
m) = Maybe ModuleName -> SDoc -> SDoc
prependQualified Maybe ModuleName
m (String -> SDoc
text String
"'do' block")
pprHsDoFlavour (MDoExpr Maybe ModuleName
m) = Maybe ModuleName -> SDoc -> SDoc
prependQualified Maybe ModuleName
m (String -> SDoc
text String
"'mdo' block")
pprHsDoFlavour HsDoFlavour
ListComp = String -> SDoc
text String
"list comprehension"
pprHsDoFlavour HsDoFlavour
MonadComp = String -> SDoc
text String
"monad comprehension"
pprHsDoFlavour HsDoFlavour
GhciStmtCtxt = String -> SDoc
text String
"interactive GHCi command"
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