{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ViewPatterns #-}
module Language.Haskell.Syntax.Binds where
import GHC.Prelude
import {-# SOURCE #-} Language.Haskell.Syntax.Expr
( LHsExpr
, MatchGroup
, GRHSs )
import {-# SOURCE #-} Language.Haskell.Syntax.Pat
( LPat )
import Language.Haskell.Syntax.Extension
import Language.Haskell.Syntax.Type
import GHC.Tc.Types.Evidence
import GHC.Core.Type
import GHC.Types.Basic
import GHC.Types.SourceText
import GHC.Types.SrcLoc as SrcLoc
import GHC.Types.Tickish
import GHC.Types.Var
import GHC.Types.Fixity
import GHC.Data.Bag
import GHC.Data.BooleanFormula (LBooleanFormula)
import GHC.Utils.Outputable
import Data.Data hiding ( Fixity )
import Data.Void
type HsLocalBinds id = HsLocalBindsLR id id
type LHsLocalBinds id = XRec id (HsLocalBinds id)
data HsLocalBindsLR idL idR
= HsValBinds
(XHsValBinds idL idR)
(HsValBindsLR idL idR)
| HsIPBinds
(XHsIPBinds idL idR)
(HsIPBinds idR)
| EmptyLocalBinds (XEmptyLocalBinds idL idR)
| XHsLocalBindsLR
!(XXHsLocalBindsLR idL idR)
type LHsLocalBindsLR idL idR = XRec idL (HsLocalBindsLR idL idR)
type HsValBinds id = HsValBindsLR id id
data HsValBindsLR idL idR
=
ValBinds
(XValBinds idL idR)
(LHsBindsLR idL idR) [LSig idR]
| XValBindsLR
!(XXValBindsLR idL idR)
type LHsBind id = LHsBindLR id id
type LHsBinds id = LHsBindsLR id id
type HsBind id = HsBindLR id id
type LHsBindsLR idL idR = Bag (LHsBindLR idL idR)
type LHsBindLR idL idR = XRec idL (HsBindLR idL idR)
data HsBindLR idL idR
=
FunBind {
forall idL idR. HsBindLR idL idR -> XFunBind idL idR
fun_ext :: XFunBind idL idR,
forall idL idR. HsBindLR idL idR -> LIdP idL
fun_id :: LIdP idL,
forall idL idR. HsBindLR idL idR -> MatchGroup idR (LHsExpr idR)
fun_matches :: MatchGroup idR (LHsExpr idR),
forall idL idR. HsBindLR idL idR -> [CoreTickish]
fun_tick :: [CoreTickish]
}
| PatBind {
forall idL idR. HsBindLR idL idR -> XPatBind idL idR
pat_ext :: XPatBind idL idR,
forall idL idR. HsBindLR idL idR -> LPat idL
pat_lhs :: LPat idL,
forall idL idR. HsBindLR idL idR -> GRHSs idR (LHsExpr idR)
pat_rhs :: GRHSs idR (LHsExpr idR),
forall idL idR.
HsBindLR idL idR -> ([CoreTickish], [[CoreTickish]])
pat_ticks :: ([CoreTickish], [[CoreTickish]])
}
| VarBind {
forall idL idR. HsBindLR idL idR -> XVarBind idL idR
var_ext :: XVarBind idL idR,
forall idL idR. HsBindLR idL idR -> IdP idL
var_id :: IdP idL,
forall idL idR. HsBindLR idL idR -> LHsExpr idR
var_rhs :: LHsExpr idR
}
| AbsBinds {
forall idL idR. HsBindLR idL idR -> XAbsBinds idL idR
abs_ext :: XAbsBinds idL idR,
forall idL idR. HsBindLR idL idR -> [TyVar]
abs_tvs :: [TyVar],
forall idL idR. HsBindLR idL idR -> [TyVar]
abs_ev_vars :: [EvVar],
forall idL idR. HsBindLR idL idR -> [ABExport idL]
abs_exports :: [ABExport idL],
forall idL idR. HsBindLR idL idR -> [TcEvBinds]
abs_ev_binds :: [TcEvBinds],
forall idL idR. HsBindLR idL idR -> LHsBinds idL
abs_binds :: LHsBinds idL,
forall idL idR. HsBindLR idL idR -> Bool
abs_sig :: Bool
}
| PatSynBind
(XPatSynBind idL idR)
(PatSynBind idL idR)
| XHsBindsLR !(XXHsBindsLR idL idR)
data ABExport p
= ABE { forall p. ABExport p -> XABE p
abe_ext :: XABE p
, forall p. ABExport p -> IdP p
abe_poly :: IdP p
, forall p. ABExport p -> IdP p
abe_mono :: IdP p
, forall p. ABExport p -> HsWrapper
abe_wrap :: HsWrapper
, forall p. ABExport p -> TcSpecPrags
abe_prags :: TcSpecPrags
}
| XABExport !(XXABExport p)
data PatSynBind idL idR
= PSB { forall idL idR. PatSynBind idL idR -> XPSB idL idR
psb_ext :: XPSB idL idR,
forall idL idR. PatSynBind idL idR -> LIdP idL
psb_id :: LIdP idL,
forall idL idR. PatSynBind idL idR -> HsPatSynDetails idR
psb_args :: HsPatSynDetails idR,
forall idL idR. PatSynBind idL idR -> LPat idR
psb_def :: LPat idR,
forall idL idR. PatSynBind idL idR -> HsPatSynDir idR
psb_dir :: HsPatSynDir idR
}
| XPatSynBind !(XXPatSynBind idL idR)
data HsIPBinds id
= IPBinds
(XIPBinds id)
[LIPBind id]
| XHsIPBinds !(XXHsIPBinds id)
type LIPBind id = XRec id (IPBind id)
data IPBind id
= IPBind
(XCIPBind id)
(Either (XRec id HsIPName) (IdP id))
(LHsExpr id)
| XIPBind !(XXIPBind id)
type LSig pass = XRec pass (Sig pass)
data Sig pass
=
TypeSig
(XTypeSig pass)
[LIdP pass]
(LHsSigWcType pass)
| PatSynSig (XPatSynSig pass) [LIdP pass] (LHsSigType pass)
| ClassOpSig (XClassOpSig pass) Bool [LIdP pass] (LHsSigType pass)
| IdSig (XIdSig pass) Id
| FixSig (XFixSig pass) (FixitySig pass)
| InlineSig (XInlineSig pass)
(LIdP pass)
InlinePragma
| SpecSig (XSpecSig pass)
(LIdP pass)
[LHsSigType pass]
InlinePragma
| SpecInstSig (XSpecInstSig pass) SourceText (LHsSigType pass)
| MinimalSig (XMinimalSig pass)
SourceText (LBooleanFormula (LIdP pass))
| SCCFunSig (XSCCFunSig pass)
SourceText
(LIdP pass)
(Maybe (XRec pass StringLiteral))
| CompleteMatchSig (XCompleteMatchSig pass)
SourceText
(XRec pass [LIdP pass])
(Maybe (LIdP pass))
| XSig !(XXSig pass)
type LFixitySig pass = XRec pass (FixitySig pass)
data FixitySig pass = FixitySig (XFixitySig pass) [LIdP pass] Fixity
| XFixitySig !(XXFixitySig pass)
data TcSpecPrags
= IsDefaultMethod
| SpecPrags [LTcSpecPrag]
deriving Typeable TcSpecPrags
Typeable TcSpecPrags
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TcSpecPrags -> c TcSpecPrags)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TcSpecPrags)
-> (TcSpecPrags -> Constr)
-> (TcSpecPrags -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TcSpecPrags))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TcSpecPrags))
-> ((forall b. Data b => b -> b) -> TcSpecPrags -> TcSpecPrags)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TcSpecPrags -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TcSpecPrags -> r)
-> (forall u. (forall d. Data d => d -> u) -> TcSpecPrags -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> TcSpecPrags -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags)
-> Data TcSpecPrags
TcSpecPrags -> DataType
TcSpecPrags -> Constr
(forall b. Data b => b -> b) -> TcSpecPrags -> TcSpecPrags
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) -> TcSpecPrags -> u
forall u. (forall d. Data d => d -> u) -> TcSpecPrags -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TcSpecPrags -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TcSpecPrags -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TcSpecPrags
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TcSpecPrags -> c TcSpecPrags
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TcSpecPrags)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TcSpecPrags)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TcSpecPrags -> m TcSpecPrags
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TcSpecPrags -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TcSpecPrags -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> TcSpecPrags -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TcSpecPrags -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TcSpecPrags -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TcSpecPrags -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TcSpecPrags -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TcSpecPrags -> r
gmapT :: (forall b. Data b => b -> b) -> TcSpecPrags -> TcSpecPrags
$cgmapT :: (forall b. Data b => b -> b) -> TcSpecPrags -> TcSpecPrags
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TcSpecPrags)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TcSpecPrags)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TcSpecPrags)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TcSpecPrags)
dataTypeOf :: TcSpecPrags -> DataType
$cdataTypeOf :: TcSpecPrags -> DataType
toConstr :: TcSpecPrags -> Constr
$ctoConstr :: TcSpecPrags -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TcSpecPrags
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TcSpecPrags
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TcSpecPrags -> c TcSpecPrags
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TcSpecPrags -> c TcSpecPrags
Data
type LTcSpecPrag = Located TcSpecPrag
data TcSpecPrag
= SpecPrag
Id
HsWrapper
InlinePragma
deriving Typeable TcSpecPrag
Typeable TcSpecPrag
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TcSpecPrag -> c TcSpecPrag)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TcSpecPrag)
-> (TcSpecPrag -> Constr)
-> (TcSpecPrag -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TcSpecPrag))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c TcSpecPrag))
-> ((forall b. Data b => b -> b) -> TcSpecPrag -> TcSpecPrag)
-> (forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TcSpecPrag -> r)
-> (forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TcSpecPrag -> r)
-> (forall u. (forall d. Data d => d -> u) -> TcSpecPrag -> [u])
-> (forall u.
Int -> (forall d. Data d => d -> u) -> TcSpecPrag -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag)
-> Data TcSpecPrag
TcSpecPrag -> DataType
TcSpecPrag -> Constr
(forall b. Data b => b -> b) -> TcSpecPrag -> TcSpecPrag
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) -> TcSpecPrag -> u
forall u. (forall d. Data d => d -> u) -> TcSpecPrag -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TcSpecPrag -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TcSpecPrag -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TcSpecPrag
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TcSpecPrag -> c TcSpecPrag
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TcSpecPrag)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TcSpecPrag)
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> TcSpecPrag -> m TcSpecPrag
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TcSpecPrag -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> TcSpecPrag -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> TcSpecPrag -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> TcSpecPrag -> [u]
gmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TcSpecPrag -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> TcSpecPrag -> r
gmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TcSpecPrag -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> TcSpecPrag -> r
gmapT :: (forall b. Data b => b -> b) -> TcSpecPrag -> TcSpecPrag
$cgmapT :: (forall b. Data b => b -> b) -> TcSpecPrag -> TcSpecPrag
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TcSpecPrag)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TcSpecPrag)
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TcSpecPrag)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c TcSpecPrag)
dataTypeOf :: TcSpecPrag -> DataType
$cdataTypeOf :: TcSpecPrag -> DataType
toConstr :: TcSpecPrag -> Constr
$ctoConstr :: TcSpecPrag -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TcSpecPrag
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c TcSpecPrag
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TcSpecPrag -> c TcSpecPrag
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> TcSpecPrag -> c TcSpecPrag
Data
noSpecPrags :: TcSpecPrags
noSpecPrags :: TcSpecPrags
noSpecPrags = [LTcSpecPrag] -> TcSpecPrags
SpecPrags []
hasSpecPrags :: TcSpecPrags -> Bool
hasSpecPrags :: TcSpecPrags -> Bool
hasSpecPrags (SpecPrags [LTcSpecPrag]
ps) = Bool -> Bool
not ([LTcSpecPrag] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
null [LTcSpecPrag]
ps)
hasSpecPrags TcSpecPrags
IsDefaultMethod = Bool
False
isDefaultMethod :: TcSpecPrags -> Bool
isDefaultMethod :: TcSpecPrags -> Bool
isDefaultMethod TcSpecPrags
IsDefaultMethod = Bool
True
isDefaultMethod (SpecPrags {}) = Bool
False
isFixityLSig :: forall p. UnXRec p => LSig p -> Bool
isFixityLSig :: forall p. UnXRec p => LSig p -> Bool
isFixityLSig (forall p a. UnXRec p => XRec p a -> a
unXRec @p -> FixSig {}) = Bool
True
isFixityLSig LSig p
_ = Bool
False
isTypeLSig :: forall p. UnXRec p => LSig p -> Bool
isTypeLSig :: forall p. UnXRec p => LSig p -> Bool
isTypeLSig (forall p a. UnXRec p => XRec p a -> a
unXRec @p -> TypeSig {}) = Bool
True
isTypeLSig (forall p a. UnXRec p => XRec p a -> a
unXRec @p -> ClassOpSig {}) = Bool
True
isTypeLSig (forall p a. UnXRec p => XRec p a -> a
unXRec @p -> IdSig {}) = Bool
True
isTypeLSig LSig p
_ = Bool
False
isSpecLSig :: forall p. UnXRec p => LSig p -> Bool
isSpecLSig :: forall p. UnXRec p => LSig p -> Bool
isSpecLSig (forall p a. UnXRec p => XRec p a -> a
unXRec @p -> SpecSig {}) = Bool
True
isSpecLSig LSig p
_ = Bool
False
isSpecInstLSig :: forall p. UnXRec p => LSig p -> Bool
isSpecInstLSig :: forall p. UnXRec p => LSig p -> Bool
isSpecInstLSig (forall p a. UnXRec p => XRec p a -> a
unXRec @p -> SpecInstSig {}) = Bool
True
isSpecInstLSig LSig p
_ = Bool
False
isPragLSig :: forall p. UnXRec p => LSig p -> Bool
isPragLSig :: forall p. UnXRec p => LSig p -> Bool
isPragLSig (forall p a. UnXRec p => XRec p a -> a
unXRec @p -> SpecSig {}) = Bool
True
isPragLSig (forall p a. UnXRec p => XRec p a -> a
unXRec @p -> InlineSig {}) = Bool
True
isPragLSig (forall p a. UnXRec p => XRec p a -> a
unXRec @p -> SCCFunSig {}) = Bool
True
isPragLSig (forall p a. UnXRec p => XRec p a -> a
unXRec @p -> CompleteMatchSig {}) = Bool
True
isPragLSig LSig p
_ = Bool
False
isInlineLSig :: forall p. UnXRec p => LSig p -> Bool
isInlineLSig :: forall p. UnXRec p => LSig p -> Bool
isInlineLSig (forall p a. UnXRec p => XRec p a -> a
unXRec @p -> InlineSig {}) = Bool
True
isInlineLSig LSig p
_ = Bool
False
isMinimalLSig :: forall p. UnXRec p => LSig p -> Bool
isMinimalLSig :: forall p. UnXRec p => LSig p -> Bool
isMinimalLSig (forall p a. UnXRec p => XRec p a -> a
unXRec @p -> MinimalSig {}) = Bool
True
isMinimalLSig LSig p
_ = Bool
False
isSCCFunSig :: forall p. UnXRec p => LSig p -> Bool
isSCCFunSig :: forall p. UnXRec p => LSig p -> Bool
isSCCFunSig (forall p a. UnXRec p => XRec p a -> a
unXRec @p -> SCCFunSig {}) = Bool
True
isSCCFunSig LSig p
_ = Bool
False
isCompleteMatchSig :: forall p. UnXRec p => LSig p -> Bool
isCompleteMatchSig :: forall p. UnXRec p => LSig p -> Bool
isCompleteMatchSig (forall p a. UnXRec p => XRec p a -> a
unXRec @p -> CompleteMatchSig {} ) = Bool
True
isCompleteMatchSig LSig p
_ = Bool
False
hsSigDoc :: Sig name -> SDoc
hsSigDoc :: forall name. Sig name -> SDoc
hsSigDoc (TypeSig {}) = String -> SDoc
text String
"type signature"
hsSigDoc (PatSynSig {}) = String -> SDoc
text String
"pattern synonym signature"
hsSigDoc (ClassOpSig XClassOpSig name
_ Bool
is_deflt [LIdP name]
_ LHsSigType name
_)
| Bool
is_deflt = String -> SDoc
text String
"default type signature"
| Bool
otherwise = String -> SDoc
text String
"class method signature"
hsSigDoc (IdSig {}) = String -> SDoc
text String
"id signature"
hsSigDoc (SpecSig XSpecSig name
_ LIdP name
_ [LHsSigType name]
_ InlinePragma
inl)
= InlinePragma -> SDoc
forall a. Outputable a => a -> SDoc
ppr InlinePragma
inl SDoc -> SDoc -> SDoc
<+> String -> SDoc
text String
"pragma"
hsSigDoc (InlineSig XInlineSig name
_ LIdP name
_ InlinePragma
prag) = InlineSpec -> SDoc
forall a. Outputable a => a -> SDoc
ppr (InlinePragma -> InlineSpec
inlinePragmaSpec InlinePragma
prag) SDoc -> SDoc -> SDoc
<+> String -> SDoc
text String
"pragma"
hsSigDoc (SpecInstSig XSpecInstSig name
_ SourceText
src LHsSigType name
_)
= SourceText -> SDoc -> SDoc
pprWithSourceText SourceText
src SDoc
empty SDoc -> SDoc -> SDoc
<+> String -> SDoc
text String
"instance pragma"
hsSigDoc (FixSig {}) = String -> SDoc
text String
"fixity declaration"
hsSigDoc (MinimalSig {}) = String -> SDoc
text String
"MINIMAL pragma"
hsSigDoc (SCCFunSig {}) = String -> SDoc
text String
"SCC pragma"
hsSigDoc (CompleteMatchSig {}) = String -> SDoc
text String
"COMPLETE pragma"
hsSigDoc (XSig {}) = String -> SDoc
text String
"XSIG TTG extension"
type HsPatSynDetails pass = HsConDetails Void (LIdP pass) [RecordPatSynField pass]
data RecordPatSynField pass
= RecordPatSynField
{ forall pass. RecordPatSynField pass -> FieldOcc pass
recordPatSynField :: FieldOcc pass
, forall pass. RecordPatSynField pass -> LIdP pass
recordPatSynPatVar :: LIdP pass
}
instance Outputable (RecordPatSynField a) where
ppr :: RecordPatSynField a -> SDoc
ppr (RecordPatSynField { recordPatSynField :: forall pass. RecordPatSynField pass -> FieldOcc pass
recordPatSynField = FieldOcc a
v }) = FieldOcc a -> SDoc
forall a. Outputable a => a -> SDoc
ppr FieldOcc a
v
data HsPatSynDir id
= Unidirectional
| ImplicitBidirectional
| ExplicitBidirectional (MatchGroup id (LHsExpr id))