Îõ³h$ ÖNone c-enumWrite like the following. *enum Foo ''Int [''Show, ''Read, ''Eq] [ (FooError , - 1), (FooZero, 0), (FooOne, 1), (FooTwo, 2) ]  Then you get like the following. ónewtype Foo = Foo Int deriving Eq pattern FooError :: Int -> Foo pattern FooError <- Foo (- 1) where FooError = Foo (- 1) pattern FooZero :: Int -> Foo ... instance Show Foo where showsPrec = ... instance Read Foo where readPrec = ... -And you can read and show like the following. ô> Foo $ - 1 FooError > FooTwo FooTwo > Foo 3 Foo 3 > read "Foo (- 1)" :: Foo FooError > read "FooOne" :: Foo FooOne  Safe-InferredÉ      %c-enum-0.1.0.1-DQnfDMLd61n83Ez45aJScEForeign.C.Enum Paths_c_enumenum$fShowShowReadClassesversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName