Created
August 17, 2016 15:39
-
-
Save afcondon/3084630a15d711dcab79da7bddea3b65 to your computer and use it in GitHub Desktop.
Ord-ering sum types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Prelude | |
import Control.Monad.Eff.Console | |
newtype A = A Int | |
data Foo = Foo | Bar | Baz | |
derive instance eqFoo :: Eq Foo | |
derive instance ordFoo :: Ord Foo | |
derive instance eqA :: Eq A | |
derive instance ordA :: Ord A | |
main = do | |
logShow $ A 1 > A 2 | |
logShow $ max Foo Bar == Foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment