hschema-prettyprinter-0.0.1.1: Describe schemas for your Haskell data types.

Safe HaskellNone
LanguageHaskell2010

Data.Schema.PrettyPrint

Synopsis

Documentation

newtype SchemaDoc a Source #

Constructors

SchemaDoc 

Fields

Instances
Functor SchemaDoc Source # 
Instance details

Defined in Data.Schema.PrettyPrint

Methods

fmap :: (a -> b) -> SchemaDoc a -> SchemaDoc b #

(<$) :: a -> SchemaDoc b -> SchemaDoc a #

Applicative SchemaDoc Source # 
Instance details

Defined in Data.Schema.PrettyPrint

Methods

pure :: a -> SchemaDoc a #

(<*>) :: SchemaDoc (a -> b) -> SchemaDoc a -> SchemaDoc b #

liftA2 :: (a -> b -> c) -> SchemaDoc a -> SchemaDoc b -> SchemaDoc c #

(*>) :: SchemaDoc a -> SchemaDoc b -> SchemaDoc b #

(<*) :: SchemaDoc a -> SchemaDoc b -> SchemaDoc a #

class ToSchemaDoc s where Source #

Instances
ToSchemaDoc s => ToSchemaDoc (Schema s) Source # 
Instance details

Defined in Data.Schema.PrettyPrint

(ToSchemaDoc p, ToSchemaDoc q) => ToSchemaDoc (Sum p q) Source # 
Instance details

Defined in Data.Schema.PrettyPrint

putSchema :: ToSchemaDoc s => s a -> IO () Source #

Renders the given schema to the standard out

newtype SchemaLayout a Source #

Constructors

SchemaLayout 

Fields

Instances
Contravariant SchemaLayout Source # 
Instance details

Defined in Data.Schema.PrettyPrint

Methods

contramap :: (a -> b) -> SchemaLayout b -> SchemaLayout a #

(>$) :: b -> SchemaLayout b -> SchemaLayout a #

Divisible SchemaLayout Source # 
Instance details

Defined in Data.Schema.PrettyPrint

Methods

divide :: (a -> (b, c)) -> SchemaLayout b -> SchemaLayout c -> SchemaLayout a #

conquer :: SchemaLayout a #

prettyPrinter :: ToSchemaLayout s => s a -> a -> IO () Source #

Generates a renderer of data types based on the given schema