-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Wrapper that makes any Enum type Storable
--
-- In foreign function interfaces you will often want to use enumeration
-- types but defining Storable instances is cumbersome. This
-- package provides the type Enum.Storable.T w e, where e.g.
-- Enum.Storable.T Word8 Ordering means that values of type
-- Ordering are stored in a Word8. The Storable
-- methods store the numeric values of the enumeration elements as
-- obtained by fromEnum. E.g. EQ is stored as 1.
-- The type itself stores a Haskell enumeration element, such that GHC
-- can apply all of its optimizations for enumerations. It is not
-- checked, whether the storage type w is large enough to hold
-- all admissible numeric values of e. It is also not checked,
-- whether the storage type w supports negative values whenever
-- the enumeration of e contains ones.
--
-- See the bool8 package for the special case of a Bool
-- stored in a Word8.
@package storable-enum
@version 0.0
module Data.Enum.Storable
data T w e
fromPlain :: a -> T w a
toPlain :: T w a -> a
instance GHC.Classes.Ord e => GHC.Classes.Ord (Data.Enum.Storable.T w e)
instance GHC.Classes.Eq e => GHC.Classes.Eq (Data.Enum.Storable.T w e)
instance GHC.Show.Show e => GHC.Show.Show (Data.Enum.Storable.T w e)
instance GHC.Enum.Bounded e => GHC.Enum.Bounded (Data.Enum.Storable.T w e)
instance GHC.Enum.Enum e => GHC.Enum.Enum (Data.Enum.Storable.T w e)
instance (Foreign.Storable.Storable w, GHC.Real.Integral w, GHC.Enum.Enum e) => Foreign.Storable.Storable (Data.Enum.Storable.T w e)