Microformats are amazing
Published by W. Developer on
In which I extoll the virtues of using microformats.
Blah blah blah
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# LANGUAGE OverloadedStrings, UnicodeSyntax, CPP #-} module Main (main) where #if __GLASGOW_HASKELL__ < 709 import Control.Applicative #endif import Control.Exception import Data.Microformats2.Parser import Data.List import Data.Maybe (fromMaybe) import Data.Aeson.Encode.Pretty import Data.Aeson.Types (object) import Data.Default import qualified Data.Text.Lazy as TL import Data.Streaming.Network (bindPath) import qualified Data.Stringable as S import Network.Wai.Handler.Warp import qualified Network.Wai.Handler.CGI as CGI import Network.Wai.Middleware.Autohead import qualified Network.Socket as S import Network.URI (parseURI) import Web.Scotty import Text.Blaze.Html5 as H hiding (main, param, object) import Text.Blaze.Html5.Attributes as A import Text.Blaze.Html.Renderer.Utf8 (renderHtml) import qualified Options as O data AppOptions = AppOptions { port ∷ Int , socket ∷ String , protocol ∷ String } instance O.Options AppOptions where defineOptions = pure AppOptions <*> O.simpleOption "port" 3000 "The port the app should listen for connections on (for http protocol)" <*> O.simpleOption "socket" "/var/run/mf2/mf2.sock" "The UNIX domain socket the app should listen for connections on (for unix protocol)" <*> O.simpleOption "protocol" "http" "The protocol for the server. One of: http, unix, cgi" exampleValue = "
17 Austerstræti Reykjavík Iceland 107
Published by W. Developer on
In which I extoll the virtues of using microformats.
Blah blah blah