2015-10-21
- jennifer
- martym
| -/*/dist | |
| -/lib | |
| -/*/.cabal-sandbox | |
| -/dist | |
| -/.cabal-sandbox |
| ``` | |
| /------ A -| | |
| [submit batch] -------- B -|--[success-of-all-in-batch]-- D (which submits new batch to hydra to run next step) | |
| \------ C -| | |
| ``` |
| # In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
| # variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
| # in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
| # gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
| # Add the following to your shell init to set up gpg-agent automatically for every shell | |
| if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
| source ~/.gnupg/.gpg-agent-info | |
| export GPG_AGENT_INFO | |
| else |
| {-# LANGUAGE NoImplicitPrelude #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| {-# LANGUAGE QuasiQuotes #-} | |
| module Boris.Http.TH ( | |
| embed | |
| ) where | |
| import qualified Data.Text as T |
My response to https://docs.google.com/forms/d/1Rffj60hZXcg6zfu1dSGttHLTTsEcqXj8D66qIn9Grno/viewform?c=0&w=1
Mark Hibberd, Ambiata
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE Rank2Types #-} | |
| {- | |
| Lets start ^^ by enabling some language extensions. GADTs to encode our data types and | |
| Rank2Types for the existental we will need to hide our types when we don't care about | |
| the invariant. | |
| -} | |
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE Rank2Types #-} | |
| {- | |
| Lets start ^^ by enabling some language extensions. GADTs to encode our data types and | |
| Rank2Types for the existental we will need to hide our types when we don't care about | |
| the invariant. | |
| -} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| -- FIX de-dupe with apiengine-server | |
| module Apiengine.Trace.Duration ( | |
| Duration | |
| , durationToMicro | |
| , microToDuration | |
| , durationToDiffTime | |
| , diffTimeToDuration | |
| ) where |
| def findMapM[F[_]: Monad, A, B](l: List[A])(f: A => F[Option[B]]): F[Option[B]] = l match { | |
| case x :: xs => | |
| f(x).flatMap({ | |
| case Some(b) => | |
| b.some.pure[F] | |
| case None => | |
| findMapM(xs)(f) | |
| }) | |
| case Nil => | |
| none.pure[F] |