{-# LANGUAGE GeneralizedNewtypeDeriving #-}

-- | Expression identifiers.
--
-- See <https://github.com/WebAssembly/binaryen/blob/master/src/binaryen-c.h>
-- for API documentation.
--
-- This module is intended to be imported qualified.
module Binaryen.ExpressionId where

import Data.Word (Word32)
import Foreign (Storable)

newtype ExpressionId = ExpressionId Word32
  deriving (ExpressionId -> ExpressionId -> Bool
(ExpressionId -> ExpressionId -> Bool)
-> (ExpressionId -> ExpressionId -> Bool) -> Eq ExpressionId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExpressionId -> ExpressionId -> Bool
$c/= :: ExpressionId -> ExpressionId -> Bool
== :: ExpressionId -> ExpressionId -> Bool
$c== :: ExpressionId -> ExpressionId -> Bool
Eq, Int -> ExpressionId -> ShowS
[ExpressionId] -> ShowS
ExpressionId -> String
(Int -> ExpressionId -> ShowS)
-> (ExpressionId -> String)
-> ([ExpressionId] -> ShowS)
-> Show ExpressionId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExpressionId] -> ShowS
$cshowList :: [ExpressionId] -> ShowS
show :: ExpressionId -> String
$cshow :: ExpressionId -> String
showsPrec :: Int -> ExpressionId -> ShowS
$cshowsPrec :: Int -> ExpressionId -> ShowS
Show, Ptr b -> Int -> IO ExpressionId
Ptr b -> Int -> ExpressionId -> IO ()
Ptr ExpressionId -> IO ExpressionId
Ptr ExpressionId -> Int -> IO ExpressionId
Ptr ExpressionId -> Int -> ExpressionId -> IO ()
Ptr ExpressionId -> ExpressionId -> IO ()
ExpressionId -> Int
(ExpressionId -> Int)
-> (ExpressionId -> Int)
-> (Ptr ExpressionId -> Int -> IO ExpressionId)
-> (Ptr ExpressionId -> Int -> ExpressionId -> IO ())
-> (forall b. Ptr b -> Int -> IO ExpressionId)
-> (forall b. Ptr b -> Int -> ExpressionId -> IO ())
-> (Ptr ExpressionId -> IO ExpressionId)
-> (Ptr ExpressionId -> ExpressionId -> IO ())
-> Storable ExpressionId
forall b. Ptr b -> Int -> IO ExpressionId
forall b. Ptr b -> Int -> ExpressionId -> 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 ExpressionId -> ExpressionId -> IO ()
$cpoke :: Ptr ExpressionId -> ExpressionId -> IO ()
peek :: Ptr ExpressionId -> IO ExpressionId
$cpeek :: Ptr ExpressionId -> IO ExpressionId
pokeByteOff :: Ptr b -> Int -> ExpressionId -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> ExpressionId -> IO ()
peekByteOff :: Ptr b -> Int -> IO ExpressionId
$cpeekByteOff :: forall b. Ptr b -> Int -> IO ExpressionId
pokeElemOff :: Ptr ExpressionId -> Int -> ExpressionId -> IO ()
$cpokeElemOff :: Ptr ExpressionId -> Int -> ExpressionId -> IO ()
peekElemOff :: Ptr ExpressionId -> Int -> IO ExpressionId
$cpeekElemOff :: Ptr ExpressionId -> Int -> IO ExpressionId
alignment :: ExpressionId -> Int
$calignment :: ExpressionId -> Int
sizeOf :: ExpressionId -> Int
$csizeOf :: ExpressionId -> Int
Storable)

foreign import ccall unsafe "BinaryenInvalidId" invalidId :: ExpressionId

foreign import ccall unsafe "BinaryenBlockId" blockId :: ExpressionId

foreign import ccall unsafe "BinaryenIfId" ifId :: ExpressionId

foreign import ccall unsafe "BinaryenLoopId" loopId :: ExpressionId

foreign import ccall unsafe "BinaryenBreakId" breakId :: ExpressionId

foreign import ccall unsafe "BinaryenSwitchId" switchId :: ExpressionId

foreign import ccall unsafe "BinaryenCallId" callId :: ExpressionId

foreign import ccall unsafe "BinaryenCallIndirectId" callIndirectId :: ExpressionId

foreign import ccall unsafe "BinaryenLocalGetId" localGetId :: ExpressionId

foreign import ccall unsafe "BinaryenLocalSetId" localSetId :: ExpressionId

foreign import ccall unsafe "BinaryenGlobalGetId" globalGetId :: ExpressionId

foreign import ccall unsafe "BinaryenGlobalSetId" globalSetId :: ExpressionId

foreign import ccall unsafe "BinaryenLoadId" loadId :: ExpressionId

foreign import ccall unsafe "BinaryenStoreId" storeId :: ExpressionId

foreign import ccall unsafe "BinaryenConstId" constId :: ExpressionId

foreign import ccall unsafe "BinaryenUnaryId" unaryId :: ExpressionId

foreign import ccall unsafe "BinaryenBinaryId" binaryId :: ExpressionId

foreign import ccall unsafe "BinaryenSelectId" selectId :: ExpressionId

foreign import ccall unsafe "BinaryenDropId" dropId :: ExpressionId

foreign import ccall unsafe "BinaryenReturnId" returnId :: ExpressionId

foreign import ccall unsafe "BinaryenMemorySizeId" memorySizeId :: ExpressionId

foreign import ccall unsafe "BinaryenMemoryGrowId" memoryGrowId :: ExpressionId

foreign import ccall unsafe "BinaryenNopId" nopId :: ExpressionId

foreign import ccall unsafe "BinaryenUnreachableId" unreachableId :: ExpressionId

foreign import ccall unsafe "BinaryenAtomicCmpxchgId" atomicCmpxchgId :: ExpressionId

foreign import ccall unsafe "BinaryenAtomicRMWId" atomicRMWId :: ExpressionId

foreign import ccall unsafe "BinaryenAtomicWaitId" atomicWaitId :: ExpressionId

foreign import ccall unsafe "BinaryenAtomicNotifyId" atomicNotifyId :: ExpressionId

foreign import ccall unsafe "BinaryenAtomicFenceId" atomicFenceId :: ExpressionId

foreign import ccall unsafe "BinaryenSIMDExtractId" simdExtractId :: ExpressionId

foreign import ccall unsafe "BinaryenSIMDReplaceId" simdReplaceId :: ExpressionId

foreign import ccall unsafe "BinaryenSIMDShuffleId" simdShuffleId :: ExpressionId

foreign import ccall unsafe "BinaryenSIMDTernaryId" simdTernaryId :: ExpressionId

foreign import ccall unsafe "BinaryenSIMDShiftId" simdShiftId :: ExpressionId

foreign import ccall unsafe "BinaryenSIMDLoadId" simdLoadId :: ExpressionId

foreign import ccall unsafe "BinaryenMemoryInitId" memoryInitId :: ExpressionId

foreign import ccall unsafe "BinaryenDataDropId" dataDropId :: ExpressionId

foreign import ccall unsafe "BinaryenMemoryCopyId" memoryCopyId :: ExpressionId

foreign import ccall unsafe "BinaryenMemoryFillId" memoryFillId :: ExpressionId

foreign import ccall unsafe "BinaryenRefNullId" refNullId :: ExpressionId

foreign import ccall unsafe "BinaryenRefIsNullId" refIsNullId :: ExpressionId

foreign import ccall unsafe "BinaryenRefFuncId" refFuncId :: ExpressionId

foreign import ccall unsafe "BinaryenTryId" tryId :: ExpressionId

foreign import ccall unsafe "BinaryenThrowId" throwId :: ExpressionId

foreign import ccall unsafe "BinaryenRethrowId" rethrowId :: ExpressionId

foreign import ccall unsafe "BinaryenBrOnExnId" brOnExnId :: ExpressionId

foreign import ccall unsafe "BinaryenPopId" popId :: ExpressionId