ghc-lib-parser-9.12.2.20250421: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

Language.Haskell.Syntax.Specificity

Contents

- ForAllTyFlags

Synopsis

- data ForAllTyFlag where
  - Invisible !Specificity
  - Required
  - pattern Specified :: ForAllTyFlag
  - pattern Inferred :: ForAllTyFlag
- data Specificity
  - = InferredSpec
  - | SpecifiedSpec
- isVisibleForAllTyFlag :: ForAllTyFlag -> Bool
- isInvisibleForAllTyFlag :: ForAllTyFlag -> Bool
- isInferredForAllTyFlag :: ForAllTyFlag -> Bool
- isSpecifiedForAllTyFlag :: ForAllTyFlag -> Bool
- coreTyLamForAllTyFlag :: ForAllTyFlag

# ForAllTyFlags

data ForAllTyFlag Source #

ForAllTyFlag

Is something required to appear in source Haskell (`Required`), permitted by request (`Specified`) (visible type application), or prohibited entirely from appearing in source Haskell (`Inferred`)? See Note [VarBndrs, ForAllTyBinders, TyConBinders, and visibility] in GHC.Core.TyCo.Rep

Constructors

Invisible !Specificity |
Required |

Bundled Patterns

pattern Specified :: ForAllTyFlag |
pattern Inferred :: ForAllTyFlag |

#### Instances

Instances details

NFData ForAllTyFlag Source # |
Instance details Defined in GHC.Hs.Specificity Methods rnf :: ForAllTyFlag -> () Source #
Data ForAllTyFlag Source # |

Instance details

Defined in Language.Haskell.Syntax.Specificity

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForAllTyFlag -> c ForAllTyFlag Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ForAllTyFlag Source #

toConstr :: ForAllTyFlag -> Constr Source #

dataTypeOf :: ForAllTyFlag -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ForAllTyFlag) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ForAllTyFlag) Source #

gmapT :: (forall b. Data b => b -> b) -> ForAllTyFlag -> ForAllTyFlag Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForAllTyFlag -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForAllTyFlag -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> ForAllTyFlag -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ForAllTyFlag -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForAllTyFlag -> m ForAllTyFlag Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForAllTyFlag -> m ForAllTyFlag Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForAllTyFlag -> m ForAllTyFlag Source #

Binary ForAllTyFlag Source # |
Instance details Defined in GHC.Hs.Specificity Methods put_ :: WriteBinHandle -> ForAllTyFlag -> IO () Source # put :: WriteBinHandle -> ForAllTyFlag -> IO (Bin ForAllTyFlag) Source # get :: ReadBinHandle -> IO ForAllTyFlag Source #
Outputable ForAllTyFlag Source # |
Instance details Defined in GHC.Hs.Specificity Methods ppr :: ForAllTyFlag -> SDoc Source #
Eq ForAllTyFlag Source # |
Instance details Defined in Language.Haskell.Syntax.Specificity Methods (==) :: ForAllTyFlag -> ForAllTyFlag -> Bool Source # (/=) :: ForAllTyFlag -> ForAllTyFlag -> Bool Source #
Ord ForAllTyFlag Source # |

Instance details

Defined in Language.Haskell.Syntax.Specificity

Methods

compare :: ForAllTyFlag -> ForAllTyFlag -> Ordering Source #

(<) :: ForAllTyFlag -> ForAllTyFlag -> Bool Source #

(<=) :: ForAllTyFlag -> ForAllTyFlag -> Bool Source #

(>) :: ForAllTyFlag -> ForAllTyFlag -> Bool Source #

(>=) :: ForAllTyFlag -> ForAllTyFlag -> Bool Source #

max :: ForAllTyFlag -> ForAllTyFlag -> ForAllTyFlag Source #

min :: ForAllTyFlag -> ForAllTyFlag -> ForAllTyFlag Source #

Outputable tv => Outputable (VarBndr tv ForAllTyFlag) Source # |
Instance details Defined in GHC.Types.Var Methods ppr :: VarBndr tv ForAllTyFlag -> SDoc Source #

data Specificity Source #

Whether an `Invisible` argument may appear in source Haskell.

Constructors

InferredSpec | the argument may not appear in source Haskell, it is only inferred.
SpecifiedSpec | the argument may appear in source Haskell, but isn't required.

#### Instances

Instances details

NFData Specificity Source # |
Instance details Defined in GHC.Hs.Specificity Methods rnf :: Specificity -> () Source #
Data Specificity Source # |

Instance details

Defined in Language.Haskell.Syntax.Specificity

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Specificity -> c Specificity Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Specificity Source #

toConstr :: Specificity -> Constr Source #

dataTypeOf :: Specificity -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Specificity) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Specificity) Source #

gmapT :: (forall b. Data b => b -> b) -> Specificity -> Specificity Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Specificity -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Specificity -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Specificity -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Specificity -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Specificity -> m Specificity Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Specificity -> m Specificity Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Specificity -> m Specificity Source #

Binary Specificity Source # |
Instance details Defined in GHC.Hs.Specificity Methods put_ :: WriteBinHandle -> Specificity -> IO () Source # put :: WriteBinHandle -> Specificity -> IO (Bin Specificity) Source # get :: ReadBinHandle -> IO Specificity Source #
Eq Specificity Source # |
Instance details Defined in Language.Haskell.Syntax.Specificity Methods (==) :: Specificity -> Specificity -> Bool Source # (/=) :: Specificity -> Specificity -> Bool Source #
Ord Specificity Source # |

Instance details

Defined in Language.Haskell.Syntax.Specificity

Methods

compare :: Specificity -> Specificity -> Ordering Source #

(<) :: Specificity -> Specificity -> Bool Source #

(<=) :: Specificity -> Specificity -> Bool Source #

(>) :: Specificity -> Specificity -> Bool Source #

(>=) :: Specificity -> Specificity -> Bool Source #

max :: Specificity -> Specificity -> Specificity Source #

min :: Specificity -> Specificity -> Specificity Source #

OutputableBndrFlag Specificity p Source # |
Instance details Defined in GHC.Hs.Type Methods pprTyVarBndr :: HsTyVarBndr Specificity (GhcPass p) -> SDoc
Outputable tv => Outputable (VarBndr tv Specificity) Source # |
Instance details Defined in GHC.Types.Var Methods ppr :: VarBndr tv Specificity -> SDoc Source #

isVisibleForAllTyFlag :: ForAllTyFlag -> Bool Source #

Does this `ForAllTyFlag` classify an argument that is written in Haskell?

isInvisibleForAllTyFlag :: ForAllTyFlag -> Bool Source #

Does this `ForAllTyFlag` classify an argument that is not written in Haskell?

isInferredForAllTyFlag :: ForAllTyFlag -> Bool Source #

isSpecifiedForAllTyFlag :: ForAllTyFlag -> Bool Source #

coreTyLamForAllTyFlag :: ForAllTyFlag Source #

The ForAllTyFlag on a (Lam a e) term, where `a` is a type variable. If you want other ForAllTyFlag, use a cast. See Note [Required foralls in Core] in GHC.Core.TyCo.Rep