present-0.0.0: Make presentations for data types.

Safe HaskellNone

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)] 
Tuple !Text ![(Text, ID)] 
List !Text ![(Text, ID)] 
String !Text ![(Text, ID)] 

present :: Data a => ID -> a -> Maybe PresentationSource

Present the breadth-first level of a data type.

presentation :: Data a => ID -> a -> Maybe PresentationSource

Make a presentation for the given data structure.

asData :: Data a => a -> aSource

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