grisette-0.9.0.0: Symbolic evaluation as a library
Copyright(c) Sirui Lu 2024
LicenseBSD-3-Clause (see the LICENSE file)
Maintainersiruilu@cs.washington.edu
StabilityExperimental
PortabilityGHC only
Safe HaskellSafe-Inferred
LanguageHaskell2010

Grisette.Internal.TH.Util

Description

 
Synopsis

Documentation

occName :: Name -> String Source #

Get the unqualified name of a Name.

tvIsMode :: TyVarBndr_ flag -> Bool Source #

Check if a type variable is of kind EvalModeTag.

tvIsNat :: TyVarBndr_ flag -> Bool Source #

Check if a type variable is of kind Nat.

tvIsStar :: TyVarBndr_ flag -> Bool Source #

Check if a type variable is of kind Type.

tvIsStarToStar :: TyVarBndr_ flag -> Bool Source #

Check if a type variable is of kind 'Data.Kind.Type -> Data.Kind.Type'.

substDataType :: DatatypeInfo -> Map Name Type -> DatatypeInfo Source #

Substitute the type variables in a DatatypeInfo with the given substitution map.

reifyDatatypeWithFreshNames :: Name -> Q DatatypeInfo Source #

Reify a datatype with fresh type variable names.

singleParamClassParamKind :: Name -> Q Kind Source #

Get the kind of the single type parameter of a class.

binaryClassParamKind :: Name -> Q Kind Source #

Get the kind of the binary type parameter of a class.

getTypeWithMaybeSubst :: TyVarBndrUnit -> Maybe Type -> Q Type Source #

Get a type with a possible substitution.

dropLastTypeParam :: Type -> Q Type Source #

Drop the last instantiated type parameter of a type.

dropNTypeParam :: Int -> Type -> Q Type Source #

Drop the last N instantiated type parameters of a type.

classParamKinds :: Name -> Q [Kind] Source #

Get the kinds of the type parameters of a class.

allSameKind :: [TyVarBndrUnit] -> Bool Source #

Check if all type variables have the same kind.

classNumParam :: Name -> Q Int Source #

Get the number of type parameters of a class.

kindNumParam :: Kind -> Q Int Source #

Get the number of type parameters of a kind.

concatPreds :: Maybe [Pred] -> Maybe [Pred] -> Maybe [Pred] Source #

Concatenate two 'Maybe [Pred]'.

putHaddock :: Name -> String -> Q () Source #

Put a haddock comment on a declaration.