{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ViewPatterns #-}
module Language.Haskell.Syntax.Decls (
HsDecl(..), LHsDecl, HsDataDefn(..), HsDeriving, LHsFunDep, FunDep(..),
HsDerivingClause(..), LHsDerivingClause, DerivClauseTys(..), LDerivClauseTys,
NewOrData(..), DataDefnCons(..), dataDefnConsNewOrData,
isTypeDataDefnCons, firstDataDefnCon,
StandaloneKindSig(..), LStandaloneKindSig,
TyClDecl(..), LTyClDecl,
TyClGroup(..),
tyClGroupTyClDecls, tyClGroupInstDecls, tyClGroupRoleDecls,
tyClGroupKindSigs,
isClassDecl, isDataDecl, isSynDecl,
isFamilyDecl, isTypeFamilyDecl, isDataFamilyDecl,
isOpenTypeFamilyInfo, isClosedTypeFamilyInfo,
tyClDeclTyVars,
FamilyDecl(..), LFamilyDecl,
InstDecl(..), LInstDecl, FamilyInfo(..), familyInfoTyConFlavour,
TyFamInstDecl(..), LTyFamInstDecl,
TyFamDefltDecl, LTyFamDefltDecl,
DataFamInstDecl(..), LDataFamInstDecl,
FamEqn(..), TyFamInstEqn, LTyFamInstEqn, HsTyPats,
LClsInstDecl, ClsInstDecl(..),
DerivDecl(..), LDerivDecl,
DerivStrategy(..), LDerivStrategy,
LRuleDecls,RuleDecls(..),RuleDecl(..),LRuleDecl,
RuleBndr(..),LRuleBndr,
collectRuleBndrSigTys,
DefaultDecl(..), LDefaultDecl,
SpliceDecoration(..),
SpliceDecl(..), LSpliceDecl,
ForeignDecl(..), LForeignDecl, ForeignImport(..), ForeignExport(..),
CImportSpec(..),
ConDecl(..), LConDecl,
HsConDeclH98Details, HsConDeclGADTDetails(..),
DocDecl(..), LDocDecl, docDeclDoc,
WarnDecl(..), LWarnDecl,
WarnDecls(..), LWarnDecls,
AnnDecl(..), LAnnDecl,
AnnProvenance(..), annProvenanceName_maybe,
RoleAnnotDecl(..), LRoleAnnotDecl,
FamilyResultSig(..), LFamilyResultSig, InjectivityAnn(..), LInjectivityAnn,
HsGroup(..), hsGroupInstDecls,
) where
import {-# SOURCE #-} Language.Haskell.Syntax.Expr
( HsExpr, HsUntypedSplice )
import Language.Haskell.Syntax.Binds
import Language.Haskell.Syntax.Concrete
import Language.Haskell.Syntax.Extension
import Language.Haskell.Syntax.Type
import Language.Haskell.Syntax.Basic (Role)
import GHC.Types.Basic (TopLevelFlag, OverlapMode, RuleName, Activation
,TyConFlavour(..), TypeOrData(..))
import GHC.Types.ForeignCall (CType, CCallConv, Safety, Header, CLabelString, CCallTarget, CExportSpec)
import GHC.Types.Fixity (LexicalFixity)
import GHC.Core.Type (Specificity)
import GHC.Unit.Module.Warnings (WarningTxt)
import GHC.Utils.Panic.Plain ( assert )
import GHC.Hs.Doc (LHsDoc)
import Control.Monad
import Data.Data hiding (TyCon, Fixity, Infix)
import Data.Void
import Data.Maybe
import Data.String
import Data.Function
import Data.Eq
import Data.Int
import Data.Bool
import Prelude (Show)
import qualified Data.List
import Data.Foldable
import Data.Traversable
import Data.List.NonEmpty (NonEmpty (..))
type LHsDecl p = XRec p (HsDecl p)
data HsDecl p
= TyClD (XTyClD p) (TyClDecl p)
| InstD (XInstD p) (InstDecl p)
| DerivD (XDerivD p) (DerivDecl p)
| ValD (XValD p) (HsBind p)
| SigD (XSigD p) (Sig p)
| KindSigD (XKindSigD p) (StandaloneKindSig p)
| DefD (XDefD p) (DefaultDecl p)
| ForD (XForD p) (ForeignDecl p)
| WarningD (XWarningD p) (WarnDecls p)
| AnnD (XAnnD p) (AnnDecl p)
| RuleD (XRuleD p) (RuleDecls p)
| SpliceD (XSpliceD p) (SpliceDecl p)
| DocD (XDocD p) (DocDecl p)
| RoleAnnotD (XRoleAnnotD p) (RoleAnnotDecl p)
| XHsDecl !(XXHsDecl p)
data HsGroup p
= HsGroup {
forall p. HsGroup p -> XCHsGroup p
hs_ext :: XCHsGroup p,
forall p. HsGroup p -> HsValBinds p
hs_valds :: HsValBinds p,
forall p. HsGroup p -> [LSpliceDecl p]
hs_splcds :: [LSpliceDecl p],
forall p. HsGroup p -> [TyClGroup p]
hs_tyclds :: [TyClGroup p],
forall p. HsGroup p -> [LDerivDecl p]
hs_derivds :: [LDerivDecl p],
forall p. HsGroup p -> [LFixitySig p]
hs_fixds :: [LFixitySig p],
forall p. HsGroup p -> [LDefaultDecl p]
hs_defds :: [LDefaultDecl p],
forall p. HsGroup p -> [LForeignDecl p]
hs_fords :: [LForeignDecl p],
forall p. HsGroup p -> [LWarnDecls p]
hs_warnds :: [LWarnDecls p],
forall p. HsGroup p -> [LAnnDecl p]
hs_annds :: [LAnnDecl p],
forall p. HsGroup p -> [LRuleDecls p]
hs_ruleds :: [LRuleDecls p],
forall p. HsGroup p -> [LDocDecl p]
hs_docs :: [LDocDecl p]
}
| XHsGroup !(XXHsGroup p)
hsGroupInstDecls :: HsGroup id -> [LInstDecl id]
hsGroupInstDecls :: forall id. HsGroup id -> [LInstDecl id]
hsGroupInstDecls = (TyClGroup id -> [XRec id (InstDecl id)])
-> [TyClGroup id] -> [XRec id (InstDecl id)]
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
(=<<) TyClGroup id -> [XRec id (InstDecl id)]
forall pass. TyClGroup pass -> [LInstDecl pass]
group_instds ([TyClGroup id] -> [XRec id (InstDecl id)])
-> (HsGroup id -> [TyClGroup id])
-> HsGroup id
-> [XRec id (InstDecl id)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. HsGroup id -> [TyClGroup id]
forall p. HsGroup p -> [TyClGroup p]
hs_tyclds
type LSpliceDecl pass = XRec pass (SpliceDecl pass)
data SpliceDecl p
= SpliceDecl
(XSpliceDecl p)
(XRec p (HsUntypedSplice p))
SpliceDecoration
| XSpliceDecl !(XXSpliceDecl p)
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)
type LTyClDecl pass = XRec pass (TyClDecl pass)
data TyClDecl pass
=
FamDecl { forall pass. TyClDecl pass -> XFamDecl pass
tcdFExt :: XFamDecl pass, forall pass. TyClDecl pass -> FamilyDecl pass
tcdFam :: FamilyDecl pass }
|
SynDecl { forall pass. TyClDecl pass -> XSynDecl pass
tcdSExt :: XSynDecl pass
, forall pass. TyClDecl pass -> LIdP pass
tcdLName :: LIdP pass
, forall pass. TyClDecl pass -> LHsQTyVars pass
tcdTyVars :: LHsQTyVars pass
, forall pass. TyClDecl pass -> LexicalFixity
tcdFixity :: LexicalFixity
, forall pass. TyClDecl pass -> LHsType pass
tcdRhs :: LHsType pass }
|
DataDecl { forall pass. TyClDecl pass -> XDataDecl pass
tcdDExt :: XDataDecl pass
, tcdLName :: LIdP pass
, tcdTyVars :: LHsQTyVars pass
, tcdFixity :: LexicalFixity
, forall pass. TyClDecl pass -> HsDataDefn pass
tcdDataDefn :: HsDataDefn pass }
| ClassDecl { forall pass. TyClDecl pass -> XClassDecl pass
tcdCExt :: XClassDecl pass,
forall pass. TyClDecl pass -> LayoutInfo pass
tcdLayout :: !(LayoutInfo pass),
forall pass. TyClDecl pass -> Maybe (LHsContext pass)
tcdCtxt :: Maybe (LHsContext pass),
tcdLName :: LIdP pass,
tcdTyVars :: LHsQTyVars pass,
tcdFixity :: LexicalFixity,
forall pass. TyClDecl pass -> [LHsFunDep pass]
tcdFDs :: [LHsFunDep pass],
forall pass. TyClDecl pass -> [LSig pass]
tcdSigs :: [LSig pass],
forall pass. TyClDecl pass -> LHsBinds pass
tcdMeths :: LHsBinds pass,
forall pass. TyClDecl pass -> [LFamilyDecl pass]
tcdATs :: [LFamilyDecl pass],
forall pass. TyClDecl pass -> [LTyFamDefltDecl pass]
tcdATDefs :: [LTyFamDefltDecl pass],
forall pass. TyClDecl pass -> [LDocDecl pass]
tcdDocs :: [LDocDecl pass]
}
| XTyClDecl !(XXTyClDecl pass)
data FunDep pass
= FunDep (XCFunDep pass)
[LIdP pass]
[LIdP pass]
| XFunDep !(XXFunDep pass)
type LHsFunDep pass = XRec pass (FunDep pass)
isDataDecl :: TyClDecl pass -> Bool
isDataDecl :: forall pass. TyClDecl pass -> Bool
isDataDecl (DataDecl {}) = Bool
True
isDataDecl TyClDecl pass
_other = Bool
False
isSynDecl :: TyClDecl pass -> Bool
isSynDecl :: forall pass. TyClDecl pass -> Bool
isSynDecl (SynDecl {}) = Bool
True
isSynDecl TyClDecl pass
_other = Bool
False
isClassDecl :: TyClDecl pass -> Bool
isClassDecl :: forall pass. TyClDecl pass -> Bool
isClassDecl (ClassDecl {}) = Bool
True
isClassDecl TyClDecl pass
_ = Bool
False
isFamilyDecl :: TyClDecl pass -> Bool
isFamilyDecl :: forall pass. TyClDecl pass -> Bool
isFamilyDecl (FamDecl {}) = Bool
True
isFamilyDecl TyClDecl pass
_other = Bool
False
isTypeFamilyDecl :: TyClDecl pass -> Bool
isTypeFamilyDecl :: forall pass. TyClDecl pass -> Bool
isTypeFamilyDecl (FamDecl XFamDecl pass
_ (FamilyDecl { fdInfo :: forall pass. FamilyDecl pass -> FamilyInfo pass
fdInfo = FamilyInfo pass
info })) = case FamilyInfo pass
info of
FamilyInfo pass
OpenTypeFamily -> Bool
True
ClosedTypeFamily {} -> Bool
True
FamilyInfo pass
_ -> Bool
False
isTypeFamilyDecl TyClDecl pass
_ = Bool
False
isOpenTypeFamilyInfo :: FamilyInfo pass -> Bool
isOpenTypeFamilyInfo :: forall pass. FamilyInfo pass -> Bool
isOpenTypeFamilyInfo FamilyInfo pass
OpenTypeFamily = Bool
True
isOpenTypeFamilyInfo FamilyInfo pass
_ = Bool
False
isClosedTypeFamilyInfo :: FamilyInfo pass -> Bool
isClosedTypeFamilyInfo :: forall pass. FamilyInfo pass -> Bool
isClosedTypeFamilyInfo (ClosedTypeFamily {}) = Bool
True
isClosedTypeFamilyInfo FamilyInfo pass
_ = Bool
False
isDataFamilyDecl :: TyClDecl pass -> Bool
isDataFamilyDecl :: forall pass. TyClDecl pass -> Bool
isDataFamilyDecl (FamDecl XFamDecl pass
_ (FamilyDecl { fdInfo :: forall pass. FamilyDecl pass -> FamilyInfo pass
fdInfo = FamilyInfo pass
DataFamily })) = Bool
True
isDataFamilyDecl TyClDecl pass
_other = Bool
False
tyClDeclTyVars :: TyClDecl pass -> LHsQTyVars pass
tyClDeclTyVars :: forall pass. TyClDecl pass -> LHsQTyVars pass
tyClDeclTyVars (FamDecl { tcdFam :: forall pass. TyClDecl pass -> FamilyDecl pass
tcdFam = FamilyDecl { fdTyVars :: forall pass. FamilyDecl pass -> LHsQTyVars pass
fdTyVars = LHsQTyVars pass
tvs } }) = LHsQTyVars pass
tvs
tyClDeclTyVars TyClDecl pass
d = TyClDecl pass -> LHsQTyVars pass
forall pass. TyClDecl pass -> LHsQTyVars pass
tcdTyVars TyClDecl pass
d
data TyClGroup pass
= TyClGroup { forall pass. TyClGroup pass -> XCTyClGroup pass
group_ext :: XCTyClGroup pass
, forall pass. TyClGroup pass -> [LTyClDecl pass]
group_tyclds :: [LTyClDecl pass]
, forall pass. TyClGroup pass -> [LRoleAnnotDecl pass]
group_roles :: [LRoleAnnotDecl pass]
, forall pass. TyClGroup pass -> [LStandaloneKindSig pass]
group_kisigs :: [LStandaloneKindSig pass]
, forall pass. TyClGroup pass -> [LInstDecl pass]
group_instds :: [LInstDecl pass] }
| XTyClGroup !(XXTyClGroup pass)
tyClGroupTyClDecls :: [TyClGroup pass] -> [LTyClDecl pass]
tyClGroupTyClDecls :: forall pass. [TyClGroup pass] -> [LTyClDecl pass]
tyClGroupTyClDecls = (TyClGroup pass -> [XRec pass (TyClDecl pass)])
-> [TyClGroup pass] -> [XRec pass (TyClDecl pass)]
forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
Data.List.concatMap TyClGroup pass -> [XRec pass (TyClDecl pass)]
forall pass. TyClGroup pass -> [LTyClDecl pass]
group_tyclds
tyClGroupInstDecls :: [TyClGroup pass] -> [LInstDecl pass]
tyClGroupInstDecls :: forall pass. [TyClGroup pass] -> [LInstDecl pass]
tyClGroupInstDecls = (TyClGroup pass -> [XRec pass (InstDecl pass)])
-> [TyClGroup pass] -> [XRec pass (InstDecl pass)]
forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
Data.List.concatMap TyClGroup pass -> [XRec pass (InstDecl pass)]
forall pass. TyClGroup pass -> [LInstDecl pass]
group_instds
tyClGroupRoleDecls :: [TyClGroup pass] -> [LRoleAnnotDecl pass]
tyClGroupRoleDecls :: forall pass. [TyClGroup pass] -> [LRoleAnnotDecl pass]
tyClGroupRoleDecls = (TyClGroup pass -> [XRec pass (RoleAnnotDecl pass)])
-> [TyClGroup pass] -> [XRec pass (RoleAnnotDecl pass)]
forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
Data.List.concatMap TyClGroup pass -> [XRec pass (RoleAnnotDecl pass)]
forall pass. TyClGroup pass -> [LRoleAnnotDecl pass]
group_roles
tyClGroupKindSigs :: [TyClGroup pass] -> [LStandaloneKindSig pass]
tyClGroupKindSigs :: forall pass. [TyClGroup pass] -> [LStandaloneKindSig pass]
tyClGroupKindSigs = (TyClGroup pass -> [XRec pass (StandaloneKindSig pass)])
-> [TyClGroup pass] -> [XRec pass (StandaloneKindSig pass)]
forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
Data.List.concatMap TyClGroup pass -> [XRec pass (StandaloneKindSig pass)]
forall pass. TyClGroup pass -> [LStandaloneKindSig pass]
group_kisigs
type LFamilyResultSig pass = XRec pass (FamilyResultSig pass)
data FamilyResultSig pass =
NoSig (XNoSig pass)
| KindSig (XCKindSig pass) (LHsKind pass)
| TyVarSig (XTyVarSig pass) (LHsTyVarBndr () pass)
| XFamilyResultSig !(XXFamilyResultSig pass)
type LFamilyDecl pass = XRec pass (FamilyDecl pass)
data FamilyDecl pass = FamilyDecl
{ forall pass. FamilyDecl pass -> XCFamilyDecl pass
fdExt :: XCFamilyDecl pass
, forall pass. FamilyDecl pass -> FamilyInfo pass
fdInfo :: FamilyInfo pass
, forall pass. FamilyDecl pass -> TopLevelFlag
fdTopLevel :: TopLevelFlag
, forall pass. FamilyDecl pass -> LIdP pass
fdLName :: LIdP pass
, forall pass. FamilyDecl pass -> LHsQTyVars pass
fdTyVars :: LHsQTyVars pass
, forall pass. FamilyDecl pass -> LexicalFixity
fdFixity :: LexicalFixity
, forall pass. FamilyDecl pass -> LFamilyResultSig pass
fdResultSig :: LFamilyResultSig pass
, forall pass. FamilyDecl pass -> Maybe (LInjectivityAnn pass)
fdInjectivityAnn :: Maybe (LInjectivityAnn pass)
}
| XFamilyDecl !(XXFamilyDecl pass)
type LInjectivityAnn pass = XRec pass (InjectivityAnn pass)
data InjectivityAnn pass
= InjectivityAnn (XCInjectivityAnn pass)
(LIdP pass) [LIdP pass]
| XInjectivityAnn !(XXInjectivityAnn pass)
data FamilyInfo pass
= DataFamily
| OpenTypeFamily
| ClosedTypeFamily (Maybe [LTyFamInstEqn pass])
familyInfoTyConFlavour
:: Maybe tc
-> FamilyInfo pass
-> TyConFlavour tc
familyInfoTyConFlavour :: forall tc pass. Maybe tc -> FamilyInfo pass -> TyConFlavour tc
familyInfoTyConFlavour Maybe tc
mb_parent_tycon FamilyInfo pass
info =
case FamilyInfo pass
info of
FamilyInfo pass
DataFamily -> TypeOrData -> Maybe tc -> TyConFlavour tc
forall tc. TypeOrData -> Maybe tc -> TyConFlavour tc
OpenFamilyFlavour TypeOrData
IAmData Maybe tc
mb_parent_tycon
FamilyInfo pass
OpenTypeFamily -> TypeOrData -> Maybe tc -> TyConFlavour tc
forall tc. TypeOrData -> Maybe tc -> TyConFlavour tc
OpenFamilyFlavour TypeOrData
IAmType Maybe tc
mb_parent_tycon
ClosedTypeFamily Maybe [LTyFamInstEqn pass]
_ -> Bool -> TyConFlavour tc -> TyConFlavour tc
forall a. HasCallStack => Bool -> a -> a
assert (Maybe tc -> Bool
forall a. Maybe a -> Bool
isNothing Maybe tc
mb_parent_tycon)
TyConFlavour tc
forall tc. TyConFlavour tc
ClosedTypeFamilyFlavour
data HsDataDefn pass
=
HsDataDefn { forall pass. HsDataDefn pass -> XCHsDataDefn pass
dd_ext :: XCHsDataDefn pass,
forall pass. HsDataDefn pass -> Maybe (LHsContext pass)
dd_ctxt :: Maybe (LHsContext pass),
forall pass. HsDataDefn pass -> Maybe (XRec pass CType)
dd_cType :: Maybe (XRec pass CType),
forall pass. HsDataDefn pass -> Maybe (LHsKind pass)
dd_kindSig:: Maybe (LHsKind pass),
forall pass. HsDataDefn pass -> DataDefnCons (LConDecl pass)
dd_cons :: DataDefnCons (LConDecl pass),
forall pass. HsDataDefn pass -> HsDeriving pass
dd_derivs :: HsDeriving pass
}
| XHsDataDefn !(XXHsDataDefn pass)
type HsDeriving pass = [LHsDerivingClause pass]
type LHsDerivingClause pass = XRec pass (HsDerivingClause pass)
data HsDerivingClause pass
= HsDerivingClause
{ forall pass. HsDerivingClause pass -> XCHsDerivingClause pass
deriv_clause_ext :: XCHsDerivingClause pass
, forall pass. HsDerivingClause pass -> Maybe (LDerivStrategy pass)
deriv_clause_strategy :: Maybe (LDerivStrategy pass)
, forall pass. HsDerivingClause pass -> LDerivClauseTys pass
deriv_clause_tys :: LDerivClauseTys pass
}
| XHsDerivingClause !(XXHsDerivingClause pass)
type LDerivClauseTys pass = XRec pass (DerivClauseTys pass)
data DerivClauseTys pass
=
DctSingle (XDctSingle pass) (LHsSigType pass)
| DctMulti (XDctMulti pass) [LHsSigType pass]
| XDerivClauseTys !(XXDerivClauseTys pass)
type LStandaloneKindSig pass = XRec pass (StandaloneKindSig pass)
data StandaloneKindSig pass
= StandaloneKindSig (XStandaloneKindSig pass)
(LIdP pass)
(LHsSigType pass)
| XStandaloneKindSig !(XXStandaloneKindSig pass)
data NewOrData
= NewType
| DataType
deriving ( NewOrData -> NewOrData -> Bool
(NewOrData -> NewOrData -> Bool)
-> (NewOrData -> NewOrData -> Bool) -> Eq NewOrData
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NewOrData -> NewOrData -> Bool
== :: NewOrData -> NewOrData -> Bool
$c/= :: NewOrData -> NewOrData -> Bool
/= :: NewOrData -> NewOrData -> Bool
Eq, Typeable NewOrData
Typeable NewOrData =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NewOrData -> c NewOrData)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NewOrData)
-> (NewOrData -> Constr)
-> (NewOrData -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NewOrData))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NewOrData))
-> ((forall b. Data b => b -> b) -> NewOrData -> NewOrData)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NewOrData -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NewOrData -> r)
-> (forall u. (forall d. Data d => d -> u) -> NewOrData -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> NewOrData -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NewOrData -> m NewOrData)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NewOrData -> m NewOrData)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NewOrData -> m NewOrData)
-> Data NewOrData
NewOrData -> Constr
NewOrData -> DataType
(forall b. Data b => b -> b) -> NewOrData -> NewOrData
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) -> NewOrData -> u
forall u. (forall d. Data d => d -> u) -> NewOrData -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NewOrData -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NewOrData -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NewOrData -> m NewOrData
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NewOrData -> m NewOrData
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NewOrData
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NewOrData -> c NewOrData
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NewOrData)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NewOrData)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NewOrData -> c NewOrData
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> NewOrData -> c NewOrData
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NewOrData
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c NewOrData
$ctoConstr :: NewOrData -> Constr
toConstr :: NewOrData -> Constr
$cdataTypeOf :: NewOrData -> DataType
dataTypeOf :: NewOrData -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NewOrData)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c NewOrData)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NewOrData)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NewOrData)
$cgmapT :: (forall b. Data b => b -> b) -> NewOrData -> NewOrData
gmapT :: (forall b. Data b => b -> b) -> NewOrData -> NewOrData
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NewOrData -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> NewOrData -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NewOrData -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> NewOrData -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> NewOrData -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> NewOrData -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NewOrData -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> NewOrData -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NewOrData -> m NewOrData
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> NewOrData -> m NewOrData
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NewOrData -> m NewOrData
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NewOrData -> m NewOrData
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NewOrData -> m NewOrData
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> NewOrData -> m NewOrData
Data )
data DataDefnCons a
= NewTypeCon
a
| DataTypeCons
Bool
[a]
deriving ( DataDefnCons a -> DataDefnCons a -> Bool
(DataDefnCons a -> DataDefnCons a -> Bool)
-> (DataDefnCons a -> DataDefnCons a -> Bool)
-> Eq (DataDefnCons a)
forall a. Eq a => DataDefnCons a -> DataDefnCons a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: forall a. Eq a => DataDefnCons a -> DataDefnCons a -> Bool
== :: DataDefnCons a -> DataDefnCons a -> Bool
$c/= :: forall a. Eq a => DataDefnCons a -> DataDefnCons a -> Bool
/= :: DataDefnCons a -> DataDefnCons a -> Bool
Eq, Typeable (DataDefnCons a)
Typeable (DataDefnCons a) =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DataDefnCons a -> c (DataDefnCons a))
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (DataDefnCons a))
-> (DataDefnCons a -> Constr)
-> (DataDefnCons a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (DataDefnCons a)))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (DataDefnCons a)))
-> ((forall b. Data b => b -> b)
-> DataDefnCons a -> DataDefnCons a)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DataDefnCons a -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DataDefnCons a -> r)
-> (forall u.
(forall d. Data d => d -> u) -> DataDefnCons a -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> DataDefnCons a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> DataDefnCons a -> m (DataDefnCons a))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DataDefnCons a -> m (DataDefnCons a))
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DataDefnCons a -> m (DataDefnCons a))
-> Data (DataDefnCons a)
DataDefnCons a -> Constr
DataDefnCons a -> DataType
(forall b. Data b => b -> b) -> DataDefnCons a -> DataDefnCons a
forall a. Data a => Typeable (DataDefnCons a)
forall a. Data a => DataDefnCons a -> Constr
forall a. Data a => DataDefnCons a -> DataType
forall a.
Data a =>
(forall b. Data b => b -> b) -> DataDefnCons a -> DataDefnCons a
forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> DataDefnCons a -> u
forall a u.
Data a =>
(forall d. Data d => d -> u) -> DataDefnCons a -> [u]
forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DataDefnCons a -> r
forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DataDefnCons a -> r
forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d)
-> DataDefnCons a -> m (DataDefnCons a)
forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> DataDefnCons a -> m (DataDefnCons a)
forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (DataDefnCons a)
forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DataDefnCons a -> c (DataDefnCons a)
forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (DataDefnCons a))
forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (DataDefnCons a))
forall a.
Typeable a =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u.
Int -> (forall d. Data d => d -> u) -> DataDefnCons a -> u
forall u. (forall d. Data d => d -> u) -> DataDefnCons a -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DataDefnCons a -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DataDefnCons a -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> DataDefnCons a -> m (DataDefnCons a)
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DataDefnCons a -> m (DataDefnCons a)
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (DataDefnCons a)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DataDefnCons a -> c (DataDefnCons a)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (DataDefnCons a))
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (DataDefnCons a))
$cgfoldl :: forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DataDefnCons a -> c (DataDefnCons a)
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> DataDefnCons a -> c (DataDefnCons a)
$cgunfold :: forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (DataDefnCons a)
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (DataDefnCons a)
$ctoConstr :: forall a. Data a => DataDefnCons a -> Constr
toConstr :: DataDefnCons a -> Constr
$cdataTypeOf :: forall a. Data a => DataDefnCons a -> DataType
dataTypeOf :: DataDefnCons a -> DataType
$cdataCast1 :: forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (DataDefnCons a))
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (DataDefnCons a))
$cdataCast2 :: forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (DataDefnCons a))
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c (DataDefnCons a))
$cgmapT :: forall a.
Data a =>
(forall b. Data b => b -> b) -> DataDefnCons a -> DataDefnCons a
gmapT :: (forall b. Data b => b -> b) -> DataDefnCons a -> DataDefnCons a
$cgmapQl :: forall a r r'.
Data a =>
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DataDefnCons a -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> DataDefnCons a -> r
$cgmapQr :: forall a r r'.
Data a =>
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DataDefnCons a -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> DataDefnCons a -> r
$cgmapQ :: forall a u.
Data a =>
(forall d. Data d => d -> u) -> DataDefnCons a -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> DataDefnCons a -> [u]
$cgmapQi :: forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> DataDefnCons a -> u
gmapQi :: forall u.
Int -> (forall d. Data d => d -> u) -> DataDefnCons a -> u
$cgmapM :: forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d)
-> DataDefnCons a -> m (DataDefnCons a)
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d)
-> DataDefnCons a -> m (DataDefnCons a)
$cgmapMp :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> DataDefnCons a -> m (DataDefnCons a)
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DataDefnCons a -> m (DataDefnCons a)
$cgmapMo :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d)
-> DataDefnCons a -> m (DataDefnCons a)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d)
-> DataDefnCons a -> m (DataDefnCons a)
Data, (forall m. Monoid m => DataDefnCons m -> m)
-> (forall m a. Monoid m => (a -> m) -> DataDefnCons a -> m)
-> (forall m a. Monoid m => (a -> m) -> DataDefnCons a -> m)
-> (forall a b. (a -> b -> b) -> b -> DataDefnCons a -> b)
-> (forall a b. (a -> b -> b) -> b -> DataDefnCons a -> b)
-> (forall b a. (b -> a -> b) -> b -> DataDefnCons a -> b)
-> (forall b a. (b -> a -> b) -> b -> DataDefnCons a -> b)
-> (forall a. (a -> a -> a) -> DataDefnCons a -> a)
-> (forall a. (a -> a -> a) -> DataDefnCons a -> a)
-> (forall a. DataDefnCons a -> [a])
-> (forall a. DataDefnCons a -> Bool)
-> (forall a. DataDefnCons a -> Int)
-> (forall a. Eq a => a -> DataDefnCons a -> Bool)
-> (forall a. Ord a => DataDefnCons a -> a)
-> (forall a. Ord a => DataDefnCons a -> a)
-> (forall a. Num a => DataDefnCons a -> a)
-> (forall a. Num a => DataDefnCons a -> a)
-> Foldable DataDefnCons
forall a. Eq a => a -> DataDefnCons a -> Bool
forall a. Num a => DataDefnCons a -> a
forall a. Ord a => DataDefnCons a -> a
forall m. Monoid m => DataDefnCons m -> m
forall a. DataDefnCons a -> Bool
forall a. DataDefnCons a -> Int
forall a. DataDefnCons a -> [a]
forall a. (a -> a -> a) -> DataDefnCons a -> a
forall m a. Monoid m => (a -> m) -> DataDefnCons a -> m
forall b a. (b -> a -> b) -> b -> DataDefnCons a -> b
forall a b. (a -> b -> b) -> b -> DataDefnCons a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
$cfold :: forall m. Monoid m => DataDefnCons m -> m
fold :: forall m. Monoid m => DataDefnCons m -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> DataDefnCons a -> m
foldMap :: forall m a. Monoid m => (a -> m) -> DataDefnCons a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> DataDefnCons a -> m
foldMap' :: forall m a. Monoid m => (a -> m) -> DataDefnCons a -> m
$cfoldr :: forall a b. (a -> b -> b) -> b -> DataDefnCons a -> b
foldr :: forall a b. (a -> b -> b) -> b -> DataDefnCons a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> DataDefnCons a -> b
foldr' :: forall a b. (a -> b -> b) -> b -> DataDefnCons a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> DataDefnCons a -> b
foldl :: forall b a. (b -> a -> b) -> b -> DataDefnCons a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> DataDefnCons a -> b
foldl' :: forall b a. (b -> a -> b) -> b -> DataDefnCons a -> b
$cfoldr1 :: forall a. (a -> a -> a) -> DataDefnCons a -> a
foldr1 :: forall a. (a -> a -> a) -> DataDefnCons a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> DataDefnCons a -> a
foldl1 :: forall a. (a -> a -> a) -> DataDefnCons a -> a
$ctoList :: forall a. DataDefnCons a -> [a]
toList :: forall a. DataDefnCons a -> [a]
$cnull :: forall a. DataDefnCons a -> Bool
null :: forall a. DataDefnCons a -> Bool
$clength :: forall a. DataDefnCons a -> Int
length :: forall a. DataDefnCons a -> Int
$celem :: forall a. Eq a => a -> DataDefnCons a -> Bool
elem :: forall a. Eq a => a -> DataDefnCons a -> Bool
$cmaximum :: forall a. Ord a => DataDefnCons a -> a
maximum :: forall a. Ord a => DataDefnCons a -> a
$cminimum :: forall a. Ord a => DataDefnCons a -> a
minimum :: forall a. Ord a => DataDefnCons a -> a
$csum :: forall a. Num a => DataDefnCons a -> a
sum :: forall a. Num a => DataDefnCons a -> a
$cproduct :: forall a. Num a => DataDefnCons a -> a
product :: forall a. Num a => DataDefnCons a -> a
Foldable, (forall a b. (a -> b) -> DataDefnCons a -> DataDefnCons b)
-> (forall a b. a -> DataDefnCons b -> DataDefnCons a)
-> Functor DataDefnCons
forall a b. a -> DataDefnCons b -> DataDefnCons a
forall a b. (a -> b) -> DataDefnCons a -> DataDefnCons b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
$cfmap :: forall a b. (a -> b) -> DataDefnCons a -> DataDefnCons b
fmap :: forall a b. (a -> b) -> DataDefnCons a -> DataDefnCons b
$c<$ :: forall a b. a -> DataDefnCons b -> DataDefnCons a
<$ :: forall a b. a -> DataDefnCons b -> DataDefnCons a
Functor, Functor DataDefnCons
Foldable DataDefnCons
(Functor DataDefnCons, Foldable DataDefnCons) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> DataDefnCons a -> f (DataDefnCons b))
-> (forall (f :: * -> *) a.
Applicative f =>
DataDefnCons (f a) -> f (DataDefnCons a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> DataDefnCons a -> m (DataDefnCons b))
-> (forall (m :: * -> *) a.
Monad m =>
DataDefnCons (m a) -> m (DataDefnCons a))
-> Traversable DataDefnCons
forall (t :: * -> *).
(Functor t, Foldable t) =>
(forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> t a -> f (t b))
-> (forall (f :: * -> *) a. Applicative f => t (f a) -> f (t a))
-> (forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> t a -> m (t b))
-> (forall (m :: * -> *) a. Monad m => t (m a) -> m (t a))
-> Traversable t
forall (m :: * -> *) a.
Monad m =>
DataDefnCons (m a) -> m (DataDefnCons a)
forall (f :: * -> *) a.
Applicative f =>
DataDefnCons (f a) -> f (DataDefnCons a)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> DataDefnCons a -> m (DataDefnCons b)
forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> DataDefnCons a -> f (DataDefnCons b)
$ctraverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> DataDefnCons a -> f (DataDefnCons b)
traverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> DataDefnCons a -> f (DataDefnCons b)
$csequenceA :: forall (f :: * -> *) a.
Applicative f =>
DataDefnCons (f a) -> f (DataDefnCons a)
sequenceA :: forall (f :: * -> *) a.
Applicative f =>
DataDefnCons (f a) -> f (DataDefnCons a)
$cmapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> DataDefnCons a -> m (DataDefnCons b)
mapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> DataDefnCons a -> m (DataDefnCons b)
$csequence :: forall (m :: * -> *) a.
Monad m =>
DataDefnCons (m a) -> m (DataDefnCons a)
sequence :: forall (m :: * -> *) a.
Monad m =>
DataDefnCons (m a) -> m (DataDefnCons a)
Traversable )
dataDefnConsNewOrData :: DataDefnCons a -> NewOrData
dataDefnConsNewOrData :: forall a. DataDefnCons a -> NewOrData
dataDefnConsNewOrData = \ case
NewTypeCon a
_ -> NewOrData
NewType
DataTypeCons Bool
_ [a]
_ -> NewOrData
DataType
isTypeDataDefnCons :: DataDefnCons a -> Bool
isTypeDataDefnCons :: forall a. DataDefnCons a -> Bool
isTypeDataDefnCons (NewTypeCon a
_) = Bool
False
isTypeDataDefnCons (DataTypeCons Bool
is_type_data [a]
_) = Bool
is_type_data
firstDataDefnCon :: DataDefnCons a -> Maybe a
firstDataDefnCon :: forall a. DataDefnCons a -> Maybe a
firstDataDefnCon (NewTypeCon a
con) = a -> Maybe a
forall a. a -> Maybe a
Just a
con
firstDataDefnCon (DataTypeCons Bool
_ [a]
cons) = [a] -> Maybe a
forall a. [a] -> Maybe a
listToMaybe [a]
cons
type LConDecl pass = XRec pass (ConDecl pass)
data ConDecl pass
= ConDeclGADT
{ forall pass. ConDecl pass -> XConDeclGADT pass
con_g_ext :: XConDeclGADT pass
, forall pass. ConDecl pass -> NonEmpty (LIdP pass)
con_names :: NonEmpty (LIdP pass)
, forall pass. ConDecl pass -> LHsUniToken "::" "\8759" pass
con_dcolon :: !(LHsUniToken "::" "∷" pass)
, forall pass. ConDecl pass -> XRec pass (HsOuterSigTyVarBndrs pass)
con_bndrs :: XRec pass (HsOuterSigTyVarBndrs pass)
, forall pass. ConDecl pass -> Maybe (LHsContext pass)
con_mb_cxt :: Maybe (LHsContext pass)
, forall pass. ConDecl pass -> HsConDeclGADTDetails pass
con_g_args :: HsConDeclGADTDetails pass
, forall pass. ConDecl pass -> LHsType pass
con_res_ty :: LHsType pass
, forall pass. ConDecl pass -> Maybe (LHsDoc pass)
con_doc :: Maybe (LHsDoc pass)
}
| ConDeclH98
{ forall pass. ConDecl pass -> XConDeclH98 pass
con_ext :: XConDeclH98 pass
, forall pass. ConDecl pass -> LIdP pass
con_name :: LIdP pass
, forall pass. ConDecl pass -> Bool
con_forall :: Bool
, forall pass. ConDecl pass -> [LHsTyVarBndr Specificity pass]
con_ex_tvs :: [LHsTyVarBndr Specificity pass]
, con_mb_cxt :: Maybe (LHsContext pass)
, forall pass. ConDecl pass -> HsConDeclH98Details pass
con_args :: HsConDeclH98Details pass
, con_doc :: Maybe (LHsDoc pass)
}
| XConDecl !(XXConDecl pass)
type HsConDeclH98Details pass
= HsConDetails Void (HsScaled pass (LBangType pass)) (XRec pass [LConDeclField pass])
data HsConDeclGADTDetails pass
= PrefixConGADT [HsScaled pass (LBangType pass)]
| RecConGADT (XRec pass [LConDeclField pass]) (LHsUniToken "->" "→" pass)
type LTyFamInstEqn pass = XRec pass (TyFamInstEqn pass)
type HsTyPats pass = [LHsTypeArg pass]
type TyFamInstEqn pass = FamEqn pass (LHsType pass)
type TyFamDefltDecl = TyFamInstDecl
type LTyFamDefltDecl pass = XRec pass (TyFamDefltDecl pass)
type LTyFamInstDecl pass = XRec pass (TyFamInstDecl pass)
data TyFamInstDecl pass
= TyFamInstDecl { forall pass. TyFamInstDecl pass -> XCTyFamInstDecl pass
tfid_xtn :: XCTyFamInstDecl pass
, forall pass. TyFamInstDecl pass -> TyFamInstEqn pass
tfid_eqn :: TyFamInstEqn pass }
| XTyFamInstDecl !(XXTyFamInstDecl pass)
type LDataFamInstDecl pass = XRec pass (DataFamInstDecl pass)
newtype DataFamInstDecl pass
= DataFamInstDecl { forall pass. DataFamInstDecl pass -> FamEqn pass (HsDataDefn pass)
dfid_eqn :: FamEqn pass (HsDataDefn pass) }
data FamEqn pass rhs
= FamEqn
{ forall pass rhs. FamEqn pass rhs -> XCFamEqn pass rhs
feqn_ext :: XCFamEqn pass rhs
, forall pass rhs. FamEqn pass rhs -> LIdP pass
feqn_tycon :: LIdP pass
, forall pass rhs. FamEqn pass rhs -> HsOuterFamEqnTyVarBndrs pass
feqn_bndrs :: HsOuterFamEqnTyVarBndrs pass
, forall pass rhs. FamEqn pass rhs -> HsTyPats pass
feqn_pats :: HsTyPats pass
, forall pass rhs. FamEqn pass rhs -> LexicalFixity
feqn_fixity :: LexicalFixity
, forall pass rhs. FamEqn pass rhs -> rhs
feqn_rhs :: rhs
}
| XFamEqn !(XXFamEqn pass rhs)
type LClsInstDecl pass = XRec pass (ClsInstDecl pass)
data ClsInstDecl pass
= ClsInstDecl
{ forall pass. ClsInstDecl pass -> XCClsInstDecl pass
cid_ext :: XCClsInstDecl pass
, forall pass. ClsInstDecl pass -> LHsSigType pass
cid_poly_ty :: LHsSigType pass
, forall pass. ClsInstDecl pass -> LHsBinds pass
cid_binds :: LHsBinds pass
, forall pass. ClsInstDecl pass -> [LSig pass]
cid_sigs :: [LSig pass]
, forall pass. ClsInstDecl pass -> [LTyFamInstDecl pass]
cid_tyfam_insts :: [LTyFamInstDecl pass]
, forall pass. ClsInstDecl pass -> [LDataFamInstDecl pass]
cid_datafam_insts :: [LDataFamInstDecl pass]
, forall pass. ClsInstDecl pass -> Maybe (XRec pass OverlapMode)
cid_overlap_mode :: Maybe (XRec pass OverlapMode)
}
| XClsInstDecl !(XXClsInstDecl pass)
type LInstDecl pass = XRec pass (InstDecl pass)
data InstDecl pass
= ClsInstD
{ forall pass. InstDecl pass -> XClsInstD pass
cid_d_ext :: XClsInstD pass
, forall pass. InstDecl pass -> ClsInstDecl pass
cid_inst :: ClsInstDecl pass }
| DataFamInstD
{ forall pass. InstDecl pass -> XDataFamInstD pass
dfid_ext :: XDataFamInstD pass
, forall pass. InstDecl pass -> DataFamInstDecl pass
dfid_inst :: DataFamInstDecl pass }
| TyFamInstD
{ forall pass. InstDecl pass -> XTyFamInstD pass
tfid_ext :: XTyFamInstD pass
, forall pass. InstDecl pass -> TyFamInstDecl pass
tfid_inst :: TyFamInstDecl pass }
| XInstDecl !(XXInstDecl pass)
type LDerivDecl pass = XRec pass (DerivDecl pass)
data DerivDecl pass = DerivDecl
{ forall pass. DerivDecl pass -> XCDerivDecl pass
deriv_ext :: XCDerivDecl pass
, forall pass. DerivDecl pass -> LHsSigWcType pass
deriv_type :: LHsSigWcType pass
, forall pass. DerivDecl pass -> Maybe (LDerivStrategy pass)
deriv_strategy :: Maybe (LDerivStrategy pass)
, forall pass. DerivDecl pass -> Maybe (XRec pass OverlapMode)
deriv_overlap_mode :: Maybe (XRec pass OverlapMode)
}
| XDerivDecl !(XXDerivDecl pass)
type LDerivStrategy pass = XRec pass (DerivStrategy pass)
data DerivStrategy pass
= StockStrategy (XStockStrategy pass)
| AnyclassStrategy (XAnyClassStrategy pass)
| NewtypeStrategy (XNewtypeStrategy pass)
| ViaStrategy (XViaStrategy pass)
type LDefaultDecl pass = XRec pass (DefaultDecl pass)
data DefaultDecl pass
= DefaultDecl (XCDefaultDecl pass) [LHsType pass]
| XDefaultDecl !(XXDefaultDecl pass)
type LForeignDecl pass = XRec pass (ForeignDecl pass)
data ForeignDecl pass
= ForeignImport
{ forall pass. ForeignDecl pass -> XForeignImport pass
fd_i_ext :: XForeignImport pass
, forall pass. ForeignDecl pass -> LIdP pass
fd_name :: LIdP pass
, forall pass. ForeignDecl pass -> LHsSigType pass
fd_sig_ty :: LHsSigType pass
, forall pass. ForeignDecl pass -> ForeignImport pass
fd_fi :: ForeignImport pass }
| ForeignExport
{ forall pass. ForeignDecl pass -> XForeignExport pass
fd_e_ext :: XForeignExport pass
, fd_name :: LIdP pass
, fd_sig_ty :: LHsSigType pass
, forall pass. ForeignDecl pass -> ForeignExport pass
fd_fe :: ForeignExport pass }
| XForeignDecl !(XXForeignDecl pass)
data ForeignImport pass =
CImport (XCImport pass)
(XRec pass CCallConv)
(XRec pass Safety)
(Maybe Header)
CImportSpec
| XForeignImport !(XXForeignImport pass)
data CImportSpec = CLabel CLabelString
| CFunction CCallTarget
| CWrapper
deriving Typeable CImportSpec
Typeable CImportSpec =>
(forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> CImportSpec -> c CImportSpec)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CImportSpec)
-> (CImportSpec -> Constr)
-> (CImportSpec -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CImportSpec))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CImportSpec))
-> ((forall b. Data b => b -> b) -> CImportSpec -> CImportSpec)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CImportSpec -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CImportSpec -> r)
-> (forall u. (forall d. Data d => d -> u) -> CImportSpec -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> CImportSpec -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec)
-> Data CImportSpec
CImportSpec -> Constr
CImportSpec -> DataType
(forall b. Data b => b -> b) -> CImportSpec -> CImportSpec
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) -> CImportSpec -> u
forall u. (forall d. Data d => d -> u) -> CImportSpec -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CImportSpec -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CImportSpec -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CImportSpec
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> CImportSpec -> c CImportSpec
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CImportSpec)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CImportSpec)
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> CImportSpec -> c CImportSpec
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> CImportSpec -> c CImportSpec
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CImportSpec
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c CImportSpec
$ctoConstr :: CImportSpec -> Constr
toConstr :: CImportSpec -> Constr
$cdataTypeOf :: CImportSpec -> DataType
dataTypeOf :: CImportSpec -> DataType
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CImportSpec)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c CImportSpec)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CImportSpec)
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c CImportSpec)
$cgmapT :: (forall b. Data b => b -> b) -> CImportSpec -> CImportSpec
gmapT :: (forall b. Data b => b -> b) -> CImportSpec -> CImportSpec
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CImportSpec -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> CImportSpec -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CImportSpec -> r
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> CImportSpec -> r
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> CImportSpec -> [u]
gmapQ :: forall u. (forall d. Data d => d -> u) -> CImportSpec -> [u]
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> CImportSpec -> u
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> CImportSpec -> u
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> CImportSpec -> m CImportSpec
Data
data ForeignExport pass = CExport (XCExport pass) (XRec pass CExportSpec)
| XForeignExport !(XXForeignExport pass)
type LRuleDecls pass = XRec pass (RuleDecls pass)
data RuleDecls pass = HsRules { forall pass. RuleDecls pass -> XCRuleDecls pass
rds_ext :: XCRuleDecls pass
, forall pass. RuleDecls pass -> [LRuleDecl pass]
rds_rules :: [LRuleDecl pass] }
| XRuleDecls !(XXRuleDecls pass)
type LRuleDecl pass = XRec pass (RuleDecl pass)
data RuleDecl pass
= HsRule
{ forall pass. RuleDecl pass -> XHsRule pass
rd_ext :: XHsRule pass
, forall pass. RuleDecl pass -> XRec pass CLabelString
rd_name :: XRec pass RuleName
, forall pass. RuleDecl pass -> Activation
rd_act :: Activation
, forall pass.
RuleDecl pass -> Maybe [LHsTyVarBndr () (NoGhcTc pass)]
rd_tyvs :: Maybe [LHsTyVarBndr () (NoGhcTc pass)]
, forall pass. RuleDecl pass -> [LRuleBndr pass]
rd_tmvs :: [LRuleBndr pass]
, forall pass. RuleDecl pass -> XRec pass (HsExpr pass)
rd_lhs :: XRec pass (HsExpr pass)
, forall pass. RuleDecl pass -> XRec pass (HsExpr pass)
rd_rhs :: XRec pass (HsExpr pass)
}
| XRuleDecl !(XXRuleDecl pass)
type LRuleBndr pass = XRec pass (RuleBndr pass)
data RuleBndr pass
= RuleBndr (XCRuleBndr pass) (LIdP pass)
| RuleBndrSig (XRuleBndrSig pass) (LIdP pass) (HsPatSigType pass)
| XRuleBndr !(XXRuleBndr pass)
collectRuleBndrSigTys :: [RuleBndr pass] -> [HsPatSigType pass]
collectRuleBndrSigTys :: forall pass. [RuleBndr pass] -> [HsPatSigType pass]
collectRuleBndrSigTys [RuleBndr pass]
bndrs = [HsPatSigType pass
ty | RuleBndrSig XRuleBndrSig pass
_ LIdP pass
_ HsPatSigType pass
ty <- [RuleBndr pass]
bndrs]
type LDocDecl pass = XRec pass (DocDecl pass)
data DocDecl pass
= (LHsDoc pass)
| (LHsDoc pass)
| String (LHsDoc pass)
| DocGroup Int (LHsDoc pass)
deriving instance (Data pass, Data (IdP pass)) => Data (DocDecl pass)
docDeclDoc :: DocDecl pass -> LHsDoc pass
docDeclDoc :: forall pass. DocDecl pass -> LHsDoc pass
docDeclDoc (DocCommentNext LHsDoc pass
d) = LHsDoc pass
d
docDeclDoc (DocCommentPrev LHsDoc pass
d) = LHsDoc pass
d
docDeclDoc (DocCommentNamed String
_ LHsDoc pass
d) = LHsDoc pass
d
docDeclDoc (DocGroup Int
_ LHsDoc pass
d) = LHsDoc pass
d
type LWarnDecls pass = XRec pass (WarnDecls pass)
data WarnDecls pass = Warnings { forall pass. WarnDecls pass -> XWarnings pass
wd_ext :: XWarnings pass
, forall pass. WarnDecls pass -> [LWarnDecl pass]
wd_warnings :: [LWarnDecl pass]
}
| XWarnDecls !(XXWarnDecls pass)
type LWarnDecl pass = XRec pass (WarnDecl pass)
data WarnDecl pass = Warning (XWarning pass) [LIdP pass] (WarningTxt pass)
| XWarnDecl !(XXWarnDecl pass)
type LAnnDecl pass = XRec pass (AnnDecl pass)
data AnnDecl pass = HsAnnotation
(XHsAnnotation pass)
(AnnProvenance pass) (XRec pass (HsExpr pass))
| XAnnDecl !(XXAnnDecl pass)
data AnnProvenance pass = ValueAnnProvenance (LIdP pass)
| TypeAnnProvenance (LIdP pass)
| ModuleAnnProvenance
annProvenanceName_maybe :: forall p. UnXRec p => AnnProvenance p -> Maybe (IdP p)
annProvenanceName_maybe :: forall p. UnXRec p => AnnProvenance p -> Maybe (IdP p)
annProvenanceName_maybe (ValueAnnProvenance (forall p a. UnXRec p => XRec p a -> a
unXRec @p -> IdP p
name)) = IdP p -> Maybe (IdP p)
forall a. a -> Maybe a
Just IdP p
name
annProvenanceName_maybe (TypeAnnProvenance (forall p a. UnXRec p => XRec p a -> a
unXRec @p -> IdP p
name)) = IdP p -> Maybe (IdP p)
forall a. a -> Maybe a
Just IdP p
name
annProvenanceName_maybe AnnProvenance p
ModuleAnnProvenance = Maybe (IdP p)
forall a. Maybe a
Nothing
type LRoleAnnotDecl pass = XRec pass (RoleAnnotDecl pass)
data RoleAnnotDecl pass
= RoleAnnotDecl (XCRoleAnnotDecl pass)
(LIdP pass)
[XRec pass (Maybe Role)]
| XRoleAnnotDecl !(XXRoleAnnotDecl pass)