| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Schema.PrettyPrint
Synopsis
- newtype SchemaDoc a = SchemaDoc {
- getDoc :: AnsiDoc
- class ToSchemaDoc s where
- toSchemaDoc :: s ~> SchemaDoc
- putSchema :: ToSchemaDoc s => s a -> IO ()
- newtype SchemaLayout a = SchemaLayout {
- runSchemaLayout :: a -> AnsiDoc
- class ToSchemaLayout s where
- toSchemaLayout :: s ~> SchemaLayout
- prettyPrinter :: ToSchemaLayout s => s a -> a -> IO ()
Documentation
class ToSchemaDoc s where Source #
Methods
toSchemaDoc :: s ~> SchemaDoc Source #
Instances
| ToSchemaDoc s => ToSchemaDoc (Schema s) Source # | |
Defined in Data.Schema.PrettyPrint | |
| (ToSchemaDoc p, ToSchemaDoc q) => ToSchemaDoc (Sum p q) Source # | |
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 # | |
Defined in Data.Schema.PrettyPrint Methods contramap :: (a -> b) -> SchemaLayout b -> SchemaLayout a # (>$) :: b -> SchemaLayout b -> SchemaLayout a # | |
| Divisible SchemaLayout Source # | |
Defined in Data.Schema.PrettyPrint Methods divide :: (a -> (b, c)) -> SchemaLayout b -> SchemaLayout c -> SchemaLayout a # conquer :: SchemaLayout a # | |
class ToSchemaLayout s where Source #
Methods
toSchemaLayout :: s ~> SchemaLayout Source #
Instances
| ToSchemaLayout s => ToSchemaLayout (Schema s) Source # | |
Defined in Data.Schema.PrettyPrint Methods | |
| (ToSchemaLayout p, ToSchemaLayout q) => ToSchemaLayout (Sum p q) Source # | |
Defined in Data.Schema.PrettyPrint Methods toSchemaLayout :: Sum p q ~> SchemaLayout Source # | |
prettyPrinter :: ToSchemaLayout s => s a -> a -> IO () Source #
Generates a renderer of data types based on the given schema