present-4.1.0: Make presentations for data types.

Safe HaskellNone
LanguageHaskell98

Present

Contents

Description

Generate presentations for types.

Synopsis

Presenting functions

presentIt :: Q Exp Source #

Present whatever in scope is called it

presentName :: Name -> Q Exp Source #

Make a presenter for the name

presentType :: Q Type -> Q Exp Source #

Present the value with the given type.

Presentation mediums

toShow :: Bool -> Value -> String Source #

To a familiar Show-like string.

toWHNF Source #

Arguments

:: [Integer]

Cursor.

-> Value

Value to cursor into.

-> WHNF

A WHNF presentation of the value at cursor.

Produce a presentation of the value to WHNF.

whnfJson :: WHNF -> String Source #

Make JSON from WNHF.

Debugging convenience functions

Types

Customization classes

class Present0 a where Source #

Minimal complete definition

present0

Methods

present0 :: (String, a -> Value) Source #

class Present1 a where Source #

Minimal complete definition

present1

Methods

present1 :: (String, x -> Value) -> (String, a x -> Value) Source #

class Present2 a where Source #

Minimal complete definition

present2

Methods

present2 :: (String, x -> Value) -> (String, y -> Value) -> (String, a x y -> Value) Source #

class Present3 a where Source #

Minimal complete definition

present3

Methods

present3 :: (String, x -> Value) -> (String, y -> Value) -> (String, z -> Value) -> (String, a x y z -> Value) Source #

class Present4 a where Source #

Minimal complete definition

present4

Methods

present4 :: (String, x -> Value) -> (String, y -> Value) -> (String, z -> Value) -> (String, z0 -> Value) -> (String, a x y z z0 -> Value) Source #

class Present5 a where Source #

Minimal complete definition

present5

Methods

present5 :: (String, x -> Value) -> (String, y -> Value) -> (String, z -> Value) -> (String, z0 -> Value) -> (String, z1 -> Value) -> (String, a x y z z0 z1 -> Value) Source #

class Present6 a where Source #

Minimal complete definition

present6

Methods

present6 :: (String, x -> Value) -> (String, y -> Value) -> (String, z -> Value) -> (String, z0 -> Value) -> (String, z1 -> Value) -> (String, z2 -> Value) -> (String, a x y z z0 z1 z2 -> Value) Source #