Skip to content

Instantly share code, notes, and snippets.

@techtangents
Created January 12, 2013 04:01
Show Gist options
  • Save techtangents/4515983 to your computer and use it in GitHub Desktop.
Save techtangents/4515983 to your computer and use it in GitHub Desktop.
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
import Data.Distributive
class (Functor a, Functor b) => Bidistributive a b where
dist :: a (b c) -> b (a c)
tsid :: b (a c) -> a (b c)
instance (Distributive x, Distributive y) => Bidistributive x y where
dist = distribute
tsid = distribute
@techtangents
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment