Hoogle Search

Within LTS Haskell 24.51 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. splitForAllCo_maybe :: Coercion -> Maybe (TyCoVar, ForAllTyFlag, ForAllTyFlag, Coercion, Coercion)

    ghc-lib-parser GHC.Core.Coercion

    No documentation available.

  2. splitForAllCo_ty_maybe :: Coercion -> Maybe (TyVar, ForAllTyFlag, ForAllTyFlag, Coercion, Coercion)

    ghc-lib-parser GHC.Core.Coercion

    Like splitForAllCo_maybe, but only returns Just for tyvar binder

  3. splitFunCo_maybe :: Coercion -> Maybe (Coercion, Coercion)

    ghc-lib-parser GHC.Core.Coercion

    No documentation available.

  4. topNormaliseNewType_maybe :: Type -> Maybe (Coercion, Type)

    ghc-lib-parser GHC.Core.Coercion

    Sometimes we want to look through a newtype and get its associated coercion. This function strips off newtype layers enough to reveal something that isn't a newtype. Specifically, here's the invariant:

    topNormaliseNewType_maybe rec_nts ty = Just (co, ty')
    
    then (a) co : ty ~R ty'. (b) ty' is not a newtype. The function returns Nothing for non-newtypes, or unsaturated applications This function does *not* look through type families, because it has no access to the type family environment. If you do have that at hand, consider to use topNormaliseType_maybe, which should be a drop-in replacement for topNormaliseNewType_maybe If topNormliseNewType_maybe ty = Just (co, ty'), then co : ty ~R ty'

  5. coAxiomRuleBranch_maybe :: CoAxiomRule -> Maybe (TyCon, Role, CoAxBranch)

    ghc-lib-parser GHC.Core.Coercion.Axiom

    No documentation available.

  6. coAxiomSingleBranch_maybe :: forall (br :: BranchFlag) . CoAxiom br -> Maybe CoAxBranch

    ghc-lib-parser GHC.Core.Coercion.Axiom

    No documentation available.

  7. isNewtypeAxiomRule_maybe :: CoAxiomRule -> Maybe (TyCon, CoAxBranch)

    ghc-lib-parser GHC.Core.Coercion.Axiom

    No documentation available.

  8. dataConFieldType_maybe :: DataCon -> FieldLabelString -> Maybe (FieldLabel, Type)

    ghc-lib-parser GHC.Core.DataCon

    Extract the label and type for any given labelled field of the DataCon, or return Nothing if the field does not belong to it

  9. dataConWrapId_maybe :: DataCon -> Maybe Id

    ghc-lib-parser GHC.Core.DataCon

    Get the Id of the DataCon wrapper: a function that wraps the "actual" constructor so it has the type visible in the source program: c.f. dataConWorkId. Returns Nothing if there is no wrapper, which occurs for an algebraic data constructor and also for a newtype (whose constructor is inlined compulsorily)

  10. splitDataProductType_maybe :: Type -> Maybe (TyCon, [Type], DataCon, [Scaled Type])

    ghc-lib-parser GHC.Core.DataCon

    Extract the type constructor, type argument, data constructor and it's representation argument types from a type if it is a product type. Precisely, we return Just for any data type that is all of:

    • Concrete (i.e. constructors visible)
    • Single-constructor
    • ... which has no existentials
    Whether the type is a data type or a newtype.

Page 195 of many | Previous | Next