Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Generator = ModuleName -> LIdP GhcPs -> LHsQTyVars GhcPs -> [LConDecl GhcPs] -> [String] -> SrcSpan -> Hsc ([LImportDecl GhcPs], [LHsDecl GhcPs])
- applyAll :: Monad m => [a -> m a] -> a -> m a
- fieldNameOptions :: SrcSpan -> [OptDescr (String -> Hsc String)]
- makeInstanceDeclaration :: SrcSpan -> Type -> ModuleName -> OccName -> [LHsBind GhcPs] -> LHsDecl GhcPs
- makeLHsBind :: SrcSpan -> OccName -> [LPat GhcPs] -> LHsExpr GhcPs -> LHsBind GhcPs
- makeRandomModule :: ModuleName -> Hsc ModuleName
- makeRandomVariable :: SrcSpan -> String -> Hsc (LIdP GhcPs)
Documentation
type Generator = ModuleName -> LIdP GhcPs -> LHsQTyVars GhcPs -> [LConDecl GhcPs] -> [String] -> SrcSpan -> Hsc ([LImportDecl GhcPs], [LHsDecl GhcPs]) Source #
applyAll :: Monad m => [a -> m a] -> a -> m a Source #
Applies all the monadic functions in order beginning with some starting value.
makeInstanceDeclaration :: SrcSpan -> Type -> ModuleName -> OccName -> [LHsBind GhcPs] -> LHsDecl GhcPs Source #
makeRandomModule :: ModuleName -> Hsc ModuleName Source #
Makes a random module name. This will convert any periods to underscores and add a unique suffix.
>>>
makeRandomModule "Data.Aeson"
"Data_Aeson_1"