display-haskell-do-0.1.0.0: A display API for HaskellDO

Safe HaskellNone
LanguageHaskell2010

Types

Synopsis

Documentation

class Displayable a where Source #

Displayable takes a type and wraps it in a Display Display will be used in HaskellDO to handle media rendering

Minimal complete definition

display

Methods

display :: a -> Display Source #

data DisplayType Source #

DisplayType contains the allowed media to render Any extensions to this library (i.e custom Display instances) should add a type here E.g adding a display for latex would add the type DisplayLatex here

Instances

Generic DisplayType Source # 

Associated Types

type Rep DisplayType :: * -> * #

ToJSON DisplayType Source # 
FromJSON DisplayType Source # 
type Rep DisplayType Source # 
type Rep DisplayType = D1 (MetaData "DisplayType" "Types" "display-haskell-do-0.1.0.0-9jwuCTZ8AmCvReu4pSa9F" False) ((:+:) ((:+:) (C1 (MetaCons "DisplayText" PrefixI False) U1) (C1 (MetaCons "DisplayJpg" PrefixI False) U1)) ((:+:) (C1 (MetaCons "DisplayPng" PrefixI False) U1) (C1 (MetaCons "DisplayHtml" PrefixI False) U1)))

data Display Source #

The Display data type carries the type of data to render and the content to render DisplayText is the default for things interpreted in GHCi

Constructors

Display 

Instances

Show Display Source #

Allows arbitrart Display types to be printed in the console JSON was chosen for an easy format for the front-end of HaskellDO to parse

Generic Display Source # 

Associated Types

type Rep Display :: * -> * #

Methods

from :: Display -> Rep Display x #

to :: Rep Display x -> Display #

ToJSON Display Source # 
FromJSON Display Source # 
type Rep Display Source # 
type Rep Display = D1 (MetaData "Display" "Types" "display-haskell-do-0.1.0.0-9jwuCTZ8AmCvReu4pSa9F" False) (C1 (MetaCons "Display" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "displayType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 DisplayType)) (S1 (MetaSel (Just Symbol "content") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))))