| Copyright | (c) 2011 Kathleen Fisher <kathleen.fisher@gmail.com> John Launchbury <john.launchbury@gmail.com>  | 
|---|---|
| License | MIT | 
| Maintainer | Karl Cronburg <karl@cs.tufts.edu> | 
| Stability | experimental | 
| Safe Haskell | None | 
| Language | Haskell2010 | 
Language.Pads.GenPretty
Description
Synopsis
- getTyNames :: Type -> Set Name
 - getTyNamesFromCon :: Con -> Set Name
 - getNamedTys :: Name -> Q [Name]
 - getNamedTys' :: Set Name -> Set Name -> Q (Set Name)
 - baseTypeNames :: Set Name
 - mkPrettyInstance :: Name -> Q [Dec]
 - mkPrettyInstance' :: Set Name -> Set Name -> [Dec] -> Q [Dec]
 - isTuple :: Type -> Bool
 - isDataType :: [Con] -> Bool
 - isRecordType :: [Con] -> Bool
 - mkPatBody :: String -> (Exp -> Exp) -> Q (Pat, Body)
 - mkPatBodyNoArg :: String -> Q (Pat, Body)
 - mkClause :: Con -> Q Match
 - mkRecord :: Con -> Q Clause
 - mkField :: (Name, b, c) -> Q ((Name, Pat), Exp)
 
Documentation
getTyNamesFromCon :: Con -> Set Name Source #
Get all the types referenced within the given Haskell constructor.
getNamedTys :: Name -> Q [Name] Source #
Recursively reify types to get all the named types referenced by the given name
baseTypeNames :: Set Name Source #
All the base types supported by Pads
mkPrettyInstance :: Name -> Q [Dec] Source #
Recursively make the pretty printing instance for a given named type by also making instances for all nested types.
isDataType :: [Con] -> Bool Source #
Is the given constructor a normal Haskell constructor?
isRecordType :: [Con] -> Bool Source #
Is the given constructor a Haskell record constructor?
mkPatBody :: String -> (Exp -> Exp) -> Q (Pat, Body) Source #
Make the pattern body of a pretty printer expression for a named Pads type
mkPatBodyNoArg :: String -> Q (Pat, Body) Source #
Make the pattern body of a pretty printer expression for a Pads type / data constructor without arguments.