Skip to content

Instantly share code, notes, and snippets.

@lambda-fairy
Last active August 29, 2015 14:12
Show Gist options
  • Select an option

  • Save lambda-fairy/1a5af19a1c4debdb6b39 to your computer and use it in GitHub Desktop.

Select an option

Save lambda-fairy/1a5af19a1c4debdb6b39 to your computer and use it in GitHub Desktop.
Hircine API
-- Module is a Category and Profunctor and Monoid
data Module a b
~ (b -> IO ()) -> Codensity IO (a -> IO ())
-- Action is a Functor and Monad
data Action b r
~ ReaderT (b -> IO ()) IO r
~ (b -> IO ()) -> IO r
connect :: String -> Int -> Module Message [Command] -> IO a
module :: (a -> Action b ()) -> Module a b
blockingModule :: (a -> Action b ()) -> Module a b
liftIO :: IO r -> Action b r
send :: IsCommand c => c -> Action [Command] ()
sendList :: [Command] -> Action [Command] ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment