Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 #
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 #
SchemaLayout | |
|
Instances
Contravariant SchemaLayout Source # | |
Defined in Data.Schema.PrettyPrint contramap :: (a -> b) -> SchemaLayout b -> SchemaLayout a # (>$) :: b -> SchemaLayout b -> SchemaLayout a # | |
Divisible SchemaLayout Source # | |
Defined in Data.Schema.PrettyPrint divide :: (a -> (b, c)) -> SchemaLayout b -> SchemaLayout c -> SchemaLayout a # conquer :: SchemaLayout a # |
class ToSchemaLayout s where Source #
toSchemaLayout :: s ~> SchemaLayout Source #
Instances
ToSchemaLayout s => ToSchemaLayout (Schema s) Source # | |
Defined in Data.Schema.PrettyPrint | |
(ToSchemaLayout p, ToSchemaLayout q) => ToSchemaLayout (Sum p q) Source # | |
Defined in Data.Schema.PrettyPrint 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