yesod-media-simple: Simple display of media types, served by yesod

[ graphics, library, mit ] [ Propose Tags ]

[Skip to Readme]
Versions [faq],,,
Dependencies base (==4.*), bytestring, diagrams-cairo, diagrams-core, diagrams-lib (<1.3), directory, JuicyPixels, vector, yesod (>1.2) [details]
License MIT
Copyright 2014 Michael Sloan
Author Michael Sloan
Revised Revision 2 made by MichaelSloan at 2015-10-13T02:14:43Z
Category Graphics
Home page
Uploaded by MichaelSloan at 2015-07-18T04:48:53Z
Distributions NixOS:
Downloads 2986 total (5 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs not available [build log]
All reported builds failed as of 2016-12-01 [all 7 reports]


  • Yesod
    • Media
      • Yesod.Media.Simple


Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees

Readme for yesod-media-simple-

[back to package description]


This package provides simple utilities for starting a web server which serves some media. This makes serving media as easy as serve image. For example, here's how you serve a simple diagram:

import Diagrams.Prelude
import Yesod.Media.Simple

main = serveDiagram (circle 10 ||| square 20)

Media Types

Currently yesod-media-simple supports serving the following media types:

  • Diagrams, by using cairo to render to png. Just call serveDiagram :: Diagram Cairo R2 -> IO ()!

  • JuicyPixels images. Also includes utilities for putting JuicyPixels images in Diagrams and vice-versa.