Skip to content

Instantly share code, notes, and snippets.

@michaelficarra
Forked from paf31/Main.hs
Created May 24, 2015 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelficarra/4f1e134ca1d0f4b4bfdf to your computer and use it in GitHub Desktop.
Save michaelficarra/4f1e134ca1d0f4b4bfdf to your computer and use it in GitHub Desktop.
{-# LANGUAGE PolyKinds, KindSignatures, MultiParamTypeClasses #-}
module Main where
class Category (arr :: k -> k -> *) where
id :: arr t t
(.) :: arr b c -> arr a b -> arr a c
instance Category (->) where
id x = x
(f . g) x = f (g x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment