Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- _' :: PatQ
- apply :: (Apply a, ToCon i a) => i -> [a] -> a
- applyCons :: (ToName con, ToName cons) => con -> [cons] -> Q Type
- applyVars :: (ToName con, ToName var, Apply res, ToCon con res, ToVar var res) => con -> [var] -> res
- decArgs :: Dec -> [TyVarBndr]
- declareTypeRef :: TypeRef -> Type
- destructRecord :: TypeName -> [FieldDefinition cat s] -> PatQ
- funDProxy :: [(Name, ExpQ)] -> [DecQ]
- funDSimple :: Name -> [PatQ] -> ExpQ -> DecQ
- infoTyVars :: Info -> [TyVarBndr]
- isEnum :: [ConsD cat s] -> Bool
- m' :: Type
- m_ :: TypeName
- mkFieldsE :: Name -> [FieldDefinition cat s] -> Exp
- nameSpaceField :: TypeName -> FieldName -> FieldName
- nameSpaceType :: [FieldName] -> TypeName -> TypeName
- toCon :: ToCon a b => a -> b
- toConE :: ToCon a Exp => a -> ExpQ
- toConT :: ToName a => a -> Q Type
- class ToName a where
- toString :: ToString a b => a -> b
- toVarE :: ToVar a Exp => a -> ExpQ
- toVarT :: ToVar a TypeQ => a -> TypeQ
- tyConArgs :: TypeKind -> [TypeName]
- typeInstanceDec :: Name -> Type -> Type -> Dec
- v' :: ToVar Name a => a
- cat' :: Type
- _2' :: PatQ
- o' :: Type
- e' :: Type
- vars :: ToVar a b => [a] -> [b]
- decodeObjectE :: (Bool -> Name) -> TypeName -> [FieldDefinition cat s] -> ExpQ
- matchWith :: Bool -> (t -> (PatQ, ExpQ)) -> [t] -> ExpQ
Documentation
applyVars :: (ToName con, ToName var, Apply res, ToCon con res, ToVar var res) => con -> [var] -> res Source #
declareTypeRef :: TypeRef -> Type Source #
destructRecord :: TypeName -> [FieldDefinition cat s] -> PatQ Source #
input: >>> destructRecord User ["name","id"] >>>
expression: >>> (User name id) >>>
infoTyVars :: Info -> [TyVarBndr] Source #
mkFieldsE :: Name -> [FieldDefinition cat s] -> Exp Source #
input : >>> mkFieldsE 'mkValue [FieldDefinition { fieldName = "field1" ,..} ,..] >>>
expression : >>> [ mkValue "field1" field1, .. ] >>>
decodeObjectE :: (Bool -> Name) -> TypeName -> [FieldDefinition cat s] -> ExpQ Source #