Skip to content

Instantly share code, notes, and snippets.

@khibino
Created November 9, 2012 02:14
Show Gist options
  • Save khibino/4043289 to your computer and use it in GitHub Desktop.
Save khibino/4043289 to your computer and use it in GitHub Desktop.
{-# LANGUAGE FlexibleInstances #-}
import Prelude hiding (id, (.))
import Control.Category (Category(..))
import Data.Monoid (Monoid(..))
instance Category cat => Monoid (cat a a) where
mempty = id
mappend = (.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment