Skip to content

Instantly share code, notes, and snippets.

@intolerable
intolerable / DotGo.hs
Last active August 29, 2015 14:08
a quick port of john graham-cumming's dotgo talk code in haskell
module DotGo where
import Control.Concurrent.Async
import Control.Monad
import Pipes
import Pipes.Concurrent
import qualified Pipes.Prelude as Pipes
main :: IO ()
main = do
#!/usr/bin/env runhaskell
{-# LANGUAGE OverloadedStrings #-}
module HeroDiscussion where
import Control.Applicative
import Control.Arrow
import Control.Monad.IO.Class
import Data.Attoparsec.Text as Parser
@intolerable
intolerable / named-routes-th.hs
Last active June 10, 2025 11:48
HasServer instances for records of routes using TemplateHaskell instead of Generic
data NamedRoutesTH api
class ToServantApiTH routes where
type ServantApiTH routes :: Type
toServantTH :: routes (AsServerT m) -> ServerT (ServantApiTH routes) m
fromServantTH :: ServerT (ServantApiTH routes) m -> routes (AsServerT m)
instance
( ToServantApiTH api