pads-haskell-0.1.0.0: PADS data description language for Haskell.

Copyright(c) 2011
Kathleen Fisher <kathleen.fisher@gmail.com>
John Launchbury <john.launchbury@gmail.com>
LicenseMIT
MaintainerKarl Cronburg <karl@cs.tufts.edu>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Language.Pads.GenPretty

Description

 
Synopsis

Documentation

getTyNames :: Type -> Set Name Source #

Get all the names of types referenced within the given Type

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.

isTuple :: Type -> Bool Source #

Is the given type a TupleT?

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.

mkClause :: Con -> Q Match Source #

Make the clause for the data constructor of a data type based on whether or not it has any arguments.

mkRecord :: Con -> Q Clause Source #

Make the Haskell clause for a Pads record.

mkField :: (Name, b, c) -> Q ((Name, Pat), Exp) Source #

Make the field pretty printer case.