Popularity
2.4
Stable
Activity
0.0
Stable
3
3
0
Monthly Downloads: 5
Programming language: Haskell
License: LicenseRef-GPL
hack-contrib-press alternatives and similar packages
Based on the "Text" category.
Alternatively, view hack-contrib-press alternatives based on common mentions on social networks and blogs.
-
skylighting
A Haskell syntax highlighting library with tokenizers derived from KDE syntax highlighting descriptions -
double-conversion
A fast Haskell library for converting between double precision floating point numbers and text strings. It is implemented as a binding to the V8-derived C++ double-conversion library.
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
Promo
www.saashub.com
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of hack-contrib-press or a related project?
README
Hack.Contrib.Press
Quickstart
Small.hs
{-# LANGUAGE DeriveDataTypeable #-}
{-# OPTIONS -fglasgow-exts #-}
module Main where
import Hack
import Hack.Contrib.Press (renderToResponse)
import Hack.Handler.Happstack (run)
import Text.JSON.Generic
data Profile = Profile {
name :: String,
favoriteMusic :: [String]
} deriving (Data, Typeable)
main = run $ \env -> do renderToResponse env "small.html" context
where aProfile = Profile "Brandon Bickford" ["Rock"]
context = [toJSON aProfile]
small.html
<html>
<body>
<p>
Hey <b>{{ name }}</b>, I heard you like:
<ul>
{% for music in favoriteMusic %}
<li>{{ music }}</li>
{% endfor %}
</ul>
</p>
</body>
</html>
Run
- Run: cabal install hack-contrib-press
- Add "Small.hs" and "small.html"
- Run: ghc --make -o small Small.hs
- Run: ./small
- In your browser visit: http://localhost:3000