A display API for HaskellDO

Latest on Hackage:

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

Apache licensed by Kit Freddura
Maintained by


This library is meant to interface with the HaskellDO editor. The library provides a type Display and a type class Displayable which are menat to provide an API to rendering media in HaskellDO.


As an example, say I wanted to add the ability to load GIFs in HaskellDO. Firstly in the Types.hs file I would add:

  = DisplayText
  | DisplayJpg
  | DisplayPng
  | DisplayHtml
  | DisplayGif
  deriving Generic

This defines a valid GIF type for Display. Then in Displayable.hs I would define a Displayable instance for GIFs.

instance Displayable Gif where 
  display g = Display DisplayGif <path/to/gif>

All of this allows HaskellDO to render GIFs as JSON which can then be parsed by the front end and displayed down the line.

Depends on 3 packages:
Used by 1 package:
comments powered byDisqus