Skip to content

Instantly share code, notes, and snippets.

@Tyralion
Created March 18, 2016 05:07
Show Gist options
  • Select an option

  • Save Tyralion/95d1ce33380993bfd653 to your computer and use it in GitHub Desktop.

Select an option

Save Tyralion/95d1ce33380993bfd653 to your computer and use it in GitHub Desktop.
module Odd where
data Odd = Odd Integer
deriving (Eq, Show)
instance Enum Odd where
toEnum :: Int a -> Odd a
toEnum x = Odd x
fromEnum :: a -> Int
fromEnum Odd x = x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment