Skip to content

Instantly share code, notes, and snippets.

View chrisdotcode's full-sized avatar

Chris Blake chrisdotcode

View GitHub Profile

Keybase proof

I hereby claim:

  • I am chrisdotcode on github.
  • I am chrisdotcode (https://keybase.io/chrisdotcode) on keybase.
  • I have a public key ASA23Ytnm1fXlVU24qtxREmggH1jq158h9AvlF6QlLqdigo

To claim this, I am signing this object:

@chrisdotcode
chrisdotcode / Promise.hs
Created February 16, 2015 00:07
Abstract Promises in Haskell
module Promise where
import Control.Applicative (Applicative(..))
import Data.Monoid (Monoid(..))
newtype Error = Error { unString :: String } deriving (Eq, Ord, Read, Show)
data Promise a = Failed Error | Deferred | Fulfilled a
deriving (Eq, Ord, Read, Show)