Skip to content

Instantly share code, notes, and snippets.

@jacobstanley
Created April 1, 2016 01:24
Show Gist options
  • Save jacobstanley/4921e31660a4f8cd8d6ef5fba9186de7 to your computer and use it in GitHub Desktop.
Save jacobstanley/4921e31660a4f8cd8d6ef5fba9186de7 to your computer and use it in GitHub Desktop.
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE InjectiveTypeFamilies #-}
class Bonkers b where
type Bonkers1 b = b1 | b1 -> b
type Bonkers2 b = b2 | b2 -> b
bonkersFrom :: Bonkers1 b -> Bonkers2 b
bonkers :: Bonkers b => Bonkers1 b -> Bonkers2 b
bonkers = bonkersFrom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment