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

{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}

module Binaryen.Index where

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

newtype Index = Index Word32
  deriving newtype (Index -> Index -> Bool
(Index -> Index -> Bool) -> (Index -> Index -> Bool) -> Eq Index
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Index -> Index -> Bool
$c/= :: Index -> Index -> Bool
== :: Index -> Index -> Bool
$c== :: Index -> Index -> Bool
Eq, Integer -> Index
Index -> Index
Index -> Index -> Index
(Index -> Index -> Index)
-> (Index -> Index -> Index)
-> (Index -> Index -> Index)
-> (Index -> Index)
-> (Index -> Index)
-> (Index -> Index)
-> (Integer -> Index)
-> Num Index
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
fromInteger :: Integer -> Index
$cfromInteger :: Integer -> Index
signum :: Index -> Index
$csignum :: Index -> Index
abs :: Index -> Index
$cabs :: Index -> Index
negate :: Index -> Index
$cnegate :: Index -> Index
* :: Index -> Index -> Index
$c* :: Index -> Index -> Index
- :: Index -> Index -> Index
$c- :: Index -> Index -> Index
+ :: Index -> Index -> Index
$c+ :: Index -> Index -> Index
Num, Int -> Index -> ShowS
[Index] -> ShowS
Index -> String
(Int -> Index -> ShowS)
-> (Index -> String) -> ([Index] -> ShowS) -> Show Index
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Index] -> ShowS
$cshowList :: [Index] -> ShowS
show :: Index -> String
$cshow :: Index -> String
showsPrec :: Int -> Index -> ShowS
$cshowsPrec :: Int -> Index -> ShowS
Show, Ptr b -> Int -> IO Index
Ptr b -> Int -> Index -> IO ()
Ptr Index -> IO Index
Ptr Index -> Int -> IO Index
Ptr Index -> Int -> Index -> IO ()
Ptr Index -> Index -> IO ()
Index -> Int
(Index -> Int)
-> (Index -> Int)
-> (Ptr Index -> Int -> IO Index)
-> (Ptr Index -> Int -> Index -> IO ())
-> (forall b. Ptr b -> Int -> IO Index)
-> (forall b. Ptr b -> Int -> Index -> IO ())
-> (Ptr Index -> IO Index)
-> (Ptr Index -> Index -> IO ())
-> Storable Index
forall b. Ptr b -> Int -> IO Index
forall b. Ptr b -> Int -> Index -> 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 Index -> Index -> IO ()
$cpoke :: Ptr Index -> Index -> IO ()
peek :: Ptr Index -> IO Index
$cpeek :: Ptr Index -> IO Index
pokeByteOff :: Ptr b -> Int -> Index -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> Index -> IO ()
peekByteOff :: Ptr b -> Int -> IO Index
$cpeekByteOff :: forall b. Ptr b -> Int -> IO Index
pokeElemOff :: Ptr Index -> Int -> Index -> IO ()
$cpokeElemOff :: Ptr Index -> Int -> Index -> IO ()
peekElemOff :: Ptr Index -> Int -> IO Index
$cpeekElemOff :: Ptr Index -> Int -> IO Index
alignment :: Index -> Int
$calignment :: Index -> Int
sizeOf :: Index -> Int
$csizeOf :: Index -> Int
Storable)