-- GENERATED by C->Haskell Compiler, version 0.17.2 Crystal Seed, 24 Jan 2009 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "lib/CPython/Protocols/Object/Enums.chs" #-}
-- Copyright (C) 2009 John Millikin <jmillikin@gmail.com>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.

module CPython.Protocols.Object.Enums where



data HSCPythonComparisonEnum = HSCPYTHON_LT
                             | HSCPYTHON_LE
                             | HSCPYTHON_EQ
                             | HSCPYTHON_NE
                             | HSCPYTHON_GT
                             | HSCPYTHON_GE
                             
instance Enum HSCPythonComparisonEnum where
  fromEnum HSCPYTHON_LT = 0
  fromEnum HSCPYTHON_LE = 1
  fromEnum HSCPYTHON_EQ = 2
  fromEnum HSCPYTHON_NE = 3
  fromEnum HSCPYTHON_GT = 4
  fromEnum HSCPYTHON_GE = 5

  toEnum 0 = HSCPYTHON_LT
  toEnum 1 = HSCPYTHON_LE
  toEnum 2 = HSCPYTHON_EQ
  toEnum 3 = HSCPYTHON_NE
  toEnum 4 = HSCPYTHON_GT
  toEnum 5 = HSCPYTHON_GE
  toEnum unmatched = error ("HSCPythonComparisonEnum.toEnum: Cannot match " ++ show unmatched)

{-# LINE 20 "lib/CPython/Protocols/Object/Enums.chs" #-}