display-haskell-do: A display API for HaskellDO

[ deprecated, ide, library ] [ Propose Tags ]

A library which defines Display types for use in HaskellDO to render media

[Skip to Readme]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS]
Dependencies aeson, base (>=4.7 && <5), text [details]
License LicenseRef-Apache
Copyright 2017 Kit Freddura
Author Kit Freddura
Maintainer kit@theam.io
Category IDE
Home page https://github.com/KitFreddura/HaskellDO-Display
Source repo head: git clone https://github.com/KitFreddura/display-haskell-do
Uploaded by kitfreddura at 2017-02-21T19:45:00Z
Distributions NixOS:
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1079 total (7 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-02-21 [all 1 reports]

Readme for display-haskell-do-

[back to package description]


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.