-- ConversionMode.hs ---

-- Copyright (C) 2020 Nerd Ed

-- Author: Nerd Ed <nerded.nerded@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 (at your option) 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/>.

{-# LANGUAGE DerivingVia #-}

module Zydis.ConversionMode
  ( ConversionMode(..)
  )
where

import           Zydis.Util

data ConversionMode
  = ConversionModeInvalid
  | ConversionModeFloat16
  | ConversionModeSint8
  | ConversionModeUint8
  | ConversionModeSint16
  | ConversionModeUint16
  deriving stock (Int -> ConversionMode -> ShowS
[ConversionMode] -> ShowS
ConversionMode -> String
(Int -> ConversionMode -> ShowS)
-> (ConversionMode -> String)
-> ([ConversionMode] -> ShowS)
-> Show ConversionMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConversionMode] -> ShowS
$cshowList :: [ConversionMode] -> ShowS
show :: ConversionMode -> String
$cshow :: ConversionMode -> String
showsPrec :: Int -> ConversionMode -> ShowS
$cshowsPrec :: Int -> ConversionMode -> ShowS
Show, ConversionMode -> ConversionMode -> Bool
(ConversionMode -> ConversionMode -> Bool)
-> (ConversionMode -> ConversionMode -> Bool) -> Eq ConversionMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConversionMode -> ConversionMode -> Bool
$c/= :: ConversionMode -> ConversionMode -> Bool
== :: ConversionMode -> ConversionMode -> Bool
$c== :: ConversionMode -> ConversionMode -> Bool
Eq, ConversionMode
ConversionMode -> ConversionMode -> Bounded ConversionMode
forall a. a -> a -> Bounded a
maxBound :: ConversionMode
$cmaxBound :: ConversionMode
minBound :: ConversionMode
$cminBound :: ConversionMode
Bounded, Int -> ConversionMode
ConversionMode -> Int
ConversionMode -> [ConversionMode]
ConversionMode -> ConversionMode
ConversionMode -> ConversionMode -> [ConversionMode]
ConversionMode
-> ConversionMode -> ConversionMode -> [ConversionMode]
(ConversionMode -> ConversionMode)
-> (ConversionMode -> ConversionMode)
-> (Int -> ConversionMode)
-> (ConversionMode -> Int)
-> (ConversionMode -> [ConversionMode])
-> (ConversionMode -> ConversionMode -> [ConversionMode])
-> (ConversionMode -> ConversionMode -> [ConversionMode])
-> (ConversionMode
    -> ConversionMode -> ConversionMode -> [ConversionMode])
-> Enum ConversionMode
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: ConversionMode
-> ConversionMode -> ConversionMode -> [ConversionMode]
$cenumFromThenTo :: ConversionMode
-> ConversionMode -> ConversionMode -> [ConversionMode]
enumFromTo :: ConversionMode -> ConversionMode -> [ConversionMode]
$cenumFromTo :: ConversionMode -> ConversionMode -> [ConversionMode]
enumFromThen :: ConversionMode -> ConversionMode -> [ConversionMode]
$cenumFromThen :: ConversionMode -> ConversionMode -> [ConversionMode]
enumFrom :: ConversionMode -> [ConversionMode]
$cenumFrom :: ConversionMode -> [ConversionMode]
fromEnum :: ConversionMode -> Int
$cfromEnum :: ConversionMode -> Int
toEnum :: Int -> ConversionMode
$ctoEnum :: Int -> ConversionMode
pred :: ConversionMode -> ConversionMode
$cpred :: ConversionMode -> ConversionMode
succ :: ConversionMode -> ConversionMode
$csucc :: ConversionMode -> ConversionMode
Enum)
  deriving Ptr b -> Int -> IO ConversionMode
Ptr b -> Int -> ConversionMode -> IO ()
Ptr ConversionMode -> IO ConversionMode
Ptr ConversionMode -> Int -> IO ConversionMode
Ptr ConversionMode -> Int -> ConversionMode -> IO ()
Ptr ConversionMode -> ConversionMode -> IO ()
ConversionMode -> Int
(ConversionMode -> Int)
-> (ConversionMode -> Int)
-> (Ptr ConversionMode -> Int -> IO ConversionMode)
-> (Ptr ConversionMode -> Int -> ConversionMode -> IO ())
-> (forall b. Ptr b -> Int -> IO ConversionMode)
-> (forall b. Ptr b -> Int -> ConversionMode -> IO ())
-> (Ptr ConversionMode -> IO ConversionMode)
-> (Ptr ConversionMode -> ConversionMode -> IO ())
-> Storable ConversionMode
forall b. Ptr b -> Int -> IO ConversionMode
forall b. Ptr b -> Int -> ConversionMode -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr ConversionMode -> ConversionMode -> IO ()
$cpoke :: Ptr ConversionMode -> ConversionMode -> IO ()
peek :: Ptr ConversionMode -> IO ConversionMode
$cpeek :: Ptr ConversionMode -> IO ConversionMode
pokeByteOff :: Ptr b -> Int -> ConversionMode -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ConversionMode -> IO ()
peekByteOff :: Ptr b -> Int -> IO ConversionMode
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ConversionMode
pokeElemOff :: Ptr ConversionMode -> Int -> ConversionMode -> IO ()
$cpokeElemOff :: Ptr ConversionMode -> Int -> ConversionMode -> IO ()
peekElemOff :: Ptr ConversionMode -> Int -> IO ConversionMode
$cpeekElemOff :: Ptr ConversionMode -> Int -> IO ConversionMode
alignment :: ConversionMode -> Int
$calignment :: ConversionMode -> Int
sizeOf :: ConversionMode -> Int
$csizeOf :: ConversionMode -> Int
Storable via StorableExt ConversionMode