Skip to content

Instantly share code, notes, and snippets.

@rntz
Created January 3, 2017 23:12
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 rntz/54fa55a9f8fc03d281da589fc23f643f to your computer and use it in GitHub Desktop.
Save rntz/54fa55a9f8fc03d281da589fc23f643f to your computer and use it in GitHub Desktop.
{-# LANGUAGE DatatypeContexts #-}
module Tmp where
data Ord a => Set a = Empty
| Single a
| Union (Set a) (Set a)
instance Monad Set where
return x = Single x -- type errors b/c can't find Ord instance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment