homepage: https://github.com/YoshikuniJujo/c-enum#readme
changelog-type: markdown
hash: ea103bfc50db69d9402ed9574c41d1746d2164228e917c2bb3f3f92bffedb9e9
test-bench-deps:
  base: '>=4.7 && <5'
  c-enum: -any
  template-haskell: -any
maintainer: yoshikuni.jujo.pc@gmail.com
synopsis: ''
changelog: |
  # Changelog for c-enum

  ## Unreleased changes
basic-deps:
  base: '>=4.7 && <5'
  template-haskell: -any
all-versions:
- 0.1.0.0
author: Yoshikuni Jujo
latest: 0.1.0.0
description-type: markdown
description: "# c-enum\n\nfoo.h\n\n```c\n#ifndef _FOO_H\n#define _FOO_H\n\ntypedef
  enum { FOO_ERROR = - 1, FOO_ZERO, FOO_ONE, FOO_TWO, FOO_THREE } Foo;\n\n#endif\n```\n\nFoo.hsc\n\n```haskell\n{-#
  LANGUAGE TemplateHaskell #-}\n{-# LANGUAGE PatternSynonyms #-}\n{-# OPTIONS_GHC
  -Wall -fno-warn-tabs #-}\n\nmodule Foo where\n\nimport Foreign.C.Enum\n\n#include
  \"foo.h\"\n\nenum \"Foo\" ''#{type Foo} [''Show, ''Read, ''Eq] [\n\t(\"FooError\",
  #{const FOO_ERROR}),\n\t(\"FooZero\", #{const FOO_ZERO}),\n\t(\"FooOne\", #{const
  FOO_ONE}),\n\t(\"FooTwo\", #{const FOO_TWO}),\n\t(\"FooThree\", #{const FOO_THREE})
  ]\n```\n\nYou get patterns FooError, ..., FooThree.\nAnd `instance Show Foo` and
  `instance Read Foo` like the following.\n\n```\n> FooOne\nFooOne\n> Foo 1\nFooOne\n>
  Foo 5\nFoo 5\n> read \"FooTwo\" :: Foo\nFooTwo\n> read \"Foo 3\" :: Foo\nFooThree\n```\n"
license-name: BSD-3-Clause

Update from Hackage at 2021-05-07T08:53:21Z
Update from Hackage at 2021-05-07T08:53:21Z
