present-2.0: Make presentations for data types.

Safe HaskellNone
LanguageHaskell98

Present

Description

Make presentations for data types.

Synopsis

Documentation

data Presentation Source

A presentation of a level of a data type.

Constructors

Integer !Text !Text 
Floating !Text !Text 
Char !Text !Text 
Alg !Text !Text ![(Text, ID)] 
Record !Text !Text ![(Text, (Text, ID))] 
Tuple !Text ![(Text, ID)] 
List !Text ![(Text, ID)] 
String !Text ![(Text, ID)] 

present :: Data a => ID -> a -> Maybe Presentation Source

Present the breadth-first level of a data type.

asData :: Data a => a -> a Source

A helpful function for editors to force that a value is an instance of Data, before we actually start using it.