-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Primeval world of Haskell. -- -- Please see the README on GitHub at -- https://github.com/lehins/primal#readme @package primal @version 0.3.0.0 module Control.Prim.Monad.Throw -- | A class for monads in which exceptions may be thrown. -- -- Instances should obey the following law: -- --
-- throwM e >> x = throwM e ---- -- In other words, throwing an exception short-circuits the rest of the -- monadic computation. -- --
-- runST (writeSTRef _|_ v >>= f) = _|_ --data ST s a unIO :: IO a -> State# RealWorld -> (# State# RealWorld, a #) -- | Unwrap IO that returns unit unIO_ :: IO () -> State# RW -> State# RW -- | Unwrap ST unST :: ST s a -> State# s -> (# State# s, a #) -- | Unwrap ST that returns unit unST_ :: ST s () -> State# s -> State# s -- | Return the value computed by a state thread. The forall -- ensures that the internal state used by the ST computation is -- inaccessible to the rest of the program. runST :: (forall s. () => ST s a) -> a -- | Construct a primitive action that does not return anything. prim_ :: MonadPrim s m => (State# s -> State# s) -> m () primBase_ :: MonadPrimBase s m => m () -> State# s -> State# s withRunInIO :: forall m b. MonadUnliftPrim RW m => ((forall a. m a -> IO a) -> IO b) -> m b withRunInPrimBase :: (MonadUnliftPrim s m, MonadPrimBase s n) => ((forall a. m a -> n a) -> n b) -> m b runInPrimBase :: forall s m a b. MonadUnliftPrim s m => m a -> ((State# s -> (# State# s, a #)) -> State# s -> (# State# s, b #)) -> m b -- | Lift an IO action to MonadPrim with the RealWorld -- state token. Type restricted synonym for liftPrimBase liftIO :: MonadPrim RW m => IO a -> m a -- | Lift an ST action to MonadPrim with the same state -- token. Type restricted synonym for liftPrimBase liftST :: MonadPrim s m => ST s a -> m a -- | Lift an action from the MonadPrimBase to another -- MonadPrim with the same state token. liftPrimBase :: (MonadPrimBase s n, MonadPrim s m) => n a -> m a -- | Restrict a MonadPrimBase action that works with -- RealWorld to IO. primBaseToIO :: MonadPrimBase RealWorld m => m a -> IO a -- | Restrict a MonadPrimBase action that works in ST. primBaseToST :: MonadPrimBase s m => m a -> ST s a -- | An action that evaluates a value to Weak Head Normal Form (WHNF). Same -- as evaluate, except it works in MonadPrim. This function -- provides stronger guarantees than seq with respect to ordering -- of operations, but it does have a slightly higher overhead. eval :: MonadPrim s m => a -> m a -- | Run the action and then use eval to ensure its result is -- evaluated to Weak Head Normal Form (WHNF) evalM :: MonadPrim s m => m a -> m a -- | A class of types that can be fully evaluated. class NFData a -- | An action that evaluates a value to Normal Form (NF). This function -- provides stronger guarantees than deepseq with respect to -- ordering of operations. deepeval :: (MonadPrim s m, NFData a) => a -> m a -- | Run the action and the using deepeval ensure its result is -- evaluated to Normal Form (NF) deepevalM :: (MonadPrim s m, NFData a) => m a -> m a -- | Similar to when, but condional is supplied in a form of monadic -- action rather than a pure value. whenM :: Monad m => m Bool -> m () -> m () -- | Similar to unless, but condional is supplied in a form of -- monadic action rather than a pure value. unlessM :: Monad m => m Bool -> m () -> m () module Control.Prim.Monad.Unsafe -- | Coerce the state token of prim operation and wrap it into a -- MonadPrim action. -- --
-- test :: IORef [a] -- test = unsafePerformIO $ newIORef [] -- -- main = do -- writeIORef test [42] -- bang <- readIORef test -- print (bang :: [Char]) ---- -- This program will core dump. This problem with polymorphic references -- is well known in the ML community, and does not arise with normal -- monadic use of references. There is no easy way to make it impossible -- once you use unsafePerformIO. Indeed, it is possible to write -- coerce :: a -> b with the help of unsafePerformIO. -- So be careful! unsafePerformIO :: IO a -> a -- | This version of unsafePerformIO is more efficient because it -- omits the check that the IO is only being performed by a single -- thread. Hence, when you use unsafeDupablePerformIO, there is a -- possibility that the IO action may be performed multiple times (on a -- multiprocessor), and you should therefore ensure that it gives the -- same results each time. It may even happen that one of the duplicated -- IO actions is only run partially, and then interrupted in the middle -- without an exception being raised. Therefore, functions like -- bracket cannot be used safely within -- unsafeDupablePerformIO. unsafeDupablePerformIO :: IO a -> a -- | unsafeInterleaveIO allows an IO computation to be -- deferred lazily. When passed a value of type IO a, the -- IO will only be performed when the value of the a is -- demanded. This is used to implement lazy file reading, see -- hGetContents. unsafeInterleaveIO :: IO a -> IO a -- | unsafeDupableInterleaveIO allows an IO computation to be -- deferred lazily. When passed a value of type IO a, the -- IO will only be performed when the value of the a is -- demanded. -- -- The computation may be performed multiple times by different threads, -- possibly at the same time. To ensure that the computation is performed -- only once, use unsafeInterleaveIO instead. unsafeDupableInterleaveIO :: IO a -> IO a module Control.Prim.Exception -- | This is the same as throwIO, but works with any -- MonadPrim without restriction on RealWorld. throw :: (Exception e, MonadPrim s m) => e -> m a -- | Similar to throwTo, except that it wraps any known non-async -- exception with SomeAsyncException. This is necessary, because -- receiving thread will get the exception in an asynchronous manner and -- without proper wrapping it will not be able to distinguish it from a -- regular synchronous exception throwTo :: (MonadPrim s m, Exception e) => ThreadId -> e -> m () -- | Raise an impure exception from pure code. Returns a thunk, which will -- result in a supplied exceptionn being thrown when evaluated. impureThrow :: Exception e => e -> a -- | Behaves exactly as catch, except that it works in any -- MonadUnliftPrim. catch :: forall e a m. (Exception e, MonadUnliftPrim RW m) => m a -> (e -> m a) -> m a catchAny :: forall a m. MonadUnliftPrim RW m => m a -> (SomeException -> m a) -> m a catchAnySync :: forall a m. MonadUnliftPrim RW m => m a -> (SomeException -> m a) -> m a catchAll :: forall a m. MonadUnliftPrim RW m => m a -> (forall e. Exception e => e -> m a) -> m a catchAllSync :: forall a m. MonadUnliftPrim RW m => m a -> (forall e. Exception e => e -> m a) -> m a try :: (Exception e, MonadUnliftPrim RW m) => m a -> m (Either e a) tryAny :: MonadUnliftPrim RW m => m a -> m (Either SomeException a) tryAnySync :: MonadUnliftPrim RW m => m a -> m (Either SomeException a) -- | Async safe version of onException. onException :: MonadUnliftPrim RW m => m a -> m b -> m a -- | Run an action, while invoking an exception handler if that action -- fails for some reason. Exception handling function has async -- exceptions masked, but it is still interruptible, which can be -- undesired in some scenarios. If you are sure that the cleanup action -- does not deadlock and you do need hard guarantees that it gets -- executed you can run it as uninterruptible: -- --
-- uninterruptibleMask $ \restore -> withException (restore action) handler --withException :: (MonadUnliftPrim RW m, Exception e) => m a -> (e -> m b) -> m a -- | Same as withException, but will invoke exception handling -- function on all exceptions. withAnyException :: MonadUnliftPrim RW m => m a -> (SomeException -> m b) -> m a finally :: MonadUnliftPrim RW m => m a -> m b -> m a bracket :: MonadUnliftPrim RW m => m a -> (a -> m b) -> (a -> m c) -> m c bracket_ :: MonadUnliftPrim RW m => m a -> m b -> m c -> m c bracketOnError :: MonadUnliftPrim RW m => m a -> (a -> m b) -> (a -> m c) -> m c ufinally :: MonadUnliftPrim RW m => m a -> m b -> m a ubracket :: MonadUnliftPrim RW m => m a -> (a -> m b) -> (a -> m c) -> m c ubracket_ :: MonadUnliftPrim RW m => m a -> m b -> m c -> m c ubracketOnError :: MonadUnliftPrim RW m => m a -> (a -> m b) -> (a -> m c) -> m c -- | Mask all asychronous exceptions, but keep it interruptible, unless the -- inherited state was uninterruptible already, in which case this action -- has no affect. Same as mask, except that it is polymorphic in -- state token. Inside a state thread it cannot affect the result of -- computation, therefore it is safe to use it within ST monad. mask :: forall a m s. MonadUnliftPrim s m => ((forall b. m b -> m b) -> m a) -> m a -- | Mask all asychronous exceptions, but keep it interruptible, unless the -- inherited state was uninterruptible already, in which case this action -- has no affect. Same as mask_, except that it is polymorphic in -- state token. Inside a state thread it cannot affect the result of -- computation, therefore it is safe to use it within ST monad. mask_ :: forall a m s. MonadUnliftPrim s m => m a -> m a maskPrimBase_ :: forall a n m s. (MonadPrim s m, MonadPrimBase s n) => n a -> m a -- | Mask all asychronous exceptions and mark it uninterruptible. Same as -- uninterruptibleMask, except that it is polymorphic in state -- token. Inside a state thread it cannot affect the result of -- computation, therefore it is safe to use it within ST monad. uninterruptibleMask :: forall a m s. MonadUnliftPrim s m => ((forall b. m b -> m b) -> m a) -> m a -- | Mask all async exceptions and make sure evaluation cannot be -- interrupted. It is polymorphic in the state token because it is -- perfectly safe to use with ST actions that don't perform any -- allocations. It doesn't have to be restricted to RealWorld -- because it has no impact on other threads and can't affect the result -- of computation, moreover pure functions that implement tight loops are -- already non-interruptible. In fact using this function is more -- dangerous in IO than it is in ST, because misuse can -- lead to deadlocks in a concurrent setting. uninterruptibleMask_ :: forall a m s. MonadUnliftPrim s m => m a -> m a uninterruptibleMaskPrimBase_ :: forall a n m s. (MonadPrimBase s n, MonadPrim s m) => n a -> m a -- | A direct wrapper around maskAsyncExceptions# primop. This is -- different and more dangerous than mask_ because it can turn -- uninterrubtable state into interruptable. maskAsyncExceptions :: forall a m. MonadUnliftPrim RW m => m a -> m a -- | A direct wrapper around unmaskAsyncExceptions# primop. unmaskAsyncExceptions :: forall a m. MonadUnliftPrim RW m => m a -> m a -- | A direct wrapper around maskUninterruptible# primop. maskUninterruptible :: forall a m. MonadUnliftPrim RW m => m a -> m a -- | Describes the behaviour of a thread when an asynchronous exception is -- received. data MaskingState -- | asynchronous exceptions are unmasked (the normal state) Unmasked :: MaskingState -- | the state during mask: asynchronous exceptions are masked, but -- blocking operations may still be interrupted MaskedInterruptible :: MaskingState -- | the state during uninterruptibleMask: asynchronous exceptions -- are masked, and blocking operations may not be interrupted MaskedUninterruptible :: MaskingState -- | Same as getMaskingState, but generalized to MonadPrim getMaskingState :: MonadPrim RW m => m MaskingState -- | Any type that you wish to throw or catch as an exception must be an -- instance of the Exception class. The simplest case is a new -- exception type directly below the root: -- --
-- data MyException = ThisException | ThatException -- deriving Show -- -- instance Exception MyException ---- -- The default method definitions in the Exception class do what -- we need in this case. You can now throw and catch -- ThisException and ThatException as exceptions: -- --
-- *Main> throw ThisException `catch` \e -> putStrLn ("Caught " ++ show (e :: MyException))
-- Caught ThisException
--
--
-- In more complicated examples, you may wish to define a whole hierarchy
-- of exceptions:
--
-- -- --------------------------------------------------------------------- -- -- Make the root exception type for all the exceptions in a compiler -- -- data SomeCompilerException = forall e . Exception e => SomeCompilerException e -- -- instance Show SomeCompilerException where -- show (SomeCompilerException e) = show e -- -- instance Exception SomeCompilerException -- -- compilerExceptionToException :: Exception e => e -> SomeException -- compilerExceptionToException = toException . SomeCompilerException -- -- compilerExceptionFromException :: Exception e => SomeException -> Maybe e -- compilerExceptionFromException x = do -- SomeCompilerException a <- fromException x -- cast a -- -- --------------------------------------------------------------------- -- -- Make a subhierarchy for exceptions in the frontend of the compiler -- -- data SomeFrontendException = forall e . Exception e => SomeFrontendException e -- -- instance Show SomeFrontendException where -- show (SomeFrontendException e) = show e -- -- instance Exception SomeFrontendException where -- toException = compilerExceptionToException -- fromException = compilerExceptionFromException -- -- frontendExceptionToException :: Exception e => e -> SomeException -- frontendExceptionToException = toException . SomeFrontendException -- -- frontendExceptionFromException :: Exception e => SomeException -> Maybe e -- frontendExceptionFromException x = do -- SomeFrontendException a <- fromException x -- cast a -- -- --------------------------------------------------------------------- -- -- Make an exception type for a particular frontend compiler exception -- -- data MismatchedParentheses = MismatchedParentheses -- deriving Show -- -- instance Exception MismatchedParentheses where -- toException = frontendExceptionToException -- fromException = frontendExceptionFromException ---- -- We can now catch a MismatchedParentheses exception as -- MismatchedParentheses, SomeFrontendException or -- SomeCompilerException, but not other types, e.g. -- IOException: -- --
-- *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: MismatchedParentheses))
-- Caught MismatchedParentheses
-- *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeFrontendException))
-- Caught MismatchedParentheses
-- *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeCompilerException))
-- Caught MismatchedParentheses
-- *Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: IOException))
-- *** Exception: MismatchedParentheses
--
class (Typeable e, Show e) => Exception e
toException :: Exception e => e -> SomeException
fromException :: Exception e => SomeException -> Maybe e
-- | Render this exception value in a human-friendly manner.
--
-- Default implementation: show.
displayException :: Exception e => e -> String
-- | The SomeException type is the root of the exception type
-- hierarchy. When an exception of type e is thrown, behind the
-- scenes it is encapsulated in a SomeException.
data SomeException
-- | Asynchronous exceptions.
data AsyncException
-- | The current thread's stack exceeded its limit. Since an exception has
-- been raised, the thread's stack will certainly be below its limit
-- again, but the programmer should take remedial action immediately.
StackOverflow :: AsyncException
-- | The program's heap is reaching its limit, and the program should take
-- action to reduce the amount of live data it has. Notes:
--
-- -- putStrLnWithCallStack :: HasCallStack => String -> IO () ---- -- as a variant of putStrLn that will get its call-site and -- print it, along with the string given as argument. We can access the -- call-stack inside putStrLnWithCallStack with -- callStack. -- --
-- putStrLnWithCallStack :: HasCallStack => String -> IO () -- putStrLnWithCallStack msg = do -- putStrLn msg -- putStrLn (prettyCallStack callStack) ---- -- Thus, if we call putStrLnWithCallStack we will get a -- formatted call-stack alongside our string. -- --
-- >>> putStrLnWithCallStack "hello" -- hello -- CallStack (from HasCallStack): -- putStrLnWithCallStack, called at <interactive>:2:1 in interactive:Ghci1 ---- -- GHC solves HasCallStack constraints in three steps: -- --
-- runST (writeSTRef _|_ v >>= f) = _|_ --newtype ST s a ST :: STRep s a -> ST s a -- | Unwrap ST unST :: ST s a -> State# s -> (# State# s, a #) -- | Unwrap ST that returns unit unST_ :: ST s () -> State# s -> State# s -- | A list producer that can be fused with foldr. This function is -- merely -- --
-- augment g xs = g (:) xs ---- -- but GHC's simplifier will transform an expression of the form -- foldr k z (augment g xs), which may arise after -- inlining, to g k (foldr k z xs), which avoids -- producing an intermediate list. augment :: (forall b. () => (a -> b -> b) -> b -> b) -> [a] -> [a] -- | A list producer that can be fused with foldr. This function is -- merely -- --
-- build g = g (:) [] ---- -- but GHC's simplifier will transform an expression of the form -- foldr k z (build g), which may arise after -- inlining, to g k z, which avoids producing an intermediate -- list. build :: (forall b. () => (a -> b -> b) -> b -> b) -> [a] -- | The value of seq a b is bottom if a is bottom, and -- otherwise equal to b. In other words, it evaluates the first -- argument a to weak head normal form (WHNF). seq is -- usually introduced to improve performance by avoiding unneeded -- laziness. -- -- A note on evaluation order: the expression seq a b does -- not guarantee that a will be evaluated before -- b. The only guarantee given by seq is that the both -- a and b will be evaluated before seq -- returns a value. In particular, this means that b may be -- evaluated before a. If you need to guarantee a specific order -- of evaluation, you must use the function pseq from the -- "parallel" package. seq :: forall (r :: RuntimeRep) a (b :: TYPE r). a -> b -> b infixr 0 `seq` realWorld# :: State# RealWorld void# :: Void# -- | The function unsafeCoerce# allows you to side-step the -- typechecker entirely. That is, it allows you to coerce any type into -- any other type. If you use this function, you had better get it right, -- otherwise segmentation faults await. It is generally used when you -- want to write a program that you know is well-typed, but where -- Haskell's type system is not expressive enough to prove that it is -- well typed. -- -- The following uses of unsafeCoerce# are supposed to work -- (i.e. not lead to spurious compile-time or run-time crashes): -- --
-- par :: a -> b -> b -- par x y = case (par# x) of _ -> lazy y ---- -- If lazy were not lazy, par would look strict in -- y which would defeat the whole purpose of par. -- -- Like seq, the argument of lazy can have an unboxed -- type. lazy :: a -> a -- | The oneShot function can be used to give a hint to the compiler -- that its argument will be called at most once, which may (or may not) -- enable certain optimizations. It can be useful to improve the -- performance of code in continuation passing style. -- -- If oneShot is used wrongly, then it may be that computations -- whose result that would otherwise be shared are re-evaluated every -- time they are used. Otherwise, the use of oneShot is safe. -- -- oneShot is representation polymorphic: the type variables may -- refer to lifted or unlifted types. oneShot :: forall (q :: RuntimeRep) (r :: RuntimeRep) (a :: TYPE q) (b :: TYPE r). (a -> b) -> a -> b -- | Apply a function to a State# RealWorld token. -- When manually applying a function to realWorld#, it is -- necessary to use NOINLINE to prevent semantically undesirable -- floating. runRW# is inlined, but only very late in compilation -- after all floating is complete. runRW# :: forall (r :: RuntimeRep) (o :: TYPE r). (State# RealWorld -> o) -> o breakpoint :: a -> a breakpointCond :: Bool -> a -> a -- | The call inline f arranges that f is inlined, -- regardless of its size. More precisely, the call inline f -- rewrites to the right-hand side of f's definition. This -- allows the programmer to control inlining from a particular call site -- rather than the definition site of the function (c.f. INLINE -- pragmas). -- -- This inlining occurs regardless of the argument to the call or the -- size of f's definition; it is unconditional. The main caveat -- is that f's definition must be visible to the compiler; it is -- therefore recommended to mark the function with an INLINABLE -- pragma at its definition so that GHC guarantees to record its -- unfolding regardless of size. -- -- If no inlining takes place, the inline function expands to the -- identity function in Phase zero, so its use imposes no overhead. inline :: a -> a -- | The groupWith function uses the user supplied function which -- projects an element out of every list element in order to first sort -- the input list and then to form groups by equality on these projected -- elements groupWith :: Ord b => (a -> b) -> [a] -> [[a]] magicDict :: a -- | The function coerce allows you to safely convert between -- values of types that have the same representation with no run-time -- overhead. In the simplest case you can use it instead of a newtype -- constructor, to go from the newtype's concrete type to the abstract -- type. But it also works in more complicated settings, e.g. converting -- a list of newtypes to a list of concrete types. -- -- This function is runtime-representation polymorphic, but the -- RuntimeRep type argument is marked as Inferred, -- meaning that it is not available for visible type application. This -- means the typechecker will accept coerce @Int @Age 42. coerce :: forall (k :: RuntimeRep) (a :: TYPE k) (b :: TYPE k). Coercible a b => a -> b -- | The IsList class and its methods are intended to be used in -- conjunction with the OverloadedLists extension. class IsList l where { -- | The Item type function returns the type of items of the -- structure l. type family Item l; } -- | The fromList function constructs the structure l from -- the given list of Item l fromList :: IsList l => [Item l] -> l -- | The fromListN function takes the input list's length as a hint. -- Its behaviour should be equivalent to fromList. The hint can be -- used to construct the structure l more efficiently compared -- to fromList. If the given hint does not equal to the input -- list's length the behaviour of fromListN is not specified. fromListN :: IsList l => Int -> [Item l] -> l -- | The toList function extracts a list of Item l from the -- structure l. It should satisfy fromList . toList = id. toList :: IsList l => l -> [Item l] -- | Witness for an unboxed Proxy# value, which has no runtime -- representation. proxy# :: forall k (a :: k). Proxy# a -- | Class for string-like datastructures; used by the overloaded string -- extension (-XOverloadedStrings in GHC). class IsString a fromString :: IsString a => String -> a -- | An arbitrary machine address assumed to point outside the -- garbage-collected heap. data Addr# :: TYPE 'AddrRep data Array# a :: TYPE 'UnliftedRep data ByteArray# :: TYPE 'UnliftedRep data Char# :: TYPE 'WordRep -- | The character type Char is an enumeration whose values -- represent Unicode (or equivalently ISO/IEC 10646) code points (i.e. -- characters, see http://www.unicode.org/ for details). This set -- extends the ISO 8859-1 (Latin-1) character set (the first 256 -- characters), which is itself an extension of the ASCII character set -- (the first 128 characters). A character literal in Haskell has type -- Char. -- -- To convert a Char to or from the corresponding Int value -- defined by Unicode, use toEnum and fromEnum from the -- Enum class respectively (or equivalently ord and -- chr). data Char C# :: Char# -> Char data Double# :: TYPE 'DoubleRep -- | Double-precision floating point numbers. It is desirable that this -- type be at least equal in range and precision to the IEEE -- double-precision type. data Double D# :: Double# -> Double data Float# :: TYPE 'FloatRep -- | Single-precision floating point numbers. It is desirable that this -- type be at least equal in range and precision to the IEEE -- single-precision type. data Float F# :: Float# -> Float data Int# :: TYPE 'IntRep -- | A fixed-precision integer type with at least the range [-2^29 .. -- 2^29-1]. The exact range for a given implementation can be -- determined by using minBound and maxBound from the -- Bounded class. data Int I# :: Int# -> Int data Int8# :: TYPE 'Int8Rep data Int16# :: TYPE 'Int16Rep data Int32# :: TYPE 'Int32Rep data Int64# :: TYPE 'Int64Rep data Weak# a :: TYPE 'UnliftedRep data MutableArray# a b :: TYPE 'UnliftedRep data MutableByteArray# a :: TYPE 'UnliftedRep -- | A shared mutable variable (not the same as a -- MutVar#!). (Note: in a non-concurrent implementation, -- (MVar# a) can be represented by (MutVar# (Maybe -- a)).) data MVar# a b :: TYPE 'UnliftedRep -- | RealWorld is deeply magical. It is primitive, but it -- is not unlifted (hence ptrArg). We never manipulate -- values of type RealWorld; it's only used in the type system, -- to parameterise State#. data RealWorld data StablePtr# a :: TYPE 'AddrRep -- | Lifted, heterogeneous equality. By lifted, we mean that it can be -- bogus (deferred type error). By heterogeneous, the two types -- a and b might have different kinds. Because -- ~~ can appear unexpectedly in error messages to users who do -- not care about the difference between heterogeneous equality -- ~~ and homogeneous equality ~, this is printed as -- ~ unless -fprint-equality-relations is set. class a ~# b => (a :: k0) ~~ (b :: k1) data ArrayArray# :: TYPE 'UnliftedRep data MutableArrayArray# a :: TYPE 'UnliftedRep -- | State# is the primitive, unlifted type of states. It has one -- type parameter, thus State# RealWorld, or State# s, -- where s is a type variable. The only purpose of the type parameter is -- to keep different state threads separate. It is represented by nothing -- at all. data State# a :: TYPE 'TupleRep '[] :: [RuntimeRep] data StableName# a :: TYPE 'UnliftedRep -- | A MutVar# behaves like a single-element mutable array. data MutVar# a b :: TYPE 'UnliftedRep data Void# :: TYPE 'TupleRep '[] :: [RuntimeRep] data Word# :: TYPE 'WordRep -- | A Word is an unsigned integral type, with the same size as -- Int. data Word W# :: Word# -> Word data Word8# :: TYPE 'Word8Rep data Word16# :: TYPE 'Word16Rep data Word32# :: TYPE 'Word32Rep data Word64# :: TYPE 'Word64Rep -- | (In a non-concurrent implementation, this can be a singleton type, -- whose (unique) value is returned by myThreadId#. The other -- operations can be omitted.) data ThreadId# :: TYPE 'UnliftedRep -- | Primitive bytecode type. data BCO# :: TYPE 'UnliftedRep -- | A value of type Ptr a represents a pointer to an -- object, or an array of objects, which may be marshalled to or from -- Haskell values of type a. -- -- The type a will often be an instance of class Storable -- which provides the marshalling operations. However this is not -- essential, and you can provide your own operations to access the -- pointer. For example you might write small foreign functions to get or -- set the fields of a C struct. data Ptr a Ptr :: Addr# -> Ptr a -- | A value of type FunPtr a is a pointer to a function -- callable from foreign code. The type a will normally be a -- foreign type, a function type with zero or more arguments where -- --
-- foreign import ccall "stdlib.h &free" -- p_free :: FunPtr (Ptr a -> IO ()) ---- -- or a pointer to a Haskell function created using a wrapper stub -- declared to produce a FunPtr of the correct type. For example: -- --
-- type Compare = Int -> Int -> Bool -- foreign import ccall "wrapper" -- mkCompare :: Compare -> IO (FunPtr Compare) ---- -- Calls to wrapper stubs like mkCompare allocate storage, which -- should be released with freeHaskellFunPtr when no longer -- required. -- -- To convert FunPtr values to corresponding Haskell functions, -- one can define a dynamic stub for the specific foreign type, -- e.g. -- --
-- type IntFunction = CInt -> IO () -- foreign import ccall "dynamic" -- mkFun :: FunPtr IntFunction -> IntFunction --data FunPtr a FunPtr :: Addr# -> FunPtr a data TVar# a b :: TYPE 'UnliftedRep data Compact# :: TYPE 'UnliftedRep -- | The kind of constraints, like Show a data Constraint -- | GHC maintains a property that the kind of all inhabited types (as -- distinct from type constructors or type-level data) tells us the -- runtime representation of values of that type. This datatype encodes -- the choice of runtime value. Note that TYPE is parameterised by -- RuntimeRep; this is precisely what we mean by the fact that a -- type's kind encodes the runtime representation. -- -- For boxed values (that is, values that are represented by a pointer), -- a further distinction is made, between lifted types (that contain ⊥), -- and unlifted ones (that don't). data RuntimeRep -- | a SIMD vector type VecRep :: VecCount -> VecElem -> RuntimeRep -- | An unboxed tuple of the given reps TupleRep :: [RuntimeRep] -> RuntimeRep -- | An unboxed sum of the given reps SumRep :: [RuntimeRep] -> RuntimeRep -- | lifted; represented by a pointer LiftedRep :: RuntimeRep -- | unlifted; represented by a pointer UnliftedRep :: RuntimeRep -- | signed, word-sized value IntRep :: RuntimeRep -- | signed, 8-bit value Int8Rep :: RuntimeRep -- | signed, 16-bit value Int16Rep :: RuntimeRep -- | signed, 32-bit value Int32Rep :: RuntimeRep -- | signed, 64-bit value (on 32-bit only) Int64Rep :: RuntimeRep -- | unsigned, word-sized value WordRep :: RuntimeRep -- | unsigned, 8-bit value Word8Rep :: RuntimeRep -- | unsigned, 16-bit value Word16Rep :: RuntimeRep -- | unsigned, 32-bit value Word32Rep :: RuntimeRep -- | unsigned, 64-bit value (on 32-bit only) Word64Rep :: RuntimeRep -- | A pointer, but not to a Haskell value AddrRep :: RuntimeRep -- | a 32-bit floating point number FloatRep :: RuntimeRep -- | a 64-bit floating point number DoubleRep :: RuntimeRep -- | Length of a SIMD vector type data VecCount Vec2 :: VecCount Vec4 :: VecCount Vec8 :: VecCount Vec16 :: VecCount Vec32 :: VecCount Vec64 :: VecCount -- | Element of a SIMD vector type data VecElem Int8ElemRep :: VecElem Int16ElemRep :: VecElem Int32ElemRep :: VecElem Int64ElemRep :: VecElem Word8ElemRep :: VecElem Word16ElemRep :: VecElem Word32ElemRep :: VecElem Word64ElemRep :: VecElem FloatElemRep :: VecElem DoubleElemRep :: VecElem -- | Coercible is a two-parameter class that has instances for -- types a and b if the compiler can infer that they -- have the same representation. This class does not have regular -- instances; instead they are created on-the-fly during type-checking. -- Trying to manually declare an instance of Coercible is an -- error. -- -- Nevertheless one can pretend that the following three kinds of -- instances exist. First, as a trivial base-case: -- --
-- instance Coercible a a ---- -- Furthermore, for every type constructor there is an instance that -- allows to coerce under the type constructor. For example, let -- D be a prototypical type constructor (data or -- newtype) with three type arguments, which have roles -- nominal, representational resp. phantom. -- Then there is an instance of the form -- --
-- instance Coercible b b' => Coercible (D a b c) (D a b' c') ---- -- Note that the nominal type arguments are equal, the -- representational type arguments can differ, but need to have -- a Coercible instance themself, and the phantom type -- arguments can be changed arbitrarily. -- -- The third kind of instance exists for every newtype NT = MkNT -- T and comes in two variants, namely -- --
-- instance Coercible a T => Coercible a NT ---- --
-- instance Coercible T b => Coercible NT b ---- -- This instance is only usable if the constructor MkNT is in -- scope. -- -- If, as a library author of a type constructor like Set a, you -- want to prevent a user of your module to write coerce :: Set T -- -> Set NT, you need to set the role of Set's type -- parameter to nominal, by writing -- --
-- type role Set nominal ---- -- For more details about this feature, please refer to Safe -- Coercions by Joachim Breitner, Richard A. Eisenberg, Simon Peyton -- Jones and Stephanie Weirich. class a ~R# b => Coercible (a :: k) (b :: k) -- | The type constructor Proxy# is used to bear witness to some -- type variable. It's used when you want to pass around proxy values for -- doing things like modelling type applications. A Proxy# is -- not only unboxed, it also has a polymorphic kind, and has no runtime -- representation, being totally free. data Proxy# (a :: k) :: TYPE 'TupleRep '[] :: [RuntimeRep] -- | The type constructor Any is type to which you can unsafely -- coerce any lifted type, and back. More concretely, for a lifted type -- t and value x :: t, -- unsafeCoerce -- (unsafeCoerce x :: Any) :: t is equivalent to x. type family Any :: k data SmallArray# a :: TYPE 'UnliftedRep data SmallMutableArray# a b :: TYPE 'UnliftedRep -- | Warning: this is only available on LLVM. data Int8X16# :: TYPE 'VecRep 'Vec16 'Int8ElemRep -- | Warning: this is only available on LLVM. data Int16X8# :: TYPE 'VecRep 'Vec8 'Int16ElemRep -- | Warning: this is only available on LLVM. data Int32X4# :: TYPE 'VecRep 'Vec4 'Int32ElemRep -- | Warning: this is only available on LLVM. data Int64X2# :: TYPE 'VecRep 'Vec2 'Int64ElemRep -- | Warning: this is only available on LLVM. data Int8X32# :: TYPE 'VecRep 'Vec32 'Int8ElemRep -- | Warning: this is only available on LLVM. data Int16X16# :: TYPE 'VecRep 'Vec16 'Int16ElemRep -- | Warning: this is only available on LLVM. data Int32X8# :: TYPE 'VecRep 'Vec8 'Int32ElemRep -- | Warning: this is only available on LLVM. data Int64X4# :: TYPE 'VecRep 'Vec4 'Int64ElemRep -- | Warning: this is only available on LLVM. data Int8X64# :: TYPE 'VecRep 'Vec64 'Int8ElemRep -- | Warning: this is only available on LLVM. data Int16X32# :: TYPE 'VecRep 'Vec32 'Int16ElemRep -- | Warning: this is only available on LLVM. data Int32X16# :: TYPE 'VecRep 'Vec16 'Int32ElemRep -- | Warning: this is only available on LLVM. data Int64X8# :: TYPE 'VecRep 'Vec8 'Int64ElemRep -- | Warning: this is only available on LLVM. data Word8X16# :: TYPE 'VecRep 'Vec16 'Word8ElemRep -- | Warning: this is only available on LLVM. data Word16X8# :: TYPE 'VecRep 'Vec8 'Word16ElemRep -- | Warning: this is only available on LLVM. data Word32X4# :: TYPE 'VecRep 'Vec4 'Word32ElemRep -- | Warning: this is only available on LLVM. data Word64X2# :: TYPE 'VecRep 'Vec2 'Word64ElemRep -- | Warning: this is only available on LLVM. data Word8X32# :: TYPE 'VecRep 'Vec32 'Word8ElemRep -- | Warning: this is only available on LLVM. data Word16X16# :: TYPE 'VecRep 'Vec16 'Word16ElemRep -- | Warning: this is only available on LLVM. data Word32X8# :: TYPE 'VecRep 'Vec8 'Word32ElemRep -- | Warning: this is only available on LLVM. data Word64X4# :: TYPE 'VecRep 'Vec4 'Word64ElemRep -- | Warning: this is only available on LLVM. data Word8X64# :: TYPE 'VecRep 'Vec64 'Word8ElemRep -- | Warning: this is only available on LLVM. data Word16X32# :: TYPE 'VecRep 'Vec32 'Word16ElemRep -- | Warning: this is only available on LLVM. data Word32X16# :: TYPE 'VecRep 'Vec16 'Word32ElemRep -- | Warning: this is only available on LLVM. data Word64X8# :: TYPE 'VecRep 'Vec8 'Word64ElemRep -- | Warning: this is only available on LLVM. data FloatX4# :: TYPE 'VecRep 'Vec4 'FloatElemRep -- | Warning: this is only available on LLVM. data DoubleX2# :: TYPE 'VecRep 'Vec2 'DoubleElemRep -- | Warning: this is only available on LLVM. data FloatX8# :: TYPE 'VecRep 'Vec8 'FloatElemRep -- | Warning: this is only available on LLVM. data DoubleX4# :: TYPE 'VecRep 'Vec4 'DoubleElemRep -- | Warning: this is only available on LLVM. data FloatX16# :: TYPE 'VecRep 'Vec16 'FloatElemRep -- | Warning: this is only available on LLVM. data DoubleX8# :: TYPE 'VecRep 'Vec8 'DoubleElemRep gtChar# :: Char# -> Char# -> Int# geChar# :: Char# -> Char# -> Int# eqChar# :: Char# -> Char# -> Int# neChar# :: Char# -> Char# -> Int# ltChar# :: Char# -> Char# -> Int# leChar# :: Char# -> Char# -> Int# ord# :: Char# -> Int# (+#) :: Int# -> Int# -> Int# infixl 6 +# (-#) :: Int# -> Int# -> Int# infixl 6 -# -- | Low word of signed integer multiply. (*#) :: Int# -> Int# -> Int# infixl 7 *# -- | Return non-zero if there is any possibility that the upper word of a -- signed integer multiply might contain useful information. Return zero -- only if you are completely sure that no overflow can occur. On a -- 32-bit platform, the recommended implementation is to do a 32 x 32 -- -> 64 signed multiply, and subtract result[63:32] from (result[31] -- >>signed 31). If this is zero, meaning that the upper word is -- merely a sign extension of the lower one, no overflow can occur. -- -- On a 64-bit platform it is not always possible to acquire the top 64 -- bits of the result. Therefore, a recommended implementation is to take -- the absolute value of both operands, and return 0 iff bits[63:31] of -- them are zero, since that means that their magnitudes fit within 31 -- bits, so the magnitude of the product must fit into 62 bits. -- -- If in doubt, return non-zero, but do make an effort to create the -- correct answer for small args, since otherwise the performance of -- (*) :: Integer -> Integer -> Integer will be poor. mulIntMayOflo# :: Int# -> Int# -> Int# -- | Rounds towards zero. The behavior is undefined if the second argument -- is zero. -- -- Warning: this can fail with an unchecked exception. quotInt# :: Int# -> Int# -> Int# -- | Satisfies (quotInt# x y) *# y +# (remInt# x y) == x. The -- behavior is undefined if the second argument is zero. -- -- Warning: this can fail with an unchecked exception. remInt# :: Int# -> Int# -> Int# -- | Rounds towards zero. -- -- Warning: this can fail with an unchecked exception. quotRemInt# :: Int# -> Int# -> (# Int#, Int# #) -- | Bitwise "and". andI# :: Int# -> Int# -> Int# -- | Bitwise "or". orI# :: Int# -> Int# -> Int# -- | Bitwise "xor". xorI# :: Int# -> Int# -> Int# -- | Bitwise "not", also known as the binary complement. notI# :: Int# -> Int# -- | Unary negation. Since the negative Int# range extends one -- further than the positive range, negateInt# of the most -- negative number is an identity operation. This way, -- negateInt# is always its own inverse. negateInt# :: Int# -> Int# -- | Add signed integers reporting overflow. First member of result is the -- sum truncated to an Int#; second member is zero if the true -- sum fits in an Int#, nonzero if overflow occurred (the sum is -- either too large or too small to fit in an Int#). addIntC# :: Int# -> Int# -> (# Int#, Int# #) -- | Subtract signed integers reporting overflow. First member of result is -- the difference truncated to an Int#; second member is zero if -- the true difference fits in an Int#, nonzero if overflow -- occurred (the difference is either too large or too small to fit in an -- Int#). subIntC# :: Int# -> Int# -> (# Int#, Int# #) (>#) :: Int# -> Int# -> Int# infix 4 ># (>=#) :: Int# -> Int# -> Int# infix 4 >=# (==#) :: Int# -> Int# -> Int# infix 4 ==# (/=#) :: Int# -> Int# -> Int# infix 4 /=# (<#) :: Int# -> Int# -> Int# infix 4 <# (<=#) :: Int# -> Int# -> Int# infix 4 <=# chr# :: Int# -> Char# int2Word# :: Int# -> Word# int2Float# :: Int# -> Float# int2Double# :: Int# -> Double# word2Float# :: Word# -> Float# word2Double# :: Word# -> Double# -- | Shift left. Result undefined if shift amount is not in the range 0 to -- word size - 1 inclusive. uncheckedIShiftL# :: Int# -> Int# -> Int# -- | Shift right arithmetic. Result undefined if shift amount is not in the -- range 0 to word size - 1 inclusive. uncheckedIShiftRA# :: Int# -> Int# -> Int# -- | Shift right logical. Result undefined if shift amount is not in the -- range 0 to word size - 1 inclusive. uncheckedIShiftRL# :: Int# -> Int# -> Int# extendInt8# :: Int8# -> Int# narrowInt8# :: Int# -> Int8# negateInt8# :: Int8# -> Int8# plusInt8# :: Int8# -> Int8# -> Int8# subInt8# :: Int8# -> Int8# -> Int8# timesInt8# :: Int8# -> Int8# -> Int8# -- | Warning: this can fail with an unchecked exception. quotInt8# :: Int8# -> Int8# -> Int8# -- | Warning: this can fail with an unchecked exception. remInt8# :: Int8# -> Int8# -> Int8# -- | Warning: this can fail with an unchecked exception. quotRemInt8# :: Int8# -> Int8# -> (# Int8#, Int8# #) eqInt8# :: Int8# -> Int8# -> Int# geInt8# :: Int8# -> Int8# -> Int# gtInt8# :: Int8# -> Int8# -> Int# leInt8# :: Int8# -> Int8# -> Int# ltInt8# :: Int8# -> Int8# -> Int# neInt8# :: Int8# -> Int8# -> Int# extendWord8# :: Word8# -> Word# narrowWord8# :: Word# -> Word8# notWord8# :: Word8# -> Word8# plusWord8# :: Word8# -> Word8# -> Word8# subWord8# :: Word8# -> Word8# -> Word8# timesWord8# :: Word8# -> Word8# -> Word8# -- | Warning: this can fail with an unchecked exception. quotWord8# :: Word8# -> Word8# -> Word8# -- | Warning: this can fail with an unchecked exception. remWord8# :: Word8# -> Word8# -> Word8# -- | Warning: this can fail with an unchecked exception. quotRemWord8# :: Word8# -> Word8# -> (# Word8#, Word8# #) eqWord8# :: Word8# -> Word8# -> Int# geWord8# :: Word8# -> Word8# -> Int# gtWord8# :: Word8# -> Word8# -> Int# leWord8# :: Word8# -> Word8# -> Int# ltWord8# :: Word8# -> Word8# -> Int# neWord8# :: Word8# -> Word8# -> Int# extendInt16# :: Int16# -> Int# narrowInt16# :: Int# -> Int16# negateInt16# :: Int16# -> Int16# plusInt16# :: Int16# -> Int16# -> Int16# subInt16# :: Int16# -> Int16# -> Int16# timesInt16# :: Int16# -> Int16# -> Int16# -- | Warning: this can fail with an unchecked exception. quotInt16# :: Int16# -> Int16# -> Int16# -- | Warning: this can fail with an unchecked exception. remInt16# :: Int16# -> Int16# -> Int16# -- | Warning: this can fail with an unchecked exception. quotRemInt16# :: Int16# -> Int16# -> (# Int16#, Int16# #) eqInt16# :: Int16# -> Int16# -> Int# geInt16# :: Int16# -> Int16# -> Int# gtInt16# :: Int16# -> Int16# -> Int# leInt16# :: Int16# -> Int16# -> Int# ltInt16# :: Int16# -> Int16# -> Int# neInt16# :: Int16# -> Int16# -> Int# extendWord16# :: Word16# -> Word# narrowWord16# :: Word# -> Word16# notWord16# :: Word16# -> Word16# plusWord16# :: Word16# -> Word16# -> Word16# subWord16# :: Word16# -> Word16# -> Word16# timesWord16# :: Word16# -> Word16# -> Word16# -- | Warning: this can fail with an unchecked exception. quotWord16# :: Word16# -> Word16# -> Word16# -- | Warning: this can fail with an unchecked exception. remWord16# :: Word16# -> Word16# -> Word16# -- | Warning: this can fail with an unchecked exception. quotRemWord16# :: Word16# -> Word16# -> (# Word16#, Word16# #) eqWord16# :: Word16# -> Word16# -> Int# geWord16# :: Word16# -> Word16# -> Int# gtWord16# :: Word16# -> Word16# -> Int# leWord16# :: Word16# -> Word16# -> Int# ltWord16# :: Word16# -> Word16# -> Int# neWord16# :: Word16# -> Word16# -> Int# plusWord# :: Word# -> Word# -> Word# -- | Add unsigned integers reporting overflow. The first element of the -- pair is the result. The second element is the carry flag, which is -- nonzero on overflow. See also plusWord2#. addWordC# :: Word# -> Word# -> (# Word#, Int# #) -- | Subtract unsigned integers reporting overflow. The first element of -- the pair is the result. The second element is the carry flag, which is -- nonzero on overflow. subWordC# :: Word# -> Word# -> (# Word#, Int# #) -- | Add unsigned integers, with the high part (carry) in the first -- component of the returned pair and the low part in the second -- component of the pair. See also addWordC#. plusWord2# :: Word# -> Word# -> (# Word#, Word# #) minusWord# :: Word# -> Word# -> Word# timesWord# :: Word# -> Word# -> Word# timesWord2# :: Word# -> Word# -> (# Word#, Word# #) -- | Warning: this can fail with an unchecked exception. quotWord# :: Word# -> Word# -> Word# -- | Warning: this can fail with an unchecked exception. remWord# :: Word# -> Word# -> Word# -- | Warning: this can fail with an unchecked exception. quotRemWord# :: Word# -> Word# -> (# Word#, Word# #) -- | Takes high word of dividend, then low word of dividend, then divisor. -- Requires that high word < divisor. -- -- Warning: this can fail with an unchecked exception. quotRemWord2# :: Word# -> Word# -> Word# -> (# Word#, Word# #) and# :: Word# -> Word# -> Word# or# :: Word# -> Word# -> Word# xor# :: Word# -> Word# -> Word# not# :: Word# -> Word# -- | Shift left logical. Result undefined if shift amount is not in the -- range 0 to word size - 1 inclusive. uncheckedShiftL# :: Word# -> Int# -> Word# -- | Shift right logical. Result undefined if shift amount is not in the -- range 0 to word size - 1 inclusive. uncheckedShiftRL# :: Word# -> Int# -> Word# word2Int# :: Word# -> Int# gtWord# :: Word# -> Word# -> Int# geWord# :: Word# -> Word# -> Int# eqWord# :: Word# -> Word# -> Int# neWord# :: Word# -> Word# -> Int# ltWord# :: Word# -> Word# -> Int# leWord# :: Word# -> Word# -> Int# -- | Count the number of set bits in the lower 8 bits of a word. popCnt8# :: Word# -> Word# -- | Count the number of set bits in the lower 16 bits of a word. popCnt16# :: Word# -> Word# -- | Count the number of set bits in the lower 32 bits of a word. popCnt32# :: Word# -> Word# -- | Count the number of set bits in a 64-bit word. popCnt64# :: Word# -> Word# -- | Count the number of set bits in a word. popCnt# :: Word# -> Word# -- | Deposit bits to lower 8 bits of a word at locations specified by a -- mask. pdep8# :: Word# -> Word# -> Word# -- | Deposit bits to lower 16 bits of a word at locations specified by a -- mask. pdep16# :: Word# -> Word# -> Word# -- | Deposit bits to lower 32 bits of a word at locations specified by a -- mask. pdep32# :: Word# -> Word# -> Word# -- | Deposit bits to a word at locations specified by a mask. pdep64# :: Word# -> Word# -> Word# -- | Deposit bits to a word at locations specified by a mask. pdep# :: Word# -> Word# -> Word# -- | Extract bits from lower 8 bits of a word at locations specified by a -- mask. pext8# :: Word# -> Word# -> Word# -- | Extract bits from lower 16 bits of a word at locations specified by a -- mask. pext16# :: Word# -> Word# -> Word# -- | Extract bits from lower 32 bits of a word at locations specified by a -- mask. pext32# :: Word# -> Word# -> Word# -- | Extract bits from a word at locations specified by a mask. pext64# :: Word# -> Word# -> Word# -- | Extract bits from a word at locations specified by a mask. pext# :: Word# -> Word# -> Word# -- | Count leading zeros in the lower 8 bits of a word. clz8# :: Word# -> Word# -- | Count leading zeros in the lower 16 bits of a word. clz16# :: Word# -> Word# -- | Count leading zeros in the lower 32 bits of a word. clz32# :: Word# -> Word# -- | Count leading zeros in a 64-bit word. clz64# :: Word# -> Word# -- | Count leading zeros in a word. clz# :: Word# -> Word# -- | Count trailing zeros in the lower 8 bits of a word. ctz8# :: Word# -> Word# -- | Count trailing zeros in the lower 16 bits of a word. ctz16# :: Word# -> Word# -- | Count trailing zeros in the lower 32 bits of a word. ctz32# :: Word# -> Word# -- | Count trailing zeros in a 64-bit word. ctz64# :: Word# -> Word# -- | Count trailing zeros in a word. ctz# :: Word# -> Word# -- | Swap bytes in the lower 16 bits of a word. The higher bytes are -- undefined. byteSwap16# :: Word# -> Word# -- | Swap bytes in the lower 32 bits of a word. The higher bytes are -- undefined. byteSwap32# :: Word# -> Word# -- | Swap bytes in a 64 bits of a word. byteSwap64# :: Word# -> Word# -- | Swap bytes in a word. byteSwap# :: Word# -> Word# -- | Reverse the order of the bits in a 8-bit word. bitReverse8# :: Word# -> Word# -- | Reverse the order of the bits in a 16-bit word. bitReverse16# :: Word# -> Word# -- | Reverse the order of the bits in a 32-bit word. bitReverse32# :: Word# -> Word# -- | Reverse the order of the bits in a 64-bit word. bitReverse64# :: Word# -> Word# -- | Reverse the order of the bits in a word. bitReverse# :: Word# -> Word# narrow8Int# :: Int# -> Int# narrow16Int# :: Int# -> Int# narrow32Int# :: Int# -> Int# narrow8Word# :: Word# -> Word# narrow16Word# :: Word# -> Word# narrow32Word# :: Word# -> Word# (>##) :: Double# -> Double# -> Int# infix 4 >## (>=##) :: Double# -> Double# -> Int# infix 4 >=## (==##) :: Double# -> Double# -> Int# infix 4 ==## (/=##) :: Double# -> Double# -> Int# infix 4 /=## (<##) :: Double# -> Double# -> Int# infix 4 <## (<=##) :: Double# -> Double# -> Int# infix 4 <=## (+##) :: Double# -> Double# -> Double# infixl 6 +## (-##) :: Double# -> Double# -> Double# infixl 6 -## (*##) :: Double# -> Double# -> Double# infixl 7 *## -- | Warning: this can fail with an unchecked exception. (/##) :: Double# -> Double# -> Double# infixl 7 /## negateDouble# :: Double# -> Double# fabsDouble# :: Double# -> Double# -- | Truncates a Double# value to the nearest Int#. -- Results are undefined if the truncation if truncation yields a value -- outside the range of Int#. double2Int# :: Double# -> Int# double2Float# :: Double# -> Float# expDouble# :: Double# -> Double# expm1Double# :: Double# -> Double# -- | Warning: this can fail with an unchecked exception. logDouble# :: Double# -> Double# -- | Warning: this can fail with an unchecked exception. log1pDouble# :: Double# -> Double# sqrtDouble# :: Double# -> Double# sinDouble# :: Double# -> Double# cosDouble# :: Double# -> Double# tanDouble# :: Double# -> Double# -- | Warning: this can fail with an unchecked exception. asinDouble# :: Double# -> Double# -- | Warning: this can fail with an unchecked exception. acosDouble# :: Double# -> Double# atanDouble# :: Double# -> Double# sinhDouble# :: Double# -> Double# coshDouble# :: Double# -> Double# tanhDouble# :: Double# -> Double# asinhDouble# :: Double# -> Double# acoshDouble# :: Double# -> Double# atanhDouble# :: Double# -> Double# -- | Exponentiation. (**##) :: Double# -> Double# -> Double# -- | Convert to integer. First component of the result is -1 or 1, -- indicating the sign of the mantissa. The next two are the high and low -- 32 bits of the mantissa respectively, and the last is the exponent. decodeDouble_2Int# :: Double# -> (# Int#, Word#, Word#, Int# #) -- | Decode Double# into mantissa and base-2 exponent. decodeDouble_Int64# :: Double# -> (# Int#, Int# #) gtFloat# :: Float# -> Float# -> Int# geFloat# :: Float# -> Float# -> Int# eqFloat# :: Float# -> Float# -> Int# neFloat# :: Float# -> Float# -> Int# ltFloat# :: Float# -> Float# -> Int# leFloat# :: Float# -> Float# -> Int# plusFloat# :: Float# -> Float# -> Float# minusFloat# :: Float# -> Float# -> Float# timesFloat# :: Float# -> Float# -> Float# -- | Warning: this can fail with an unchecked exception. divideFloat# :: Float# -> Float# -> Float# negateFloat# :: Float# -> Float# fabsFloat# :: Float# -> Float# -- | Truncates a Float# value to the nearest Int#. -- Results are undefined if the truncation if truncation yields a value -- outside the range of Int#. float2Int# :: Float# -> Int# expFloat# :: Float# -> Float# expm1Float# :: Float# -> Float# -- | Warning: this can fail with an unchecked exception. logFloat# :: Float# -> Float# -- | Warning: this can fail with an unchecked exception. log1pFloat# :: Float# -> Float# sqrtFloat# :: Float# -> Float# sinFloat# :: Float# -> Float# cosFloat# :: Float# -> Float# tanFloat# :: Float# -> Float# -- | Warning: this can fail with an unchecked exception. asinFloat# :: Float# -> Float# -- | Warning: this can fail with an unchecked exception. acosFloat# :: Float# -> Float# atanFloat# :: Float# -> Float# sinhFloat# :: Float# -> Float# coshFloat# :: Float# -> Float# tanhFloat# :: Float# -> Float# asinhFloat# :: Float# -> Float# acoshFloat# :: Float# -> Float# atanhFloat# :: Float# -> Float# powerFloat# :: Float# -> Float# -> Float# float2Double# :: Float# -> Double# -- | Convert to integers. First Int# in result is the mantissa; -- second is the exponent. decodeFloat_Int# :: Float# -> (# Int#, Int# #) -- | Create a new mutable array with the specified number of elements, in -- the specified state thread, with each element containing the specified -- initial value. newArray# :: Int# -> a -> State# d -> (# State# d, MutableArray# d a #) sameMutableArray# :: MutableArray# d a -> MutableArray# d a -> Int# -- | Read from specified index of mutable array. Result is not yet -- evaluated. -- -- Warning: this can fail with an unchecked exception. readArray# :: MutableArray# d a -> Int# -> State# d -> (# State# d, a #) -- | Write to specified index of mutable array. -- -- Warning: this can fail with an unchecked exception. writeArray# :: MutableArray# d a -> Int# -> a -> State# d -> State# d -- | Return the number of elements in the array. sizeofArray# :: Array# a -> Int# -- | Return the number of elements in the array. sizeofMutableArray# :: MutableArray# d a -> Int# -- | Read from the specified index of an immutable array. The result is -- packaged into an unboxed unary tuple; the result itself is not yet -- evaluated. Pattern matching on the tuple forces the indexing of the -- array to happen but does not evaluate the element itself. Evaluating -- the thunk prevents additional thunks from building up on the heap. -- Avoiding these thunks, in turn, reduces references to the argument -- array, allowing it to be garbage collected more promptly. -- -- Warning: this can fail with an unchecked exception. indexArray# :: Array# a -> Int# -> (# a #) -- | Make a mutable array immutable, without copying. unsafeFreezeArray# :: MutableArray# d a -> State# d -> (# State# d, Array# a #) -- | Make an immutable array mutable, without copying. unsafeThawArray# :: Array# a -> State# d -> (# State# d, MutableArray# d a #) -- | Given a source array, an offset into the source array, a destination -- array, an offset into the destination array, and a number of elements -- to copy, copy the elements from the source array to the destination -- array. Both arrays must fully contain the specified ranges, but this -- is not checked. The two arrays must not be the same array in different -- states, but this is not checked either. -- -- Warning: this can fail with an unchecked exception. copyArray# :: Array# a -> Int# -> MutableArray# d a -> Int# -> Int# -> State# d -> State# d -- | Given a source array, an offset into the source array, a destination -- array, an offset into the destination array, and a number of elements -- to copy, copy the elements from the source array to the destination -- array. Both arrays must fully contain the specified ranges, but this -- is not checked. In the case where the source and destination are the -- same array the source and destination regions may overlap. -- -- Warning: this can fail with an unchecked exception. copyMutableArray# :: MutableArray# d a -> Int# -> MutableArray# d a -> Int# -> Int# -> State# d -> State# d -- | Given a source array, an offset into the source array, and a number of -- elements to copy, create a new array with the elements from the source -- array. The provided array must fully contain the specified range, but -- this is not checked. -- -- Warning: this can fail with an unchecked exception. cloneArray# :: Array# a -> Int# -> Int# -> Array# a -- | Given a source array, an offset into the source array, and a number of -- elements to copy, create a new array with the elements from the source -- array. The provided array must fully contain the specified range, but -- this is not checked. -- -- Warning: this can fail with an unchecked exception. cloneMutableArray# :: MutableArray# d a -> Int# -> Int# -> State# d -> (# State# d, MutableArray# d a #) -- | Given a source array, an offset into the source array, and a number of -- elements to copy, create a new array with the elements from the source -- array. The provided array must fully contain the specified range, but -- this is not checked. -- -- Warning: this can fail with an unchecked exception. freezeArray# :: MutableArray# d a -> Int# -> Int# -> State# d -> (# State# d, Array# a #) -- | Given a source array, an offset into the source array, and a number of -- elements to copy, create a new array with the elements from the source -- array. The provided array must fully contain the specified range, but -- this is not checked. -- -- Warning: this can fail with an unchecked exception. thawArray# :: Array# a -> Int# -> Int# -> State# d -> (# State# d, MutableArray# d a #) -- | Given an array, an offset, the expected old value, and the new value, -- perform an atomic compare and swap (i.e. write the new value if the -- current value and the old value are the same pointer). Returns 0 if -- the swap succeeds and 1 if it fails. Additionally, returns the element -- at the offset after the operation completes. This means that on a -- success the new value is returned, and on a failure the actual old -- value (not the expected one) is returned. Implies a full memory -- barrier. The use of a pointer equality on a lifted value makes this -- function harder to use correctly than casIntArray#. All of -- the difficulties of using reallyUnsafePtrEquality# correctly -- apply to casArray# as well. casArray# :: MutableArray# d a -> Int# -> a -> a -> State# d -> (# State# d, Int#, a #) -- | Create a new mutable array with the specified number of elements, in -- the specified state thread, with each element containing the specified -- initial value. newSmallArray# :: Int# -> a -> State# d -> (# State# d, SmallMutableArray# d a #) sameSmallMutableArray# :: SmallMutableArray# d a -> SmallMutableArray# d a -> Int# -- | Shrink mutable array to new specified size, in the specified state -- thread. The new size argument must be less than or equal to the -- current size as reported by sizeofSmallMutableArray#. shrinkSmallMutableArray# :: SmallMutableArray# d a -> Int# -> State# d -> State# d -- | Read from specified index of mutable array. Result is not yet -- evaluated. -- -- Warning: this can fail with an unchecked exception. readSmallArray# :: SmallMutableArray# d a -> Int# -> State# d -> (# State# d, a #) -- | Write to specified index of mutable array. -- -- Warning: this can fail with an unchecked exception. writeSmallArray# :: SmallMutableArray# d a -> Int# -> a -> State# d -> State# d -- | Return the number of elements in the array. sizeofSmallArray# :: SmallArray# a -> Int# -- | Return the number of elements in the array. Note that this is -- deprecated as it is unsafe in the presence of resize operations on the -- same byte array. sizeofSmallMutableArray# :: SmallMutableArray# d a -> Int# -- | Return the number of elements in the array. getSizeofSmallMutableArray# :: SmallMutableArray# d a -> State# d -> (# State# d, Int# #) -- | Read from specified index of immutable array. Result is packaged into -- an unboxed singleton; the result itself is not yet evaluated. -- -- Warning: this can fail with an unchecked exception. indexSmallArray# :: SmallArray# a -> Int# -> (# a #) -- | Make a mutable array immutable, without copying. unsafeFreezeSmallArray# :: SmallMutableArray# d a -> State# d -> (# State# d, SmallArray# a #) -- | Make an immutable array mutable, without copying. unsafeThawSmallArray# :: SmallArray# a -> State# d -> (# State# d, SmallMutableArray# d a #) -- | Given a source array, an offset into the source array, a destination -- array, an offset into the destination array, and a number of elements -- to copy, copy the elements from the source array to the destination -- array. Both arrays must fully contain the specified ranges, but this -- is not checked. The two arrays must not be the same array in different -- states, but this is not checked either. -- -- Warning: this can fail with an unchecked exception. copySmallArray# :: SmallArray# a -> Int# -> SmallMutableArray# d a -> Int# -> Int# -> State# d -> State# d -- | Given a source array, an offset into the source array, a destination -- array, an offset into the destination array, and a number of elements -- to copy, copy the elements from the source array to the destination -- array. The source and destination arrays can refer to the same array. -- Both arrays must fully contain the specified ranges, but this is not -- checked. The regions are allowed to overlap, although this is only -- possible when the same array is provided as both the source and the -- destination. -- -- Warning: this can fail with an unchecked exception. copySmallMutableArray# :: SmallMutableArray# d a -> Int# -> SmallMutableArray# d a -> Int# -> Int# -> State# d -> State# d -- | Given a source array, an offset into the source array, and a number of -- elements to copy, create a new array with the elements from the source -- array. The provided array must fully contain the specified range, but -- this is not checked. -- -- Warning: this can fail with an unchecked exception. cloneSmallArray# :: SmallArray# a -> Int# -> Int# -> SmallArray# a -- | Given a source array, an offset into the source array, and a number of -- elements to copy, create a new array with the elements from the source -- array. The provided array must fully contain the specified range, but -- this is not checked. -- -- Warning: this can fail with an unchecked exception. cloneSmallMutableArray# :: SmallMutableArray# d a -> Int# -> Int# -> State# d -> (# State# d, SmallMutableArray# d a #) -- | Given a source array, an offset into the source array, and a number of -- elements to copy, create a new array with the elements from the source -- array. The provided array must fully contain the specified range, but -- this is not checked. -- -- Warning: this can fail with an unchecked exception. freezeSmallArray# :: SmallMutableArray# d a -> Int# -> Int# -> State# d -> (# State# d, SmallArray# a #) -- | Given a source array, an offset into the source array, and a number of -- elements to copy, create a new array with the elements from the source -- array. The provided array must fully contain the specified range, but -- this is not checked. -- -- Warning: this can fail with an unchecked exception. thawSmallArray# :: SmallArray# a -> Int# -> Int# -> State# d -> (# State# d, SmallMutableArray# d a #) -- | Unsafe, machine-level atomic compare and swap on an element within an -- array. See the documentation of casArray#. casSmallArray# :: SmallMutableArray# d a -> Int# -> a -> a -> State# d -> (# State# d, Int#, a #) -- | Create a new mutable byte array of specified size (in bytes), in the -- specified state thread. newByteArray# :: Int# -> State# d -> (# State# d, MutableByteArray# d #) -- | Create a mutable byte array that the GC guarantees not to move. newPinnedByteArray# :: Int# -> State# d -> (# State# d, MutableByteArray# d #) -- | Create a mutable byte array, aligned by the specified amount, that the -- GC guarantees not to move. newAlignedPinnedByteArray# :: Int# -> Int# -> State# d -> (# State# d, MutableByteArray# d #) -- | Determine whether a MutableByteArray# is guaranteed not to -- move during GC. isMutableByteArrayPinned# :: MutableByteArray# d -> Int# -- | Determine whether a ByteArray# is guaranteed not to move -- during GC. isByteArrayPinned# :: ByteArray# -> Int# -- | Intended for use with pinned arrays; otherwise very unsafe! byteArrayContents# :: ByteArray# -> Addr# sameMutableByteArray# :: MutableByteArray# d -> MutableByteArray# d -> Int# -- | Shrink mutable byte array to new specified size (in bytes), in the -- specified state thread. The new size argument must be less than or -- equal to the current size as reported by -- sizeofMutableByteArray#. shrinkMutableByteArray# :: MutableByteArray# d -> Int# -> State# d -> State# d -- | Resize (unpinned) mutable byte array to new specified size (in bytes). -- The returned MutableByteArray# is either the original -- MutableByteArray# resized in-place or, if not possible, a -- newly allocated (unpinned) MutableByteArray# (with the -- original content copied over). -- -- To avoid undefined behaviour, the original MutableByteArray# -- shall not be accessed anymore after a resizeMutableByteArray# -- has been performed. Moreover, no reference to the old one should be -- kept in order to allow garbage collection of the original -- MutableByteArray# in case a new MutableByteArray# -- had to be allocated. resizeMutableByteArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, MutableByteArray# d #) -- | Make a mutable byte array immutable, without copying. unsafeFreezeByteArray# :: MutableByteArray# d -> State# d -> (# State# d, ByteArray# #) -- | Return the size of the array in bytes. sizeofByteArray# :: ByteArray# -> Int# -- | Return the size of the array in bytes. Note that this is deprecated as -- it is unsafe in the presence of resize operations on the same byte -- array. sizeofMutableByteArray# :: MutableByteArray# d -> Int# -- | Return the number of elements in the array. getSizeofMutableByteArray# :: MutableByteArray# d -> State# d -> (# State# d, Int# #) -- | Read 8-bit character; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexCharArray# :: ByteArray# -> Int# -> Char# -- | Read 31-bit character; offset in 4-byte words. -- -- Warning: this can fail with an unchecked exception. indexWideCharArray# :: ByteArray# -> Int# -> Char# -- | Warning: this can fail with an unchecked exception. indexIntArray# :: ByteArray# -> Int# -> Int# -- | Warning: this can fail with an unchecked exception. indexWordArray# :: ByteArray# -> Int# -> Word# -- | Warning: this can fail with an unchecked exception. indexAddrArray# :: ByteArray# -> Int# -> Addr# -- | Warning: this can fail with an unchecked exception. indexFloatArray# :: ByteArray# -> Int# -> Float# -- | Warning: this can fail with an unchecked exception. indexDoubleArray# :: ByteArray# -> Int# -> Double# -- | Warning: this can fail with an unchecked exception. indexStablePtrArray# :: ByteArray# -> Int# -> StablePtr# a -- | Read 8-bit integer; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexInt8Array# :: ByteArray# -> Int# -> Int# -- | Read 16-bit integer; offset in 16-bit words. -- -- Warning: this can fail with an unchecked exception. indexInt16Array# :: ByteArray# -> Int# -> Int# -- | Read 32-bit integer; offset in 32-bit words. -- -- Warning: this can fail with an unchecked exception. indexInt32Array# :: ByteArray# -> Int# -> Int# -- | Read 64-bit integer; offset in 64-bit words. -- -- Warning: this can fail with an unchecked exception. indexInt64Array# :: ByteArray# -> Int# -> Int# -- | Read 8-bit word; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8Array# :: ByteArray# -> Int# -> Word# -- | Read 16-bit word; offset in 16-bit words. -- -- Warning: this can fail with an unchecked exception. indexWord16Array# :: ByteArray# -> Int# -> Word# -- | Read 32-bit word; offset in 32-bit words. -- -- Warning: this can fail with an unchecked exception. indexWord32Array# :: ByteArray# -> Int# -> Word# -- | Read 64-bit word; offset in 64-bit words. -- -- Warning: this can fail with an unchecked exception. indexWord64Array# :: ByteArray# -> Int# -> Word# -- | Read 8-bit character; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsChar# :: ByteArray# -> Int# -> Char# -- | Read 31-bit character; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsWideChar# :: ByteArray# -> Int# -> Char# -- | Read address; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsAddr# :: ByteArray# -> Int# -> Addr# -- | Read float; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsFloat# :: ByteArray# -> Int# -> Float# -- | Read double; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsDouble# :: ByteArray# -> Int# -> Double# -- | Read stable pointer; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsStablePtr# :: ByteArray# -> Int# -> StablePtr# a -- | Read 16-bit int; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsInt16# :: ByteArray# -> Int# -> Int# -- | Read 32-bit int; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsInt32# :: ByteArray# -> Int# -> Int# -- | Read 64-bit int; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsInt64# :: ByteArray# -> Int# -> Int# -- | Read int; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsInt# :: ByteArray# -> Int# -> Int# -- | Read 16-bit word; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsWord16# :: ByteArray# -> Int# -> Word# -- | Read 32-bit word; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsWord32# :: ByteArray# -> Int# -> Word# -- | Read 64-bit word; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsWord64# :: ByteArray# -> Int# -> Word# -- | Read word; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsWord# :: ByteArray# -> Int# -> Word# -- | Read 8-bit character; offset in bytes. -- -- Warning: this can fail with an unchecked exception. readCharArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Char# #) -- | Read 31-bit character; offset in 4-byte words. -- -- Warning: this can fail with an unchecked exception. readWideCharArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Char# #) -- | Read integer; offset in machine words. -- -- Warning: this can fail with an unchecked exception. readIntArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int# #) -- | Read word; offset in machine words. -- -- Warning: this can fail with an unchecked exception. readWordArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word# #) -- | Warning: this can fail with an unchecked exception. readAddrArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Addr# #) -- | Warning: this can fail with an unchecked exception. readFloatArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Float# #) -- | Warning: this can fail with an unchecked exception. readDoubleArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Double# #) -- | Warning: this can fail with an unchecked exception. readStablePtrArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, StablePtr# a #) -- | Warning: this can fail with an unchecked exception. readInt8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int# #) -- | Warning: this can fail with an unchecked exception. readInt16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int# #) -- | Warning: this can fail with an unchecked exception. readInt32Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int# #) -- | Warning: this can fail with an unchecked exception. readInt64Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int# #) -- | Warning: this can fail with an unchecked exception. readWord8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word# #) -- | Warning: this can fail with an unchecked exception. readWord16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word# #) -- | Warning: this can fail with an unchecked exception. readWord32Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word# #) -- | Warning: this can fail with an unchecked exception. readWord64Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word# #) -- | Warning: this can fail with an unchecked exception. readWord8ArrayAsChar# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Char# #) -- | Warning: this can fail with an unchecked exception. readWord8ArrayAsWideChar# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Char# #) -- | Warning: this can fail with an unchecked exception. readWord8ArrayAsAddr# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Addr# #) -- | Warning: this can fail with an unchecked exception. readWord8ArrayAsFloat# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Float# #) -- | Warning: this can fail with an unchecked exception. readWord8ArrayAsDouble# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Double# #) -- | Warning: this can fail with an unchecked exception. readWord8ArrayAsStablePtr# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, StablePtr# a #) -- | Warning: this can fail with an unchecked exception. readWord8ArrayAsInt16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int# #) -- | Warning: this can fail with an unchecked exception. readWord8ArrayAsInt32# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int# #) -- | Warning: this can fail with an unchecked exception. readWord8ArrayAsInt64# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int# #) -- | Warning: this can fail with an unchecked exception. readWord8ArrayAsInt# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int# #) -- | Warning: this can fail with an unchecked exception. readWord8ArrayAsWord16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word# #) -- | Warning: this can fail with an unchecked exception. readWord8ArrayAsWord32# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word# #) -- | Warning: this can fail with an unchecked exception. readWord8ArrayAsWord64# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word# #) -- | Warning: this can fail with an unchecked exception. readWord8ArrayAsWord# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word# #) -- | Write 8-bit character; offset in bytes. -- -- Warning: this can fail with an unchecked exception. writeCharArray# :: MutableByteArray# d -> Int# -> Char# -> State# d -> State# d -- | Write 31-bit character; offset in 4-byte words. -- -- Warning: this can fail with an unchecked exception. writeWideCharArray# :: MutableByteArray# d -> Int# -> Char# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeIntArray# :: MutableByteArray# d -> Int# -> Int# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWordArray# :: MutableByteArray# d -> Int# -> Word# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeAddrArray# :: MutableByteArray# d -> Int# -> Addr# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeFloatArray# :: MutableByteArray# d -> Int# -> Float# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeDoubleArray# :: MutableByteArray# d -> Int# -> Double# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeStablePtrArray# :: MutableByteArray# d -> Int# -> StablePtr# a -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeInt8Array# :: MutableByteArray# d -> Int# -> Int# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeInt16Array# :: MutableByteArray# d -> Int# -> Int# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeInt32Array# :: MutableByteArray# d -> Int# -> Int# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeInt64Array# :: MutableByteArray# d -> Int# -> Int# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord8Array# :: MutableByteArray# d -> Int# -> Word# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord16Array# :: MutableByteArray# d -> Int# -> Word# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord32Array# :: MutableByteArray# d -> Int# -> Word# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord64Array# :: MutableByteArray# d -> Int# -> Word# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord8ArrayAsChar# :: MutableByteArray# d -> Int# -> Char# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord8ArrayAsWideChar# :: MutableByteArray# d -> Int# -> Char# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord8ArrayAsAddr# :: MutableByteArray# d -> Int# -> Addr# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord8ArrayAsFloat# :: MutableByteArray# d -> Int# -> Float# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord8ArrayAsDouble# :: MutableByteArray# d -> Int# -> Double# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord8ArrayAsStablePtr# :: MutableByteArray# d -> Int# -> StablePtr# a -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord8ArrayAsInt16# :: MutableByteArray# d -> Int# -> Int# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord8ArrayAsInt32# :: MutableByteArray# d -> Int# -> Int# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord8ArrayAsInt64# :: MutableByteArray# d -> Int# -> Int# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord8ArrayAsInt# :: MutableByteArray# d -> Int# -> Int# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord8ArrayAsWord16# :: MutableByteArray# d -> Int# -> Word# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord8ArrayAsWord32# :: MutableByteArray# d -> Int# -> Word# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord8ArrayAsWord64# :: MutableByteArray# d -> Int# -> Word# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord8ArrayAsWord# :: MutableByteArray# d -> Int# -> Word# -> State# d -> State# d -- | compareByteArrays# src1 src1_ofs src2 src2_ofs n compares -- n bytes starting at offset src1_ofs in the first -- ByteArray# src1 to the range of n bytes -- (i.e. same length) starting at offset src2_ofs of the second -- ByteArray# src2. Both arrays must fully contain the -- specified ranges, but this is not checked. Returns an Int# -- less than, equal to, or greater than zero if the range is found, -- respectively, to be byte-wise lexicographically less than, to match, -- or be greater than the second range. -- -- Warning: this can fail with an unchecked exception. compareByteArrays# :: ByteArray# -> Int# -> ByteArray# -> Int# -> Int# -> Int# -- | copyByteArray# src src_ofs dst dst_ofs n copies the range -- starting at offset src_ofs of length n from the -- ByteArray# src to the MutableByteArray# -- dst starting at offset dst_ofs. Both arrays must -- fully contain the specified ranges, but this is not checked. The two -- arrays must not be the same array in different states, but this is not -- checked either. -- -- Warning: this can fail with an unchecked exception. copyByteArray# :: ByteArray# -> Int# -> MutableByteArray# d -> Int# -> Int# -> State# d -> State# d -- | Copy a range of the first MutableByteArray# to the specified region in -- the second MutableByteArray#. Both arrays must fully contain the -- specified ranges, but this is not checked. The regions are allowed to -- overlap, although this is only possible when the same array is -- provided as both the source and the destination. -- -- Warning: this can fail with an unchecked exception. copyMutableByteArray# :: MutableByteArray# d -> Int# -> MutableByteArray# d -> Int# -> Int# -> State# d -> State# d -- | Copy a range of the ByteArray# to the memory range starting at the -- Addr#. The ByteArray# and the memory region at Addr# must fully -- contain the specified ranges, but this is not checked. The Addr# must -- not point into the ByteArray# (e.g. if the ByteArray# were pinned), -- but this is not checked either. -- -- Warning: this can fail with an unchecked exception. copyByteArrayToAddr# :: ByteArray# -> Int# -> Addr# -> Int# -> State# d -> State# d -- | Copy a range of the MutableByteArray# to the memory range starting at -- the Addr#. The MutableByteArray# and the memory region at Addr# must -- fully contain the specified ranges, but this is not checked. The Addr# -- must not point into the MutableByteArray# (e.g. if the -- MutableByteArray# were pinned), but this is not checked either. -- -- Warning: this can fail with an unchecked exception. copyMutableByteArrayToAddr# :: MutableByteArray# d -> Int# -> Addr# -> Int# -> State# d -> State# d -- | Copy a memory range starting at the Addr# to the specified range in -- the MutableByteArray#. The memory region at Addr# and the ByteArray# -- must fully contain the specified ranges, but this is not checked. The -- Addr# must not point into the MutableByteArray# (e.g. if the -- MutableByteArray# were pinned), but this is not checked either. -- -- Warning: this can fail with an unchecked exception. copyAddrToByteArray# :: Addr# -> MutableByteArray# d -> Int# -> Int# -> State# d -> State# d -- | setByteArray# ba off len c sets the byte range [off, -- off+len] of the MutableByteArray# to the byte -- c. -- -- Warning: this can fail with an unchecked exception. setByteArray# :: MutableByteArray# d -> Int# -> Int# -> Int# -> State# d -> State# d -- | Given an array and an offset in machine words, read an element. The -- index is assumed to be in bounds. Implies a full memory barrier. -- -- Warning: this can fail with an unchecked exception. atomicReadIntArray# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int# #) -- | Given an array and an offset in machine words, write an element. The -- index is assumed to be in bounds. Implies a full memory barrier. -- -- Warning: this can fail with an unchecked exception. atomicWriteIntArray# :: MutableByteArray# d -> Int# -> Int# -> State# d -> State# d -- | Given an array, an offset in machine words, the expected old value, -- and the new value, perform an atomic compare and swap i.e. write the -- new value if the current value matches the provided old value. Returns -- the value of the element before the operation. Implies a full memory -- barrier. -- -- Warning: this can fail with an unchecked exception. casIntArray# :: MutableByteArray# d -> Int# -> Int# -> Int# -> State# d -> (# State# d, Int# #) -- | Given an array, and offset in machine words, and a value to add, -- atomically add the value to the element. Returns the value of the -- element before the operation. Implies a full memory barrier. -- -- Warning: this can fail with an unchecked exception. fetchAddIntArray# :: MutableByteArray# d -> Int# -> Int# -> State# d -> (# State# d, Int# #) -- | Given an array, and offset in machine words, and a value to subtract, -- atomically substract the value to the element. Returns the value of -- the element before the operation. Implies a full memory barrier. -- -- Warning: this can fail with an unchecked exception. fetchSubIntArray# :: MutableByteArray# d -> Int# -> Int# -> State# d -> (# State# d, Int# #) -- | Given an array, and offset in machine words, and a value to AND, -- atomically AND the value to the element. Returns the value of the -- element before the operation. Implies a full memory barrier. -- -- Warning: this can fail with an unchecked exception. fetchAndIntArray# :: MutableByteArray# d -> Int# -> Int# -> State# d -> (# State# d, Int# #) -- | Given an array, and offset in machine words, and a value to NAND, -- atomically NAND the value to the element. Returns the value of the -- element before the operation. Implies a full memory barrier. -- -- Warning: this can fail with an unchecked exception. fetchNandIntArray# :: MutableByteArray# d -> Int# -> Int# -> State# d -> (# State# d, Int# #) -- | Given an array, and offset in machine words, and a value to OR, -- atomically OR the value to the element. Returns the value of the -- element before the operation. Implies a full memory barrier. -- -- Warning: this can fail with an unchecked exception. fetchOrIntArray# :: MutableByteArray# d -> Int# -> Int# -> State# d -> (# State# d, Int# #) -- | Given an array, and offset in machine words, and a value to XOR, -- atomically XOR the value to the element. Returns the value of the -- element before the operation. Implies a full memory barrier. -- -- Warning: this can fail with an unchecked exception. fetchXorIntArray# :: MutableByteArray# d -> Int# -> Int# -> State# d -> (# State# d, Int# #) -- | Create a new mutable array of arrays with the specified number of -- elements, in the specified state thread, with each element recursively -- referring to the newly created array. newArrayArray# :: Int# -> State# d -> (# State# d, MutableArrayArray# d #) sameMutableArrayArray# :: MutableArrayArray# d -> MutableArrayArray# d -> Int# -- | Make a mutable array of arrays immutable, without copying. unsafeFreezeArrayArray# :: MutableArrayArray# d -> State# d -> (# State# d, ArrayArray# #) -- | Return the number of elements in the array. sizeofArrayArray# :: ArrayArray# -> Int# -- | Return the number of elements in the array. sizeofMutableArrayArray# :: MutableArrayArray# d -> Int# -- | Warning: this can fail with an unchecked exception. indexByteArrayArray# :: ArrayArray# -> Int# -> ByteArray# -- | Warning: this can fail with an unchecked exception. indexArrayArrayArray# :: ArrayArray# -> Int# -> ArrayArray# -- | Warning: this can fail with an unchecked exception. readByteArrayArray# :: MutableArrayArray# d -> Int# -> State# d -> (# State# d, ByteArray# #) -- | Warning: this can fail with an unchecked exception. readMutableByteArrayArray# :: MutableArrayArray# d -> Int# -> State# d -> (# State# d, MutableByteArray# d #) -- | Warning: this can fail with an unchecked exception. readArrayArrayArray# :: MutableArrayArray# d -> Int# -> State# d -> (# State# d, ArrayArray# #) -- | Warning: this can fail with an unchecked exception. readMutableArrayArrayArray# :: MutableArrayArray# d -> Int# -> State# d -> (# State# d, MutableArrayArray# d #) -- | Warning: this can fail with an unchecked exception. writeByteArrayArray# :: MutableArrayArray# d -> Int# -> ByteArray# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeMutableByteArrayArray# :: MutableArrayArray# d -> Int# -> MutableByteArray# d -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeArrayArrayArray# :: MutableArrayArray# d -> Int# -> ArrayArray# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeMutableArrayArrayArray# :: MutableArrayArray# d -> Int# -> MutableArrayArray# d -> State# d -> State# d -- | Copy a range of the ArrayArray# to the specified region in the -- MutableArrayArray#. Both arrays must fully contain the specified -- ranges, but this is not checked. The two arrays must not be the same -- array in different states, but this is not checked either. -- -- Warning: this can fail with an unchecked exception. copyArrayArray# :: ArrayArray# -> Int# -> MutableArrayArray# d -> Int# -> Int# -> State# d -> State# d -- | Copy a range of the first MutableArrayArray# to the specified region -- in the second MutableArrayArray#. Both arrays must fully contain the -- specified ranges, but this is not checked. The regions are allowed to -- overlap, although this is only possible when the same array is -- provided as both the source and the destination. -- -- Warning: this can fail with an unchecked exception. copyMutableArrayArray# :: MutableArrayArray# d -> Int# -> MutableArrayArray# d -> Int# -> Int# -> State# d -> State# d plusAddr# :: Addr# -> Int# -> Addr# -- | Result is meaningless if two Addr#s are so far apart that -- their difference doesn't fit in an Int#. minusAddr# :: Addr# -> Addr# -> Int# -- | Return the remainder when the Addr# arg, treated like an -- Int#, is divided by the Int# arg. remAddr# :: Addr# -> Int# -> Int# -- | Coerce directly from address to int. addr2Int# :: Addr# -> Int# -- | Coerce directly from int to address. int2Addr# :: Int# -> Addr# gtAddr# :: Addr# -> Addr# -> Int# geAddr# :: Addr# -> Addr# -> Int# eqAddr# :: Addr# -> Addr# -> Int# neAddr# :: Addr# -> Addr# -> Int# ltAddr# :: Addr# -> Addr# -> Int# leAddr# :: Addr# -> Addr# -> Int# -- | Reads 8-bit character; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexCharOffAddr# :: Addr# -> Int# -> Char# -- | Reads 31-bit character; offset in 4-byte words. -- -- Warning: this can fail with an unchecked exception. indexWideCharOffAddr# :: Addr# -> Int# -> Char# -- | Warning: this can fail with an unchecked exception. indexIntOffAddr# :: Addr# -> Int# -> Int# -- | Warning: this can fail with an unchecked exception. indexWordOffAddr# :: Addr# -> Int# -> Word# -- | Warning: this can fail with an unchecked exception. indexAddrOffAddr# :: Addr# -> Int# -> Addr# -- | Warning: this can fail with an unchecked exception. indexFloatOffAddr# :: Addr# -> Int# -> Float# -- | Warning: this can fail with an unchecked exception. indexDoubleOffAddr# :: Addr# -> Int# -> Double# -- | Warning: this can fail with an unchecked exception. indexStablePtrOffAddr# :: Addr# -> Int# -> StablePtr# a -- | Warning: this can fail with an unchecked exception. indexInt8OffAddr# :: Addr# -> Int# -> Int# -- | Warning: this can fail with an unchecked exception. indexInt16OffAddr# :: Addr# -> Int# -> Int# -- | Warning: this can fail with an unchecked exception. indexInt32OffAddr# :: Addr# -> Int# -> Int# -- | Warning: this can fail with an unchecked exception. indexInt64OffAddr# :: Addr# -> Int# -> Int# -- | Warning: this can fail with an unchecked exception. indexWord8OffAddr# :: Addr# -> Int# -> Word# -- | Warning: this can fail with an unchecked exception. indexWord16OffAddr# :: Addr# -> Int# -> Word# -- | Warning: this can fail with an unchecked exception. indexWord32OffAddr# :: Addr# -> Int# -> Word# -- | Warning: this can fail with an unchecked exception. indexWord64OffAddr# :: Addr# -> Int# -> Word# -- | Reads 8-bit character; offset in bytes. -- -- Warning: this can fail with an unchecked exception. readCharOffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Char# #) -- | Reads 31-bit character; offset in 4-byte words. -- -- Warning: this can fail with an unchecked exception. readWideCharOffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Char# #) -- | Warning: this can fail with an unchecked exception. readIntOffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int# #) -- | Warning: this can fail with an unchecked exception. readWordOffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word# #) -- | Warning: this can fail with an unchecked exception. readAddrOffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Addr# #) -- | Warning: this can fail with an unchecked exception. readFloatOffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Float# #) -- | Warning: this can fail with an unchecked exception. readDoubleOffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Double# #) -- | Warning: this can fail with an unchecked exception. readStablePtrOffAddr# :: Addr# -> Int# -> State# d -> (# State# d, StablePtr# a #) -- | Warning: this can fail with an unchecked exception. readInt8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int# #) -- | Warning: this can fail with an unchecked exception. readInt16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int# #) -- | Warning: this can fail with an unchecked exception. readInt32OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int# #) -- | Warning: this can fail with an unchecked exception. readInt64OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int# #) -- | Warning: this can fail with an unchecked exception. readWord8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word# #) -- | Warning: this can fail with an unchecked exception. readWord16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word# #) -- | Warning: this can fail with an unchecked exception. readWord32OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word# #) -- | Warning: this can fail with an unchecked exception. readWord64OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word# #) -- | Warning: this can fail with an unchecked exception. writeCharOffAddr# :: Addr# -> Int# -> Char# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWideCharOffAddr# :: Addr# -> Int# -> Char# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeIntOffAddr# :: Addr# -> Int# -> Int# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWordOffAddr# :: Addr# -> Int# -> Word# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeAddrOffAddr# :: Addr# -> Int# -> Addr# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeFloatOffAddr# :: Addr# -> Int# -> Float# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeDoubleOffAddr# :: Addr# -> Int# -> Double# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeStablePtrOffAddr# :: Addr# -> Int# -> StablePtr# a -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeInt8OffAddr# :: Addr# -> Int# -> Int# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeInt16OffAddr# :: Addr# -> Int# -> Int# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeInt32OffAddr# :: Addr# -> Int# -> Int# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeInt64OffAddr# :: Addr# -> Int# -> Int# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord8OffAddr# :: Addr# -> Int# -> Word# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord16OffAddr# :: Addr# -> Int# -> Word# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord32OffAddr# :: Addr# -> Int# -> Word# -> State# d -> State# d -- | Warning: this can fail with an unchecked exception. writeWord64OffAddr# :: Addr# -> Int# -> Word# -> State# d -> State# d -- | Create MutVar# with specified initial value in specified -- state thread. newMutVar# :: a -> State# d -> (# State# d, MutVar# d a #) -- | Read contents of MutVar#. Result is not yet evaluated. readMutVar# :: MutVar# d a -> State# d -> (# State# d, a #) -- | Write contents of MutVar#. writeMutVar# :: MutVar# d a -> a -> State# d -> State# d sameMutVar# :: MutVar# d a -> MutVar# d a -> Int# -- | Modify the contents of a MutVar#, returning the previous -- contents and the result of applying the given function to the previous -- contents. Note that this isn't strictly speaking the correct type for -- this function; it should really be MutVar# s a -> (a -> -- (a,b)) -> State# s -> (# State# s, a, (a, b) #), but we -- don't know about pairs here. -- -- Warning: this can fail with an unchecked exception. atomicModifyMutVar2# :: MutVar# d a -> (a -> c) -> State# d -> (# State# d, a, c #) -- | Modify the contents of a MutVar#, returning the previous -- contents and the result of applying the given function to the previous -- contents. -- -- Warning: this can fail with an unchecked exception. atomicModifyMutVar_# :: MutVar# d a -> (a -> a) -> State# d -> (# State# d, a, a #) casMutVar# :: MutVar# d a -> a -> a -> State# d -> (# State# d, Int#, a #) catch# :: (State# RealWorld -> (# State# RealWorld, a #)) -> (b -> State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, a #) raise# :: forall b (q :: RuntimeRep) (a :: TYPE q). b -> a raiseIO# :: a -> State# RealWorld -> (# State# RealWorld, b #) maskAsyncExceptions# :: (State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, a #) maskUninterruptible# :: (State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, a #) unmaskAsyncExceptions# :: (State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, a #) getMaskingState# :: State# RealWorld -> (# State# RealWorld, Int# #) atomically# :: (State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, a #) retry# :: State# RealWorld -> (# State# RealWorld, a #) catchRetry# :: (State# RealWorld -> (# State# RealWorld, a #)) -> (State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, a #) catchSTM# :: (State# RealWorld -> (# State# RealWorld, a #)) -> (b -> State# RealWorld -> (# State# RealWorld, a #)) -> State# RealWorld -> (# State# RealWorld, a #) -- | Create a new TVar# holding a specified initial value. newTVar# :: a -> State# d -> (# State# d, TVar# d a #) -- | Read contents of TVar#. Result is not yet evaluated. readTVar# :: TVar# d a -> State# d -> (# State# d, a #) -- | Read contents of TVar# outside an STM transaction readTVarIO# :: TVar# d a -> State# d -> (# State# d, a #) -- | Write contents of TVar#. writeTVar# :: TVar# d a -> a -> State# d -> State# d sameTVar# :: TVar# d a -> TVar# d a -> Int# -- | Create new MVar#; initially empty. newMVar# :: State# d -> (# State# d, MVar# d a #) -- | If MVar# is empty, block until it becomes full. Then remove -- and return its contents, and set it empty. takeMVar# :: MVar# d a -> State# d -> (# State# d, a #) -- | If MVar# is empty, immediately return with integer 0 and -- value undefined. Otherwise, return with integer 1 and contents of -- MVar#, and set MVar# empty. tryTakeMVar# :: MVar# d a -> State# d -> (# State# d, Int#, a #) -- | If MVar# is full, block until it becomes empty. Then store -- value arg as its new contents. putMVar# :: MVar# d a -> a -> State# d -> State# d -- | If MVar# is full, immediately return with integer 0. -- Otherwise, store value arg as MVar#'s new contents, and -- return with integer 1. tryPutMVar# :: MVar# d a -> a -> State# d -> (# State# d, Int# #) -- | If MVar# is empty, block until it becomes full. Then read its -- contents without modifying the MVar, without possibility of -- intervention from other threads. readMVar# :: MVar# d a -> State# d -> (# State# d, a #) -- | If MVar# is empty, immediately return with integer 0 and -- value undefined. Otherwise, return with integer 1 and contents of -- MVar#. tryReadMVar# :: MVar# d a -> State# d -> (# State# d, Int#, a #) sameMVar# :: MVar# d a -> MVar# d a -> Int# -- | Return 1 if MVar# is empty; 0 otherwise. isEmptyMVar# :: MVar# d a -> State# d -> (# State# d, Int# #) -- | Sleep specified number of microseconds. delay# :: Int# -> State# d -> State# d -- | Block until input is available on specified file descriptor. waitRead# :: Int# -> State# d -> State# d -- | Block until output is possible on specified file descriptor. waitWrite# :: Int# -> State# d -> State# d fork# :: a -> State# RealWorld -> (# State# RealWorld, ThreadId# #) forkOn# :: Int# -> a -> State# RealWorld -> (# State# RealWorld, ThreadId# #) killThread# :: ThreadId# -> a -> State# RealWorld -> State# RealWorld yield# :: State# RealWorld -> State# RealWorld myThreadId# :: State# RealWorld -> (# State# RealWorld, ThreadId# #) labelThread# :: ThreadId# -> Addr# -> State# RealWorld -> State# RealWorld isCurrentThreadBound# :: State# RealWorld -> (# State# RealWorld, Int# #) noDuplicate# :: State# d -> State# d threadStatus# :: ThreadId# -> State# RealWorld -> (# State# RealWorld, Int#, Int#, Int# #) -- | mkWeak# k v finalizer s creates a weak reference to value -- k, with an associated reference to some value v. If -- k is still alive then v can be retrieved using -- deRefWeak#. Note that the type of k must be -- represented by a pointer (i.e. of kind TYPE 'LiftedRep or -- TYPE 'UnliftedRep). mkWeak# :: forall (q :: RuntimeRep) (a :: TYPE q) b c. a -> b -> (State# RealWorld -> (# State# RealWorld, c #)) -> State# RealWorld -> (# State# RealWorld, Weak# b #) mkWeakNoFinalizer# :: forall (q :: RuntimeRep) (a :: TYPE q) b. a -> b -> State# RealWorld -> (# State# RealWorld, Weak# b #) -- | addCFinalizerToWeak# fptr ptr flag eptr w attaches a C -- function pointer fptr to a weak pointer w as a -- finalizer. If flag is zero, fptr will be called with -- one argument, ptr. Otherwise, it will be called with two -- arguments, eptr and ptr. -- addCFinalizerToWeak# returns 1 on success, or 0 if w -- is already dead. addCFinalizerToWeak# :: Addr# -> Addr# -> Int# -> Addr# -> Weak# b -> State# RealWorld -> (# State# RealWorld, Int# #) deRefWeak# :: Weak# a -> State# RealWorld -> (# State# RealWorld, Int#, a #) -- | Finalize a weak pointer. The return value is an unboxed tuple -- containing the new state of the world and an "unboxed Maybe", -- represented by an Int# and a (possibly invalid) finalization -- action. An Int# of 1 indicates that the finalizer is -- valid. The return value b from the finalizer should be -- ignored. finalizeWeak# :: Weak# a -> State# RealWorld -> (# State# RealWorld, Int#, State# RealWorld -> (# State# RealWorld, b #) #) makeStablePtr# :: a -> State# RealWorld -> (# State# RealWorld, StablePtr# a #) deRefStablePtr# :: StablePtr# a -> State# RealWorld -> (# State# RealWorld, a #) eqStablePtr# :: StablePtr# a -> StablePtr# a -> Int# makeStableName# :: a -> State# RealWorld -> (# State# RealWorld, StableName# a #) eqStableName# :: StableName# a -> StableName# b -> Int# stableNameToInt# :: StableName# a -> Int# -- | Create a new CNF with a single compact block. The argument is the -- capacity of the compact block (in bytes, not words). The capacity is -- rounded up to a multiple of the allocator block size and is capped to -- one mega block. compactNew# :: Word# -> State# RealWorld -> (# State# RealWorld, Compact# #) -- | Set the new allocation size of the CNF. This value (in bytes) -- determines the capacity of each compact block in the CNF. It does not -- retroactively affect existing compact blocks in the CNF. compactResize# :: Compact# -> Word# -> State# RealWorld -> State# RealWorld -- | Returns 1# if the object is contained in the CNF, 0# otherwise. compactContains# :: Compact# -> a -> State# RealWorld -> (# State# RealWorld, Int# #) -- | Returns 1# if the object is in any CNF at all, 0# otherwise. compactContainsAny# :: a -> State# RealWorld -> (# State# RealWorld, Int# #) -- | Returns the address and the utilized size (in bytes) of the first -- compact block of a CNF. compactGetFirstBlock# :: Compact# -> State# RealWorld -> (# State# RealWorld, Addr#, Word# #) -- | Given a CNF and the address of one its compact blocks, returns the -- next compact block and its utilized size, or nullAddr# if the -- argument was the last compact block in the CNF. compactGetNextBlock# :: Compact# -> Addr# -> State# RealWorld -> (# State# RealWorld, Addr#, Word# #) -- | Attempt to allocate a compact block with the capacity (in bytes) given -- by the first argument. The Addr# is a pointer to previous -- compact block of the CNF or nullAddr# to create a new CNF -- with a single compact block. -- -- The resulting block is not known to the GC until -- compactFixupPointers# is called on it, and care must be taken -- so that the address does not escape or memory will be leaked. compactAllocateBlock# :: Word# -> Addr# -> State# RealWorld -> (# State# RealWorld, Addr# #) -- | Given the pointer to the first block of a CNF and the address of the -- root object in the old address space, fix up the internal pointers -- inside the CNF to account for a different position in memory than when -- it was serialized. This method must be called exactly once after -- importing a serialized CNF. It returns the new CNF and the new -- adjusted root address. compactFixupPointers# :: Addr# -> Addr# -> State# RealWorld -> (# State# RealWorld, Compact#, Addr# #) -- | Recursively add a closure and its transitive closure to a -- Compact# (a CNF), evaluating any unevaluated components at -- the same time. Note: compactAdd# is not thread-safe, so only -- one thread may call compactAdd# with a particular -- Compact# at any given time. The primop does not enforce any -- mutual exclusion; the caller is expected to arrange this. compactAdd# :: Compact# -> a -> State# RealWorld -> (# State# RealWorld, a #) -- | Like compactAdd#, but retains sharing and cycles during -- compaction. compactAddWithSharing# :: Compact# -> a -> State# RealWorld -> (# State# RealWorld, a #) -- | Return the total capacity (in bytes) of all the compact blocks in the -- CNF. compactSize# :: Compact# -> State# RealWorld -> (# State# RealWorld, Word# #) -- | Returns 1# if the given pointers are equal and 0# -- otherwise. -- -- Warning: this can fail with an unchecked exception. reallyUnsafePtrEquality# :: a -> a -> Int# par# :: a -> Int# spark# :: a -> State# d -> (# State# d, a #) seq# :: a -> State# d -> (# State# d, a #) getSpark# :: State# d -> (# State# d, Int#, a #) -- | Returns the number of sparks in the local spark pool. numSparks# :: State# d -> (# State# d, Int# #) dataToTag# :: a -> Int# tagToEnum# :: Int# -> a -- | Convert an Addr# to a followable Any type. addrToAny# :: Addr# -> (# a #) -- | Retrieve the address of any Haskell value. This is essentially an -- unsafeCoerce#, but if implemented as such the core lint pass -- complains and fails to compile. As a primop, it is opaque to core/stg, -- and only appears in cmm (where the copy propagation pass will get rid -- of it). Note that "a" must be a value, not a thunk! It's too late for -- strictness analysis to enforce this, so you're on your own to -- guarantee this. Also note that Addr# is not a GC pointer - up -- to you to guarantee that it does not become a dangling pointer -- immediately after you get it. anyToAddr# :: a -> State# RealWorld -> (# State# RealWorld, Addr# #) -- | Wrap a BCO in a AP_UPD thunk which will be updated with the -- value of the BCO when evaluated. mkApUpd0# :: BCO# -> (# a #) -- | newBCO# instrs lits ptrs arity bitmap creates a new bytecode -- object. The resulting object encodes a function of the given arity -- with the instructions encoded in instrs, and a static -- reference table usage bitmap given by bitmap. newBCO# :: ByteArray# -> ByteArray# -> Array# a -> Int# -> ByteArray# -> State# d -> (# State# d, BCO# #) -- | unpackClosure# closure copies the closure and pointers in the -- payload of the given closure into two new arrays, and returns a -- pointer to the first word of the closure's info table, a non-pointer -- array for the raw bytes of the closure, and a pointer array for the -- pointers in the payload. unpackClosure# :: a -> (# Addr#, ByteArray#, Array# b #) -- | closureSize# closure returns the size of the given closure in -- machine words. closureSize# :: a -> Int# getApStackVal# :: a -> Int# -> (# Int#, b #) getCCSOf# :: a -> State# d -> (# State# d, Addr# #) -- | Returns the current CostCentreStack (value is NULL -- if not profiling). Takes a dummy argument which can be used to avoid -- the call to getCurrentCCS# being floated out by the -- simplifier, which would result in an uninformative stack ("CAF"). getCurrentCCS# :: a -> State# d -> (# State# d, Addr# #) -- | Run the supplied IO action with an empty CCS. For example, this is -- used by the interpreter to run an interpreted computation without the -- call stack showing that it was invoked from GHC. clearCCS# :: (State# d -> (# State# d, a #)) -> State# d -> (# State# d, a #) -- | Emits an event via the RTS tracing framework. The contents of the -- event is the zero-terminated byte string passed as the first argument. -- The event will be emitted either to the .eventlog file, or to -- stderr, depending on the runtime RTS flags. traceEvent# :: Addr# -> State# d -> State# d -- | Emits an event via the RTS tracing framework. The contents of the -- event is the binary object passed as the first argument with the the -- given length passed as the second argument. The event will be emitted -- to the .eventlog file. traceBinaryEvent# :: Addr# -> Int# -> State# d -> State# d -- | Emits a marker event via the RTS tracing framework. The contents of -- the event is the zero-terminated byte string passed as the first -- argument. The event will be emitted either to the .eventlog -- file, or to stderr, depending on the runtime RTS flags. traceMarker# :: Addr# -> State# d -> State# d -- | Sets the allocation counter for the current thread to the given value. setThreadAllocationCounter# :: Int# -> State# RealWorld -> State# RealWorld -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastInt8X16# :: Int# -> Int8X16# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastInt16X8# :: Int# -> Int16X8# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastInt32X4# :: Int# -> Int32X4# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastInt64X2# :: Int# -> Int64X2# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastInt8X32# :: Int# -> Int8X32# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastInt16X16# :: Int# -> Int16X16# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastInt32X8# :: Int# -> Int32X8# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastInt64X4# :: Int# -> Int64X4# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastInt8X64# :: Int# -> Int8X64# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastInt16X32# :: Int# -> Int16X32# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastInt32X16# :: Int# -> Int32X16# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastInt64X8# :: Int# -> Int64X8# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastWord8X16# :: Word# -> Word8X16# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastWord16X8# :: Word# -> Word16X8# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastWord32X4# :: Word# -> Word32X4# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastWord64X2# :: Word# -> Word64X2# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastWord8X32# :: Word# -> Word8X32# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastWord16X16# :: Word# -> Word16X16# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastWord32X8# :: Word# -> Word32X8# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastWord64X4# :: Word# -> Word64X4# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastWord8X64# :: Word# -> Word8X64# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastWord16X32# :: Word# -> Word16X32# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastWord32X16# :: Word# -> Word32X16# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastWord64X8# :: Word# -> Word64X8# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastFloatX4# :: Float# -> FloatX4# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastDoubleX2# :: Double# -> DoubleX2# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastFloatX8# :: Float# -> FloatX8# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastDoubleX4# :: Double# -> DoubleX4# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastFloatX16# :: Float# -> FloatX16# -- | Broadcast a scalar to all elements of a vector. -- -- Warning: this is only available on LLVM. broadcastDoubleX8# :: Double# -> DoubleX8# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packInt8X16# :: (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -> Int8X16# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packInt16X8# :: (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -> Int16X8# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packInt32X4# :: (# Int#, Int#, Int#, Int# #) -> Int32X4# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packInt64X2# :: (# Int#, Int# #) -> Int64X2# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packInt8X32# :: (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -> Int8X32# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packInt16X16# :: (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -> Int16X16# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packInt32X8# :: (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -> Int32X8# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packInt64X4# :: (# Int#, Int#, Int#, Int# #) -> Int64X4# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packInt8X64# :: (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -> Int8X64# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packInt16X32# :: (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -> Int16X32# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packInt32X16# :: (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -> Int32X16# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packInt64X8# :: (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -> Int64X8# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packWord8X16# :: (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -> Word8X16# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packWord16X8# :: (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -> Word16X8# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packWord32X4# :: (# Word#, Word#, Word#, Word# #) -> Word32X4# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packWord64X2# :: (# Word#, Word# #) -> Word64X2# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packWord8X32# :: (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -> Word8X32# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packWord16X16# :: (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -> Word16X16# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packWord32X8# :: (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -> Word32X8# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packWord64X4# :: (# Word#, Word#, Word#, Word# #) -> Word64X4# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packWord8X64# :: (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -> Word8X64# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packWord16X32# :: (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -> Word16X32# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packWord32X16# :: (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -> Word32X16# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packWord64X8# :: (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -> Word64X8# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packFloatX4# :: (# Float#, Float#, Float#, Float# #) -> FloatX4# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packDoubleX2# :: (# Double#, Double# #) -> DoubleX2# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packFloatX8# :: (# Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float# #) -> FloatX8# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packDoubleX4# :: (# Double#, Double#, Double#, Double# #) -> DoubleX4# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packFloatX16# :: (# Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float# #) -> FloatX16# -- | Pack the elements of an unboxed tuple into a vector. -- -- Warning: this is only available on LLVM. packDoubleX8# :: (# Double#, Double#, Double#, Double#, Double#, Double#, Double#, Double# #) -> DoubleX8# -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackInt8X16# :: Int8X16# -> (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackInt16X8# :: Int16X8# -> (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackInt32X4# :: Int32X4# -> (# Int#, Int#, Int#, Int# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackInt64X2# :: Int64X2# -> (# Int#, Int# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackInt8X32# :: Int8X32# -> (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackInt16X16# :: Int16X16# -> (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackInt32X8# :: Int32X8# -> (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackInt64X4# :: Int64X4# -> (# Int#, Int#, Int#, Int# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackInt8X64# :: Int8X64# -> (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackInt16X32# :: Int16X32# -> (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackInt32X16# :: Int32X16# -> (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackInt64X8# :: Int64X8# -> (# Int#, Int#, Int#, Int#, Int#, Int#, Int#, Int# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackWord8X16# :: Word8X16# -> (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackWord16X8# :: Word16X8# -> (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackWord32X4# :: Word32X4# -> (# Word#, Word#, Word#, Word# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackWord64X2# :: Word64X2# -> (# Word#, Word# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackWord8X32# :: Word8X32# -> (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackWord16X16# :: Word16X16# -> (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackWord32X8# :: Word32X8# -> (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackWord64X4# :: Word64X4# -> (# Word#, Word#, Word#, Word# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackWord8X64# :: Word8X64# -> (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackWord16X32# :: Word16X32# -> (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackWord32X16# :: Word32X16# -> (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackWord64X8# :: Word64X8# -> (# Word#, Word#, Word#, Word#, Word#, Word#, Word#, Word# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackFloatX4# :: FloatX4# -> (# Float#, Float#, Float#, Float# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackDoubleX2# :: DoubleX2# -> (# Double#, Double# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackFloatX8# :: FloatX8# -> (# Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackDoubleX4# :: DoubleX4# -> (# Double#, Double#, Double#, Double# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackFloatX16# :: FloatX16# -> (# Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float#, Float# #) -- | Unpack the elements of a vector into an unboxed tuple. # -- -- Warning: this is only available on LLVM. unpackDoubleX8# :: DoubleX8# -> (# Double#, Double#, Double#, Double#, Double#, Double#, Double#, Double# #) -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertInt8X16# :: Int8X16# -> Int# -> Int# -> Int8X16# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertInt16X8# :: Int16X8# -> Int# -> Int# -> Int16X8# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertInt32X4# :: Int32X4# -> Int# -> Int# -> Int32X4# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertInt64X2# :: Int64X2# -> Int# -> Int# -> Int64X2# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertInt8X32# :: Int8X32# -> Int# -> Int# -> Int8X32# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertInt16X16# :: Int16X16# -> Int# -> Int# -> Int16X16# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertInt32X8# :: Int32X8# -> Int# -> Int# -> Int32X8# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertInt64X4# :: Int64X4# -> Int# -> Int# -> Int64X4# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertInt8X64# :: Int8X64# -> Int# -> Int# -> Int8X64# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertInt16X32# :: Int16X32# -> Int# -> Int# -> Int16X32# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertInt32X16# :: Int32X16# -> Int# -> Int# -> Int32X16# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertInt64X8# :: Int64X8# -> Int# -> Int# -> Int64X8# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertWord8X16# :: Word8X16# -> Word# -> Int# -> Word8X16# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertWord16X8# :: Word16X8# -> Word# -> Int# -> Word16X8# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertWord32X4# :: Word32X4# -> Word# -> Int# -> Word32X4# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertWord64X2# :: Word64X2# -> Word# -> Int# -> Word64X2# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertWord8X32# :: Word8X32# -> Word# -> Int# -> Word8X32# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertWord16X16# :: Word16X16# -> Word# -> Int# -> Word16X16# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertWord32X8# :: Word32X8# -> Word# -> Int# -> Word32X8# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertWord64X4# :: Word64X4# -> Word# -> Int# -> Word64X4# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertWord8X64# :: Word8X64# -> Word# -> Int# -> Word8X64# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertWord16X32# :: Word16X32# -> Word# -> Int# -> Word16X32# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertWord32X16# :: Word32X16# -> Word# -> Int# -> Word32X16# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertWord64X8# :: Word64X8# -> Word# -> Int# -> Word64X8# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertFloatX4# :: FloatX4# -> Float# -> Int# -> FloatX4# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertDoubleX2# :: DoubleX2# -> Double# -> Int# -> DoubleX2# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertFloatX8# :: FloatX8# -> Float# -> Int# -> FloatX8# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertDoubleX4# :: DoubleX4# -> Double# -> Int# -> DoubleX4# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertFloatX16# :: FloatX16# -> Float# -> Int# -> FloatX16# -- | Insert a scalar at the given position in a vector. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. insertDoubleX8# :: DoubleX8# -> Double# -> Int# -> DoubleX8# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusInt8X16# :: Int8X16# -> Int8X16# -> Int8X16# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusInt16X8# :: Int16X8# -> Int16X8# -> Int16X8# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusInt32X4# :: Int32X4# -> Int32X4# -> Int32X4# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusInt64X2# :: Int64X2# -> Int64X2# -> Int64X2# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusInt8X32# :: Int8X32# -> Int8X32# -> Int8X32# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusInt16X16# :: Int16X16# -> Int16X16# -> Int16X16# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusInt32X8# :: Int32X8# -> Int32X8# -> Int32X8# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusInt64X4# :: Int64X4# -> Int64X4# -> Int64X4# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusInt8X64# :: Int8X64# -> Int8X64# -> Int8X64# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusInt16X32# :: Int16X32# -> Int16X32# -> Int16X32# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusInt32X16# :: Int32X16# -> Int32X16# -> Int32X16# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusInt64X8# :: Int64X8# -> Int64X8# -> Int64X8# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusWord8X16# :: Word8X16# -> Word8X16# -> Word8X16# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusWord32X4# :: Word32X4# -> Word32X4# -> Word32X4# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusWord64X2# :: Word64X2# -> Word64X2# -> Word64X2# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusWord8X32# :: Word8X32# -> Word8X32# -> Word8X32# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusWord16X16# :: Word16X16# -> Word16X16# -> Word16X16# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusWord32X8# :: Word32X8# -> Word32X8# -> Word32X8# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusWord64X4# :: Word64X4# -> Word64X4# -> Word64X4# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusWord8X64# :: Word8X64# -> Word8X64# -> Word8X64# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusWord16X32# :: Word16X32# -> Word16X32# -> Word16X32# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusWord32X16# :: Word32X16# -> Word32X16# -> Word32X16# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusWord64X8# :: Word64X8# -> Word64X8# -> Word64X8# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusDoubleX2# :: DoubleX2# -> DoubleX2# -> DoubleX2# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusFloatX8# :: FloatX8# -> FloatX8# -> FloatX8# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusDoubleX4# :: DoubleX4# -> DoubleX4# -> DoubleX4# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusFloatX16# :: FloatX16# -> FloatX16# -> FloatX16# -- | Add two vectors element-wise. -- -- Warning: this is only available on LLVM. plusDoubleX8# :: DoubleX8# -> DoubleX8# -> DoubleX8# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusInt8X16# :: Int8X16# -> Int8X16# -> Int8X16# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusInt16X8# :: Int16X8# -> Int16X8# -> Int16X8# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusInt32X4# :: Int32X4# -> Int32X4# -> Int32X4# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusInt64X2# :: Int64X2# -> Int64X2# -> Int64X2# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusInt8X32# :: Int8X32# -> Int8X32# -> Int8X32# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusInt16X16# :: Int16X16# -> Int16X16# -> Int16X16# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusInt32X8# :: Int32X8# -> Int32X8# -> Int32X8# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusInt64X4# :: Int64X4# -> Int64X4# -> Int64X4# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusInt8X64# :: Int8X64# -> Int8X64# -> Int8X64# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusInt16X32# :: Int16X32# -> Int16X32# -> Int16X32# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusInt32X16# :: Int32X16# -> Int32X16# -> Int32X16# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusInt64X8# :: Int64X8# -> Int64X8# -> Int64X8# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusWord8X16# :: Word8X16# -> Word8X16# -> Word8X16# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusWord32X4# :: Word32X4# -> Word32X4# -> Word32X4# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusWord64X2# :: Word64X2# -> Word64X2# -> Word64X2# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusWord8X32# :: Word8X32# -> Word8X32# -> Word8X32# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusWord16X16# :: Word16X16# -> Word16X16# -> Word16X16# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusWord32X8# :: Word32X8# -> Word32X8# -> Word32X8# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusWord64X4# :: Word64X4# -> Word64X4# -> Word64X4# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusWord8X64# :: Word8X64# -> Word8X64# -> Word8X64# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusWord16X32# :: Word16X32# -> Word16X32# -> Word16X32# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusWord32X16# :: Word32X16# -> Word32X16# -> Word32X16# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusWord64X8# :: Word64X8# -> Word64X8# -> Word64X8# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusDoubleX2# :: DoubleX2# -> DoubleX2# -> DoubleX2# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusFloatX8# :: FloatX8# -> FloatX8# -> FloatX8# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusDoubleX4# :: DoubleX4# -> DoubleX4# -> DoubleX4# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusFloatX16# :: FloatX16# -> FloatX16# -> FloatX16# -- | Subtract two vectors element-wise. -- -- Warning: this is only available on LLVM. minusDoubleX8# :: DoubleX8# -> DoubleX8# -> DoubleX8# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesInt8X16# :: Int8X16# -> Int8X16# -> Int8X16# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesInt16X8# :: Int16X8# -> Int16X8# -> Int16X8# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesInt32X4# :: Int32X4# -> Int32X4# -> Int32X4# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesInt64X2# :: Int64X2# -> Int64X2# -> Int64X2# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesInt8X32# :: Int8X32# -> Int8X32# -> Int8X32# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesInt16X16# :: Int16X16# -> Int16X16# -> Int16X16# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesInt32X8# :: Int32X8# -> Int32X8# -> Int32X8# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesInt64X4# :: Int64X4# -> Int64X4# -> Int64X4# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesInt8X64# :: Int8X64# -> Int8X64# -> Int8X64# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesInt16X32# :: Int16X32# -> Int16X32# -> Int16X32# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesInt32X16# :: Int32X16# -> Int32X16# -> Int32X16# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesInt64X8# :: Int64X8# -> Int64X8# -> Int64X8# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesWord8X16# :: Word8X16# -> Word8X16# -> Word8X16# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesWord32X4# :: Word32X4# -> Word32X4# -> Word32X4# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesWord64X2# :: Word64X2# -> Word64X2# -> Word64X2# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesWord8X32# :: Word8X32# -> Word8X32# -> Word8X32# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesWord16X16# :: Word16X16# -> Word16X16# -> Word16X16# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesWord32X8# :: Word32X8# -> Word32X8# -> Word32X8# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesWord64X4# :: Word64X4# -> Word64X4# -> Word64X4# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesWord8X64# :: Word8X64# -> Word8X64# -> Word8X64# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesWord16X32# :: Word16X32# -> Word16X32# -> Word16X32# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesWord32X16# :: Word32X16# -> Word32X16# -> Word32X16# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesWord64X8# :: Word64X8# -> Word64X8# -> Word64X8# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesDoubleX2# :: DoubleX2# -> DoubleX2# -> DoubleX2# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesFloatX8# :: FloatX8# -> FloatX8# -> FloatX8# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesDoubleX4# :: DoubleX4# -> DoubleX4# -> DoubleX4# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesFloatX16# :: FloatX16# -> FloatX16# -> FloatX16# -- | Multiply two vectors element-wise. -- -- Warning: this is only available on LLVM. timesDoubleX8# :: DoubleX8# -> DoubleX8# -> DoubleX8# -- | Divide two vectors element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. divideFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# -- | Divide two vectors element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. divideDoubleX2# :: DoubleX2# -> DoubleX2# -> DoubleX2# -- | Divide two vectors element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. divideFloatX8# :: FloatX8# -> FloatX8# -> FloatX8# -- | Divide two vectors element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. divideDoubleX4# :: DoubleX4# -> DoubleX4# -> DoubleX4# -- | Divide two vectors element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. divideFloatX16# :: FloatX16# -> FloatX16# -> FloatX16# -- | Divide two vectors element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. divideDoubleX8# :: DoubleX8# -> DoubleX8# -> DoubleX8# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotInt8X16# :: Int8X16# -> Int8X16# -> Int8X16# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotInt16X8# :: Int16X8# -> Int16X8# -> Int16X8# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotInt32X4# :: Int32X4# -> Int32X4# -> Int32X4# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotInt64X2# :: Int64X2# -> Int64X2# -> Int64X2# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotInt8X32# :: Int8X32# -> Int8X32# -> Int8X32# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotInt16X16# :: Int16X16# -> Int16X16# -> Int16X16# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotInt32X8# :: Int32X8# -> Int32X8# -> Int32X8# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotInt64X4# :: Int64X4# -> Int64X4# -> Int64X4# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotInt8X64# :: Int8X64# -> Int8X64# -> Int8X64# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotInt16X32# :: Int16X32# -> Int16X32# -> Int16X32# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotInt32X16# :: Int32X16# -> Int32X16# -> Int32X16# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotInt64X8# :: Int64X8# -> Int64X8# -> Int64X8# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotWord8X16# :: Word8X16# -> Word8X16# -> Word8X16# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotWord32X4# :: Word32X4# -> Word32X4# -> Word32X4# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotWord64X2# :: Word64X2# -> Word64X2# -> Word64X2# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotWord8X32# :: Word8X32# -> Word8X32# -> Word8X32# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotWord16X16# :: Word16X16# -> Word16X16# -> Word16X16# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotWord32X8# :: Word32X8# -> Word32X8# -> Word32X8# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotWord64X4# :: Word64X4# -> Word64X4# -> Word64X4# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotWord8X64# :: Word8X64# -> Word8X64# -> Word8X64# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotWord16X32# :: Word16X32# -> Word16X32# -> Word16X32# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotWord32X16# :: Word32X16# -> Word32X16# -> Word32X16# -- | Rounds towards zero element-wise. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. quotWord64X8# :: Word64X8# -> Word64X8# -> Word64X8# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remInt8X16# :: Int8X16# -> Int8X16# -> Int8X16# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remInt16X8# :: Int16X8# -> Int16X8# -> Int16X8# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remInt32X4# :: Int32X4# -> Int32X4# -> Int32X4# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remInt64X2# :: Int64X2# -> Int64X2# -> Int64X2# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remInt8X32# :: Int8X32# -> Int8X32# -> Int8X32# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remInt16X16# :: Int16X16# -> Int16X16# -> Int16X16# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remInt32X8# :: Int32X8# -> Int32X8# -> Int32X8# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remInt64X4# :: Int64X4# -> Int64X4# -> Int64X4# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remInt8X64# :: Int8X64# -> Int8X64# -> Int8X64# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remInt16X32# :: Int16X32# -> Int16X32# -> Int16X32# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remInt32X16# :: Int32X16# -> Int32X16# -> Int32X16# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remInt64X8# :: Int64X8# -> Int64X8# -> Int64X8# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remWord8X16# :: Word8X16# -> Word8X16# -> Word8X16# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remWord32X4# :: Word32X4# -> Word32X4# -> Word32X4# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remWord64X2# :: Word64X2# -> Word64X2# -> Word64X2# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remWord8X32# :: Word8X32# -> Word8X32# -> Word8X32# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remWord16X16# :: Word16X16# -> Word16X16# -> Word16X16# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remWord32X8# :: Word32X8# -> Word32X8# -> Word32X8# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remWord64X4# :: Word64X4# -> Word64X4# -> Word64X4# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remWord8X64# :: Word8X64# -> Word8X64# -> Word8X64# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remWord16X32# :: Word16X32# -> Word16X32# -> Word16X32# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remWord32X16# :: Word32X16# -> Word32X16# -> Word32X16# -- | Satisfies (quot# x y) times# y plus# (rem# x y) == x. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. remWord64X8# :: Word64X8# -> Word64X8# -> Word64X8# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateInt8X16# :: Int8X16# -> Int8X16# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateInt16X8# :: Int16X8# -> Int16X8# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateInt32X4# :: Int32X4# -> Int32X4# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateInt64X2# :: Int64X2# -> Int64X2# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateInt8X32# :: Int8X32# -> Int8X32# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateInt16X16# :: Int16X16# -> Int16X16# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateInt32X8# :: Int32X8# -> Int32X8# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateInt64X4# :: Int64X4# -> Int64X4# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateInt8X64# :: Int8X64# -> Int8X64# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateInt16X32# :: Int16X32# -> Int16X32# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateInt32X16# :: Int32X16# -> Int32X16# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateInt64X8# :: Int64X8# -> Int64X8# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateFloatX4# :: FloatX4# -> FloatX4# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateDoubleX2# :: DoubleX2# -> DoubleX2# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateFloatX8# :: FloatX8# -> FloatX8# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateDoubleX4# :: DoubleX4# -> DoubleX4# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateFloatX16# :: FloatX16# -> FloatX16# -- | Negate element-wise. -- -- Warning: this is only available on LLVM. negateDoubleX8# :: DoubleX8# -> DoubleX8# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt8X16Array# :: ByteArray# -> Int# -> Int8X16# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt16X8Array# :: ByteArray# -> Int# -> Int16X8# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt32X4Array# :: ByteArray# -> Int# -> Int32X4# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt64X2Array# :: ByteArray# -> Int# -> Int64X2# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt8X32Array# :: ByteArray# -> Int# -> Int8X32# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt16X16Array# :: ByteArray# -> Int# -> Int16X16# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt32X8Array# :: ByteArray# -> Int# -> Int32X8# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt64X4Array# :: ByteArray# -> Int# -> Int64X4# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt8X64Array# :: ByteArray# -> Int# -> Int8X64# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt16X32Array# :: ByteArray# -> Int# -> Int16X32# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt32X16Array# :: ByteArray# -> Int# -> Int32X16# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt64X8Array# :: ByteArray# -> Int# -> Int64X8# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord8X16Array# :: ByteArray# -> Int# -> Word8X16# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord16X8Array# :: ByteArray# -> Int# -> Word16X8# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord32X4Array# :: ByteArray# -> Int# -> Word32X4# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord64X2Array# :: ByteArray# -> Int# -> Word64X2# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord8X32Array# :: ByteArray# -> Int# -> Word8X32# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord16X16Array# :: ByteArray# -> Int# -> Word16X16# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord32X8Array# :: ByteArray# -> Int# -> Word32X8# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord64X4Array# :: ByteArray# -> Int# -> Word64X4# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord8X64Array# :: ByteArray# -> Int# -> Word8X64# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord16X32Array# :: ByteArray# -> Int# -> Word16X32# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord32X16Array# :: ByteArray# -> Int# -> Word32X16# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord64X8Array# :: ByteArray# -> Int# -> Word64X8# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexFloatX4Array# :: ByteArray# -> Int# -> FloatX4# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexDoubleX2Array# :: ByteArray# -> Int# -> DoubleX2# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexFloatX8Array# :: ByteArray# -> Int# -> FloatX8# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexDoubleX4Array# :: ByteArray# -> Int# -> DoubleX4# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexFloatX16Array# :: ByteArray# -> Int# -> FloatX16# -- | Read a vector from specified index of immutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexDoubleX8Array# :: ByteArray# -> Int# -> DoubleX8# -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt8X16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int8X16# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt16X8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int16X8# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt32X4Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int32X4# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt64X2Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int64X2# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt8X32Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int8X32# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt16X16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int16X16# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt32X8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int32X8# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt64X4Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int64X4# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt8X64Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int8X64# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt16X32Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int16X32# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt32X16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int32X16# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt64X8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int64X8# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord8X16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word8X16# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord16X8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word16X8# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord32X4Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word32X4# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord64X2Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word64X2# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord8X32Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word8X32# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord16X16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word16X16# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord32X8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word32X8# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord64X4Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word64X4# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord8X64Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word8X64# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord16X32Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word16X32# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord32X16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word32X16# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord64X8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word64X8# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readFloatX4Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, FloatX4# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readDoubleX2Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, DoubleX2# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readFloatX8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, FloatX8# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readDoubleX4Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, DoubleX4# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readFloatX16Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, FloatX16# #) -- | Read a vector from specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readDoubleX8Array# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, DoubleX8# #) -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt8X16Array# :: MutableByteArray# d -> Int# -> Int8X16# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt16X8Array# :: MutableByteArray# d -> Int# -> Int16X8# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt32X4Array# :: MutableByteArray# d -> Int# -> Int32X4# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt64X2Array# :: MutableByteArray# d -> Int# -> Int64X2# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt8X32Array# :: MutableByteArray# d -> Int# -> Int8X32# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt16X16Array# :: MutableByteArray# d -> Int# -> Int16X16# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt32X8Array# :: MutableByteArray# d -> Int# -> Int32X8# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt64X4Array# :: MutableByteArray# d -> Int# -> Int64X4# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt8X64Array# :: MutableByteArray# d -> Int# -> Int8X64# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt16X32Array# :: MutableByteArray# d -> Int# -> Int16X32# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt32X16Array# :: MutableByteArray# d -> Int# -> Int32X16# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt64X8Array# :: MutableByteArray# d -> Int# -> Int64X8# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord8X16Array# :: MutableByteArray# d -> Int# -> Word8X16# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord16X8Array# :: MutableByteArray# d -> Int# -> Word16X8# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord32X4Array# :: MutableByteArray# d -> Int# -> Word32X4# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord64X2Array# :: MutableByteArray# d -> Int# -> Word64X2# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord8X32Array# :: MutableByteArray# d -> Int# -> Word8X32# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord16X16Array# :: MutableByteArray# d -> Int# -> Word16X16# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord32X8Array# :: MutableByteArray# d -> Int# -> Word32X8# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord64X4Array# :: MutableByteArray# d -> Int# -> Word64X4# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord8X64Array# :: MutableByteArray# d -> Int# -> Word8X64# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord16X32Array# :: MutableByteArray# d -> Int# -> Word16X32# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord32X16Array# :: MutableByteArray# d -> Int# -> Word32X16# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord64X8Array# :: MutableByteArray# d -> Int# -> Word64X8# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeFloatX4Array# :: MutableByteArray# d -> Int# -> FloatX4# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeDoubleX2Array# :: MutableByteArray# d -> Int# -> DoubleX2# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeFloatX8Array# :: MutableByteArray# d -> Int# -> FloatX8# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeDoubleX4Array# :: MutableByteArray# d -> Int# -> DoubleX4# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeFloatX16Array# :: MutableByteArray# d -> Int# -> FloatX16# -> State# d -> State# d -- | Write a vector to specified index of mutable array. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeDoubleX8Array# :: MutableByteArray# d -> Int# -> DoubleX8# -> State# d -> State# d -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt8X16OffAddr# :: Addr# -> Int# -> Int8X16# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt16X8OffAddr# :: Addr# -> Int# -> Int16X8# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt32X4OffAddr# :: Addr# -> Int# -> Int32X4# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt64X2OffAddr# :: Addr# -> Int# -> Int64X2# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt8X32OffAddr# :: Addr# -> Int# -> Int8X32# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt16X16OffAddr# :: Addr# -> Int# -> Int16X16# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt32X8OffAddr# :: Addr# -> Int# -> Int32X8# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt64X4OffAddr# :: Addr# -> Int# -> Int64X4# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt8X64OffAddr# :: Addr# -> Int# -> Int8X64# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt16X32OffAddr# :: Addr# -> Int# -> Int16X32# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt32X16OffAddr# :: Addr# -> Int# -> Int32X16# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt64X8OffAddr# :: Addr# -> Int# -> Int64X8# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord8X16OffAddr# :: Addr# -> Int# -> Word8X16# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord16X8OffAddr# :: Addr# -> Int# -> Word16X8# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord32X4OffAddr# :: Addr# -> Int# -> Word32X4# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord64X2OffAddr# :: Addr# -> Int# -> Word64X2# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord8X32OffAddr# :: Addr# -> Int# -> Word8X32# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord16X16OffAddr# :: Addr# -> Int# -> Word16X16# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord32X8OffAddr# :: Addr# -> Int# -> Word32X8# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord64X4OffAddr# :: Addr# -> Int# -> Word64X4# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord8X64OffAddr# :: Addr# -> Int# -> Word8X64# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord16X32OffAddr# :: Addr# -> Int# -> Word16X32# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord32X16OffAddr# :: Addr# -> Int# -> Word32X16# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord64X8OffAddr# :: Addr# -> Int# -> Word64X8# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexFloatX4OffAddr# :: Addr# -> Int# -> FloatX4# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexDoubleX2OffAddr# :: Addr# -> Int# -> DoubleX2# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexFloatX8OffAddr# :: Addr# -> Int# -> FloatX8# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexDoubleX4OffAddr# :: Addr# -> Int# -> DoubleX4# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexFloatX16OffAddr# :: Addr# -> Int# -> FloatX16# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexDoubleX8OffAddr# :: Addr# -> Int# -> DoubleX8# -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt8X16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int8X16# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt16X8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int16X8# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt32X4OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int32X4# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt64X2OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int64X2# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt8X32OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int8X32# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt16X16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int16X16# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt32X8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int32X8# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt64X4OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int64X4# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt8X64OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int8X64# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt16X32OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int16X32# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt32X16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int32X16# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt64X8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Int64X8# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord8X16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word8X16# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord16X8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word16X8# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord32X4OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word32X4# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord64X2OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word64X2# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord8X32OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word8X32# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord16X16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word16X16# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord32X8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word32X8# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord64X4OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word64X4# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord8X64OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word8X64# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord16X32OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word16X32# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord32X16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word32X16# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord64X8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, Word64X8# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readFloatX4OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, FloatX4# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readDoubleX2OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, DoubleX2# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readFloatX8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, FloatX8# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readDoubleX4OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, DoubleX4# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readFloatX16OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, FloatX16# #) -- | Reads vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readDoubleX8OffAddr# :: Addr# -> Int# -> State# d -> (# State# d, DoubleX8# #) -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt8X16OffAddr# :: Addr# -> Int# -> Int8X16# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt16X8OffAddr# :: Addr# -> Int# -> Int16X8# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt32X4OffAddr# :: Addr# -> Int# -> Int32X4# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt64X2OffAddr# :: Addr# -> Int# -> Int64X2# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt8X32OffAddr# :: Addr# -> Int# -> Int8X32# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt16X16OffAddr# :: Addr# -> Int# -> Int16X16# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt32X8OffAddr# :: Addr# -> Int# -> Int32X8# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt64X4OffAddr# :: Addr# -> Int# -> Int64X4# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt8X64OffAddr# :: Addr# -> Int# -> Int8X64# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt16X32OffAddr# :: Addr# -> Int# -> Int16X32# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt32X16OffAddr# :: Addr# -> Int# -> Int32X16# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt64X8OffAddr# :: Addr# -> Int# -> Int64X8# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord8X16OffAddr# :: Addr# -> Int# -> Word8X16# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord16X8OffAddr# :: Addr# -> Int# -> Word16X8# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord32X4OffAddr# :: Addr# -> Int# -> Word32X4# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord64X2OffAddr# :: Addr# -> Int# -> Word64X2# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord8X32OffAddr# :: Addr# -> Int# -> Word8X32# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord16X16OffAddr# :: Addr# -> Int# -> Word16X16# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord32X8OffAddr# :: Addr# -> Int# -> Word32X8# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord64X4OffAddr# :: Addr# -> Int# -> Word64X4# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord8X64OffAddr# :: Addr# -> Int# -> Word8X64# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord16X32OffAddr# :: Addr# -> Int# -> Word16X32# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord32X16OffAddr# :: Addr# -> Int# -> Word32X16# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord64X8OffAddr# :: Addr# -> Int# -> Word64X8# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeFloatX4OffAddr# :: Addr# -> Int# -> FloatX4# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeDoubleX2OffAddr# :: Addr# -> Int# -> DoubleX2# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeFloatX8OffAddr# :: Addr# -> Int# -> FloatX8# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeDoubleX4OffAddr# :: Addr# -> Int# -> DoubleX4# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeFloatX16OffAddr# :: Addr# -> Int# -> FloatX16# -> State# d -> State# d -- | Write vector; offset in bytes. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeDoubleX8OffAddr# :: Addr# -> Int# -> DoubleX8# -> State# d -> State# d -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt8ArrayAsInt8X16# :: ByteArray# -> Int# -> Int8X16# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt16ArrayAsInt16X8# :: ByteArray# -> Int# -> Int16X8# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt32ArrayAsInt32X4# :: ByteArray# -> Int# -> Int32X4# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt64ArrayAsInt64X2# :: ByteArray# -> Int# -> Int64X2# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt8ArrayAsInt8X32# :: ByteArray# -> Int# -> Int8X32# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt16ArrayAsInt16X16# :: ByteArray# -> Int# -> Int16X16# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt32ArrayAsInt32X8# :: ByteArray# -> Int# -> Int32X8# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt64ArrayAsInt64X4# :: ByteArray# -> Int# -> Int64X4# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt8ArrayAsInt8X64# :: ByteArray# -> Int# -> Int8X64# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt16ArrayAsInt16X32# :: ByteArray# -> Int# -> Int16X32# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt32ArrayAsInt32X16# :: ByteArray# -> Int# -> Int32X16# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt64ArrayAsInt64X8# :: ByteArray# -> Int# -> Int64X8# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord8ArrayAsWord8X16# :: ByteArray# -> Int# -> Word8X16# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord16ArrayAsWord16X8# :: ByteArray# -> Int# -> Word16X8# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord32ArrayAsWord32X4# :: ByteArray# -> Int# -> Word32X4# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord64ArrayAsWord64X2# :: ByteArray# -> Int# -> Word64X2# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord8ArrayAsWord8X32# :: ByteArray# -> Int# -> Word8X32# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord16ArrayAsWord16X16# :: ByteArray# -> Int# -> Word16X16# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord32ArrayAsWord32X8# :: ByteArray# -> Int# -> Word32X8# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord64ArrayAsWord64X4# :: ByteArray# -> Int# -> Word64X4# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord8ArrayAsWord8X64# :: ByteArray# -> Int# -> Word8X64# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord16ArrayAsWord16X32# :: ByteArray# -> Int# -> Word16X32# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord32ArrayAsWord32X16# :: ByteArray# -> Int# -> Word32X16# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord64ArrayAsWord64X8# :: ByteArray# -> Int# -> Word64X8# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexFloatArrayAsFloatX4# :: ByteArray# -> Int# -> FloatX4# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexDoubleArrayAsDoubleX2# :: ByteArray# -> Int# -> DoubleX2# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexFloatArrayAsFloatX8# :: ByteArray# -> Int# -> FloatX8# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexDoubleArrayAsDoubleX4# :: ByteArray# -> Int# -> DoubleX4# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexFloatArrayAsFloatX16# :: ByteArray# -> Int# -> FloatX16# -- | Read a vector from specified index of immutable array of scalars; -- offset is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexDoubleArrayAsDoubleX8# :: ByteArray# -> Int# -> DoubleX8# -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt8ArrayAsInt8X16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int8X16# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt16ArrayAsInt16X8# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int16X8# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt32ArrayAsInt32X4# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int32X4# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt64ArrayAsInt64X2# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int64X2# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt8ArrayAsInt8X32# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int8X32# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt16ArrayAsInt16X16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int16X16# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt32ArrayAsInt32X8# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int32X8# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt64ArrayAsInt64X4# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int64X4# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt8ArrayAsInt8X64# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int8X64# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt16ArrayAsInt16X32# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int16X32# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt32ArrayAsInt32X16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int32X16# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt64ArrayAsInt64X8# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Int64X8# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord8ArrayAsWord8X16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word8X16# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord16ArrayAsWord16X8# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word16X8# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord32ArrayAsWord32X4# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word32X4# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord64ArrayAsWord64X2# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word64X2# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord8ArrayAsWord8X32# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word8X32# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord16ArrayAsWord16X16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word16X16# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord32ArrayAsWord32X8# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word32X8# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord64ArrayAsWord64X4# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word64X4# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord8ArrayAsWord8X64# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word8X64# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord16ArrayAsWord16X32# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word16X32# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord32ArrayAsWord32X16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word32X16# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord64ArrayAsWord64X8# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word64X8# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readFloatArrayAsFloatX4# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, FloatX4# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readDoubleArrayAsDoubleX2# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, DoubleX2# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readFloatArrayAsFloatX8# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, FloatX8# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readDoubleArrayAsDoubleX4# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, DoubleX4# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readFloatArrayAsFloatX16# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, FloatX16# #) -- | Read a vector from specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readDoubleArrayAsDoubleX8# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, DoubleX8# #) -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt8ArrayAsInt8X16# :: MutableByteArray# d -> Int# -> Int8X16# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt16ArrayAsInt16X8# :: MutableByteArray# d -> Int# -> Int16X8# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt32ArrayAsInt32X4# :: MutableByteArray# d -> Int# -> Int32X4# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt64ArrayAsInt64X2# :: MutableByteArray# d -> Int# -> Int64X2# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt8ArrayAsInt8X32# :: MutableByteArray# d -> Int# -> Int8X32# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt16ArrayAsInt16X16# :: MutableByteArray# d -> Int# -> Int16X16# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt32ArrayAsInt32X8# :: MutableByteArray# d -> Int# -> Int32X8# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt64ArrayAsInt64X4# :: MutableByteArray# d -> Int# -> Int64X4# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt8ArrayAsInt8X64# :: MutableByteArray# d -> Int# -> Int8X64# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt16ArrayAsInt16X32# :: MutableByteArray# d -> Int# -> Int16X32# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt32ArrayAsInt32X16# :: MutableByteArray# d -> Int# -> Int32X16# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt64ArrayAsInt64X8# :: MutableByteArray# d -> Int# -> Int64X8# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord8ArrayAsWord8X16# :: MutableByteArray# d -> Int# -> Word8X16# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord16ArrayAsWord16X8# :: MutableByteArray# d -> Int# -> Word16X8# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord32ArrayAsWord32X4# :: MutableByteArray# d -> Int# -> Word32X4# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord64ArrayAsWord64X2# :: MutableByteArray# d -> Int# -> Word64X2# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord8ArrayAsWord8X32# :: MutableByteArray# d -> Int# -> Word8X32# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord16ArrayAsWord16X16# :: MutableByteArray# d -> Int# -> Word16X16# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord32ArrayAsWord32X8# :: MutableByteArray# d -> Int# -> Word32X8# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord64ArrayAsWord64X4# :: MutableByteArray# d -> Int# -> Word64X4# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord8ArrayAsWord8X64# :: MutableByteArray# d -> Int# -> Word8X64# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord16ArrayAsWord16X32# :: MutableByteArray# d -> Int# -> Word16X32# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord32ArrayAsWord32X16# :: MutableByteArray# d -> Int# -> Word32X16# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord64ArrayAsWord64X8# :: MutableByteArray# d -> Int# -> Word64X8# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeFloatArrayAsFloatX4# :: MutableByteArray# d -> Int# -> FloatX4# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeDoubleArrayAsDoubleX2# :: MutableByteArray# d -> Int# -> DoubleX2# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeFloatArrayAsFloatX8# :: MutableByteArray# d -> Int# -> FloatX8# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeDoubleArrayAsDoubleX4# :: MutableByteArray# d -> Int# -> DoubleX4# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeFloatArrayAsFloatX16# :: MutableByteArray# d -> Int# -> FloatX16# -> State# d -> State# d -- | Write a vector to specified index of mutable array of scalars; offset -- is in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeDoubleArrayAsDoubleX8# :: MutableByteArray# d -> Int# -> DoubleX8# -> State# d -> State# d -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt8OffAddrAsInt8X16# :: Addr# -> Int# -> Int8X16# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt16OffAddrAsInt16X8# :: Addr# -> Int# -> Int16X8# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt32OffAddrAsInt32X4# :: Addr# -> Int# -> Int32X4# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt64OffAddrAsInt64X2# :: Addr# -> Int# -> Int64X2# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt8OffAddrAsInt8X32# :: Addr# -> Int# -> Int8X32# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt16OffAddrAsInt16X16# :: Addr# -> Int# -> Int16X16# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt32OffAddrAsInt32X8# :: Addr# -> Int# -> Int32X8# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt64OffAddrAsInt64X4# :: Addr# -> Int# -> Int64X4# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt8OffAddrAsInt8X64# :: Addr# -> Int# -> Int8X64# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt16OffAddrAsInt16X32# :: Addr# -> Int# -> Int16X32# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt32OffAddrAsInt32X16# :: Addr# -> Int# -> Int32X16# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexInt64OffAddrAsInt64X8# :: Addr# -> Int# -> Int64X8# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord8OffAddrAsWord8X16# :: Addr# -> Int# -> Word8X16# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord16OffAddrAsWord16X8# :: Addr# -> Int# -> Word16X8# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord32OffAddrAsWord32X4# :: Addr# -> Int# -> Word32X4# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord64OffAddrAsWord64X2# :: Addr# -> Int# -> Word64X2# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord8OffAddrAsWord8X32# :: Addr# -> Int# -> Word8X32# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord16OffAddrAsWord16X16# :: Addr# -> Int# -> Word16X16# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord32OffAddrAsWord32X8# :: Addr# -> Int# -> Word32X8# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord64OffAddrAsWord64X4# :: Addr# -> Int# -> Word64X4# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord8OffAddrAsWord8X64# :: Addr# -> Int# -> Word8X64# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord16OffAddrAsWord16X32# :: Addr# -> Int# -> Word16X32# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord32OffAddrAsWord32X16# :: Addr# -> Int# -> Word32X16# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexWord64OffAddrAsWord64X8# :: Addr# -> Int# -> Word64X8# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexFloatOffAddrAsFloatX4# :: Addr# -> Int# -> FloatX4# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexDoubleOffAddrAsDoubleX2# :: Addr# -> Int# -> DoubleX2# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexFloatOffAddrAsFloatX8# :: Addr# -> Int# -> FloatX8# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexDoubleOffAddrAsDoubleX4# :: Addr# -> Int# -> DoubleX4# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexFloatOffAddrAsFloatX16# :: Addr# -> Int# -> FloatX16# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. indexDoubleOffAddrAsDoubleX8# :: Addr# -> Int# -> DoubleX8# -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt8OffAddrAsInt8X16# :: Addr# -> Int# -> State# d -> (# State# d, Int8X16# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt16OffAddrAsInt16X8# :: Addr# -> Int# -> State# d -> (# State# d, Int16X8# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt32OffAddrAsInt32X4# :: Addr# -> Int# -> State# d -> (# State# d, Int32X4# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt64OffAddrAsInt64X2# :: Addr# -> Int# -> State# d -> (# State# d, Int64X2# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt8OffAddrAsInt8X32# :: Addr# -> Int# -> State# d -> (# State# d, Int8X32# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt16OffAddrAsInt16X16# :: Addr# -> Int# -> State# d -> (# State# d, Int16X16# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt32OffAddrAsInt32X8# :: Addr# -> Int# -> State# d -> (# State# d, Int32X8# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt64OffAddrAsInt64X4# :: Addr# -> Int# -> State# d -> (# State# d, Int64X4# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt8OffAddrAsInt8X64# :: Addr# -> Int# -> State# d -> (# State# d, Int8X64# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt16OffAddrAsInt16X32# :: Addr# -> Int# -> State# d -> (# State# d, Int16X32# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt32OffAddrAsInt32X16# :: Addr# -> Int# -> State# d -> (# State# d, Int32X16# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readInt64OffAddrAsInt64X8# :: Addr# -> Int# -> State# d -> (# State# d, Int64X8# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord8OffAddrAsWord8X16# :: Addr# -> Int# -> State# d -> (# State# d, Word8X16# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord16OffAddrAsWord16X8# :: Addr# -> Int# -> State# d -> (# State# d, Word16X8# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord32OffAddrAsWord32X4# :: Addr# -> Int# -> State# d -> (# State# d, Word32X4# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord64OffAddrAsWord64X2# :: Addr# -> Int# -> State# d -> (# State# d, Word64X2# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord8OffAddrAsWord8X32# :: Addr# -> Int# -> State# d -> (# State# d, Word8X32# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord16OffAddrAsWord16X16# :: Addr# -> Int# -> State# d -> (# State# d, Word16X16# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord32OffAddrAsWord32X8# :: Addr# -> Int# -> State# d -> (# State# d, Word32X8# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord64OffAddrAsWord64X4# :: Addr# -> Int# -> State# d -> (# State# d, Word64X4# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord8OffAddrAsWord8X64# :: Addr# -> Int# -> State# d -> (# State# d, Word8X64# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord16OffAddrAsWord16X32# :: Addr# -> Int# -> State# d -> (# State# d, Word16X32# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord32OffAddrAsWord32X16# :: Addr# -> Int# -> State# d -> (# State# d, Word32X16# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readWord64OffAddrAsWord64X8# :: Addr# -> Int# -> State# d -> (# State# d, Word64X8# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readFloatOffAddrAsFloatX4# :: Addr# -> Int# -> State# d -> (# State# d, FloatX4# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readDoubleOffAddrAsDoubleX2# :: Addr# -> Int# -> State# d -> (# State# d, DoubleX2# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readFloatOffAddrAsFloatX8# :: Addr# -> Int# -> State# d -> (# State# d, FloatX8# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readDoubleOffAddrAsDoubleX4# :: Addr# -> Int# -> State# d -> (# State# d, DoubleX4# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readFloatOffAddrAsFloatX16# :: Addr# -> Int# -> State# d -> (# State# d, FloatX16# #) -- | Reads vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. readDoubleOffAddrAsDoubleX8# :: Addr# -> Int# -> State# d -> (# State# d, DoubleX8# #) -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt8OffAddrAsInt8X16# :: Addr# -> Int# -> Int8X16# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt16OffAddrAsInt16X8# :: Addr# -> Int# -> Int16X8# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt32OffAddrAsInt32X4# :: Addr# -> Int# -> Int32X4# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt64OffAddrAsInt64X2# :: Addr# -> Int# -> Int64X2# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt8OffAddrAsInt8X32# :: Addr# -> Int# -> Int8X32# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt16OffAddrAsInt16X16# :: Addr# -> Int# -> Int16X16# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt32OffAddrAsInt32X8# :: Addr# -> Int# -> Int32X8# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt64OffAddrAsInt64X4# :: Addr# -> Int# -> Int64X4# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt8OffAddrAsInt8X64# :: Addr# -> Int# -> Int8X64# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt16OffAddrAsInt16X32# :: Addr# -> Int# -> Int16X32# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt32OffAddrAsInt32X16# :: Addr# -> Int# -> Int32X16# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeInt64OffAddrAsInt64X8# :: Addr# -> Int# -> Int64X8# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord8OffAddrAsWord8X16# :: Addr# -> Int# -> Word8X16# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord16OffAddrAsWord16X8# :: Addr# -> Int# -> Word16X8# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord32OffAddrAsWord32X4# :: Addr# -> Int# -> Word32X4# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord64OffAddrAsWord64X2# :: Addr# -> Int# -> Word64X2# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord8OffAddrAsWord8X32# :: Addr# -> Int# -> Word8X32# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord16OffAddrAsWord16X16# :: Addr# -> Int# -> Word16X16# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord32OffAddrAsWord32X8# :: Addr# -> Int# -> Word32X8# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord64OffAddrAsWord64X4# :: Addr# -> Int# -> Word64X4# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord8OffAddrAsWord8X64# :: Addr# -> Int# -> Word8X64# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord16OffAddrAsWord16X32# :: Addr# -> Int# -> Word16X32# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord32OffAddrAsWord32X16# :: Addr# -> Int# -> Word32X16# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeWord64OffAddrAsWord64X8# :: Addr# -> Int# -> Word64X8# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeFloatOffAddrAsFloatX4# :: Addr# -> Int# -> FloatX4# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeDoubleOffAddrAsDoubleX2# :: Addr# -> Int# -> DoubleX2# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeFloatOffAddrAsFloatX8# :: Addr# -> Int# -> FloatX8# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeDoubleOffAddrAsDoubleX4# :: Addr# -> Int# -> DoubleX4# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeFloatOffAddrAsFloatX16# :: Addr# -> Int# -> FloatX16# -> State# d -> State# d -- | Write vector; offset in scalar elements. -- -- Warning: this is only available on LLVM and can fail -- with an unchecked exception. writeDoubleOffAddrAsDoubleX8# :: Addr# -> Int# -> DoubleX8# -> State# d -> State# d prefetchByteArray3# :: ByteArray# -> Int# -> State# d -> State# d prefetchMutableByteArray3# :: MutableByteArray# d -> Int# -> State# d -> State# d prefetchAddr3# :: Addr# -> Int# -> State# d -> State# d prefetchValue3# :: a -> State# d -> State# d prefetchByteArray2# :: ByteArray# -> Int# -> State# d -> State# d prefetchMutableByteArray2# :: MutableByteArray# d -> Int# -> State# d -> State# d prefetchAddr2# :: Addr# -> Int# -> State# d -> State# d prefetchValue2# :: a -> State# d -> State# d prefetchByteArray1# :: ByteArray# -> Int# -> State# d -> State# d prefetchMutableByteArray1# :: MutableByteArray# d -> Int# -> State# d -> State# d prefetchAddr1# :: Addr# -> Int# -> State# d -> State# d prefetchValue1# :: a -> State# d -> State# d prefetchByteArray0# :: ByteArray# -> Int# -> State# d -> State# d prefetchMutableByteArray0# :: MutableByteArray# d -> Int# -> State# d -> State# d prefetchAddr0# :: Addr# -> Int# -> State# d -> State# d prefetchValue0# :: a -> State# d -> State# d type WORD64 = Word# type INT64 = Int# -- | Retrieves the allocation counter for the current thread. getThreadAllocationCounter# :: State# RealWorld -> (# State# RealWorld, INT64 #) -- | Resize a mutable array to new specified size. The returned -- SmallMutableArray# is either the original -- SmallMutableArray# resized in-place or, if not possible, a -- newly allocated SmallMutableArray# with the original content -- copied over. -- -- To avoid undefined behaviour, the original SmallMutableArray# -- shall not be accessed anymore after a resizeSmallMutableArray# -- has been performed. Moreover, no reference to the old one should be -- kept in order to allow garbage collection of the original -- SmallMutableArray# in case a new SmallMutableArray# had -- to be allocated. resizeSmallMutableArray# :: SmallMutableArray# s a -> Int# -> a -> State# s -> (# State# s, SmallMutableArray# s a #) -- | An implementation of the old atomicModifyMutVar# primop in -- terms of the new atomicModifyMutVar2# primop, for backwards -- compatibility. The type of this function is a bit bogus. It's best to -- think of it as having type -- --
-- atomicModifyMutVar# -- :: MutVar# s a -- -> (a -> (a, b)) -- -> State# s -- -> ( s, b #) ---- -- but there may be code that uses this with other two-field record -- types. atomicModifyMutVar# :: MutVar# s a -> (a -> b) -> State# s -> (# State# s, c #) traceEvent :: String -> IO () -- | The sortWith function sorts a list of elements using the user -- supplied function to project something out of each element sortWith :: Ord b => (a -> b) -> [a] -> [a] -- | the ensures that all the elements of the list are identical and -- then returns that unique element the :: Eq a => [a] -> a maxTupleSize :: Int data SpecConstrAnnotation NoSpecConstr :: SpecConstrAnnotation ForceSpecConstr :: SpecConstrAnnotation -- | The Item type function returns the type of items of the -- structure l. type family Item l -- | The Down type allows you to reverse sort order conveniently. A -- value of type Down a contains a value of type -- a (represented as Down a). If a has -- an Ord instance associated with it then comparing two -- values thus wrapped will give you the opposite of their normal sort -- order. This is particularly useful when sorting in generalised list -- comprehensions, as in: then sortWith by Down x newtype Down a Down :: a -> Down a [getDown] :: Down a -> a uncheckedIShiftRA64# :: Int# -> Int# -> Int# uncheckedIShiftL64# :: Int# -> Int# -> Int# uncheckedShiftRL64# :: Word# -> Int# -> Word# uncheckedShiftL64# :: Word# -> Int# -> Word# -- | Returns a [String] representing the current call stack. This -- can be useful for debugging. -- -- The implementation uses the call-stack simulation maintained by the -- profiler, so it only works if the program was compiled with -- -prof and contains suitable SCC annotations (e.g. by using -- -fprof-auto). Otherwise, the list returned is likely to be -- empty or uninformative. currentCallStack :: IO [String] -- | Shift the argument right (unsigned) by the specified number of bits -- (which must be non-negative). The RL means "right, logical" (as -- opposed to RA for arithmetic) iShiftRL# :: Int# -> Int# -> Int# -- | Shift the argument right (signed) by the specified number of bits -- (which must be non-negative). The RA means "right, arithmetic" -- (as opposed to RL for logical) iShiftRA# :: Int# -> Int# -> Int# -- | Shift the argument left by the specified number of bits (which must be -- non-negative). iShiftL# :: Int# -> Int# -> Int# -- | Shift the argument right by the specified number of bits (which must -- be non-negative). The RL means "right, logical" (as opposed to -- RA for arithmetic) (although an arithmetic right shift wouldn't make -- sense for Word#) shiftRL# :: Word# -> Int# -> Word# -- | Shift the argument left by the specified number of bits (which must be -- non-negative). shiftL# :: Word# -> Int# -> Word# -- | Alias for tagToEnum#. Returns True if its parameter is 1# and -- False if it is 0#. isTrue# :: Int# -> Bool module Data.Prim.Class -- | Invariants: -- --
-- runST (writeSTRef _|_ v >>= f) = _|_ --data ST s a -- | Return the value computed by a state thread. The forall -- ensures that the internal state used by the ST computation is -- inaccessible to the rest of the program. runST :: (forall s. () => ST s a) -> a -- | Helper function that converts a type into a string showsType :: Typeable t => proxy t -> ShowS -- | Get the size of the data type in bytes. Argument is not evaluated. -- --
-- >>> import Data.Prim
--
-- >>> byteCount (Just 'a')
-- Count {unCount = 5}
--
byteCount :: forall e. Prim e => e -> Count Word8
-- | Same as sizeOf, except that the type can be supplied as a
-- type level argument
--
--
-- >>> :set -XTypeApplications
--
-- >>> import Data.Prim
--
-- >>> byteCountType @Int64
-- Count {unCount = 8}
--
byteCountType :: forall e. Prim e => Count Word8
-- | Same as byteCount, but argument is a Proxy of
-- e, instead of the type itself.
--
--
-- >>> import Data.Prim
--
-- >>> import Data.Proxy
--
-- >>> byteCountProxy (Proxy :: Proxy Int64)
-- Count {unCount = 8}
--
byteCountProxy :: forall proxy e. Prim e => proxy e -> Count Word8
-- | Get the alignemnt of the type in bytes. Argument is not evaluated.
alignment :: forall e. Prim e => e -> Int
-- | Same as alignment, except that the type can be supplied with
-- TypeApplications
--
-- -- >>> :set -XTypeApplications -- -- >>> import Data.Prim -- -- >>> alignmentType @Int32 -- 4 --alignmentType :: forall e. Prim e => Int -- | Same as alignment, but argument is a Proxy of -- a, instead of the type itself. -- --
-- >>> import Data.Proxy -- -- >>> alignmentProxy (Proxy :: Proxy Int64) -- 8 --alignmentProxy :: forall proxy e. Prim e => proxy e -> Int -- | Number of elements newtype Count e Count :: Int -> Count e [unCount] :: Count e -> Int -- | Covert an element count to number of bytes it coresponds to as an -- Int. See toByteCount for preserving the Count -- wrapper. unCountBytes :: Prim e => Count e -> Int -- | Covert to the Count of bytes toByteCount :: Prim e => Count e -> Count Word8 unCountBytes# :: Prim e => Count e -> Int# -- | Compute how many elements of type e can fit in the supplied -- number of bytes. fromByteCount :: forall e. Prim e => Count Word8 -> Count e fromByteCountRem :: forall e. Prim e => Count Word8 -> (Count e, Count Word8) -- | Cast a count to an offset of the same type countToOff :: Count e -> Off e countToByteOff :: Prim e => Count e -> Off Word8 -- | Restrict type argument of Count to the same type as the second -- argument, which itself is not evaluated countForType :: Count e -> e -> Count e -- | Helper noop function that restricts Count to the type of proxy countForProxyTypeOf :: Count e -> proxy e -> Count e -- | Offset in number of elements newtype Off e Off :: Int -> Off e [unOff] :: Off e -> Int -- | Convert an offset for some type e with Prim instance -- to the number of bytes as an Int. -- --
-- >>> unOffBytes (10 :: Off Word64) -- 80 --unOffBytes :: Prim e => Off e -> Int -- | Compute byte offset from an offset of Prim type -- --
-- >>> toByteOff (10 :: Off Word64)
-- Off {unOff = 80}
--
toByteOff :: Prim e => Off e -> Off Word8
-- | Convert offset of some type into number of bytes
unOffBytes# :: Prim e => Off e -> Int#
fromByteOff :: forall e. Prim e => Off Word8 -> Off e
fromByteOffRem :: forall e. Prim e => Off Word8 -> (Off e, Off Word8)
-- | Cast an offset to count. Useful for dealing with regions.
--
--
-- >>> import Data.Prim
--
-- >>> let totalCount = Count 10 :: Count Word
--
-- >>> let startOffset = Off 4 :: Off Word
--
-- >>> totalCount - offToCount startOffset
-- Count {unCount = 6}
--
offToCount :: Off e -> Count e
-- | Convert an offset in elements to count in bytres.
offToByteCount :: Prim e => Off e -> Count Word8
-- | Restrict type argument of Off to the same type as the second
-- argument, which itself is not evaluated
offForType :: Off e -> e -> Off e
-- | Helper noop function that restricts Offset to the type of proxy
offForProxyTypeOf :: Off e -> proxy e -> Off e
prefetchValue0 :: MonadPrim s m => a -> m ()
prefetchValue1 :: MonadPrim s m => a -> m ()
prefetchValue2 :: MonadPrim s m => a -> m ()
prefetchValue3 :: MonadPrim s m => a -> m ()
-- | A value of type Ptr a represents a pointer to an
-- object, or an array of objects, which may be marshalled to or from
-- Haskell values of type a.
--
-- The type a will often be an instance of class Storable
-- which provides the marshalling operations. However this is not
-- essential, and you can provide your own operations to access the
-- pointer. For example you might write small foreign functions to get or
-- set the fields of a C struct.
data Ptr a
-- | The type ForeignPtr represents references to objects that are
-- maintained in a foreign language, i.e., that are not part of the data
-- structures usually managed by the Haskell storage manager. The
-- essential difference between ForeignPtrs and vanilla memory
-- references of type Ptr a is that the former may be associated
-- with finalizers. A finalizer is a routine that is invoked when
-- the Haskell storage manager detects that - within the Haskell heap and
-- stack - there are no more references left that are pointing to the
-- ForeignPtr. Typically, the finalizer will, then, invoke
-- routines in the foreign language that free the resources bound by the
-- foreign object.
--
-- The ForeignPtr is parameterised in the same way as Ptr.
-- The type argument of ForeignPtr should normally be an instance
-- of class Storable.
data ForeignPtr a
-- | The class Typeable allows a concrete representation of a type
-- to be calculated.
class Typeable (a :: k)
-- | Proxy is a type that holds no data, but has a phantom parameter
-- of arbitrary type (or even kind). Its use is to provide type
-- information, even though there is no value available of that type (or
-- it may be too costly to create one).
--
-- Historically, Proxy :: Proxy a is a safer
-- alternative to the undefined :: a idiom.
--
-- -- >>> Proxy :: Proxy (Void, Int -> Int) -- Proxy ---- -- Proxy can even hold types of higher kinds, -- --
-- >>> Proxy :: Proxy Either -- Proxy ---- --
-- >>> Proxy :: Proxy Functor -- Proxy ---- --
-- >>> Proxy :: Proxy complicatedStructure -- Proxy --data Proxy (t :: k) Proxy :: Proxy (t :: k) -- | Coerce result of a function (it is also a hidden function in -- Data.Functor.Utils) (#.) :: forall a b c proxy. Coercible b c => proxy b c -> (a -> b) -> a -> c -- | Coerce result of a function. Flipped version of (#.) (.#) :: forall a b c proxy. Coercible b c => (a -> b) -> proxy b c -> a -> c -- | The class of monoids (types with an associative binary operation that -- has an identity). Instances should satisfy the following: -- --
-- >>> "Hello world" <> mempty -- "Hello world" --mempty :: Monoid a => a -- | An associative operation -- -- NOTE: This method is redundant and has the default -- implementation mappend = (<>) since -- base-4.11.0.0. Should it be implemented manually, since -- mappend is a synonym for (<>), it is expected that -- the two functions are defined the same way. In a future GHC release -- mappend will be removed from Monoid. mappend :: Monoid a => a -> a -> a -- | Fold a list using the monoid. -- -- For most types, the default definition for mconcat will be -- used, but the function is included in the class definition so that an -- optimized version can be provided for specific types. -- --
-- >>> mconcat ["Hello", " ", "Haskell", "!"] -- "Hello Haskell!" --mconcat :: Monoid a => [a] -> a -- | This data type witnesses the lifting of a Monoid into an -- Applicative pointwise. newtype Ap (f :: k -> Type) (a :: k) Ap :: f a -> Ap (f :: k -> Type) (a :: k) [getAp] :: Ap (f :: k -> Type) (a :: k) -> f a -- | The dual of a Monoid, obtained by swapping the arguments of -- mappend. -- --
-- >>> getDual (mappend (Dual "Hello") (Dual "World")) -- "WorldHello" --newtype Dual a Dual :: a -> Dual a [getDual] :: Dual a -> a -- | The monoid of endomorphisms under composition. -- --
-- >>> let computation = Endo ("Hello, " ++) <> Endo (++ "!")
--
-- >>> appEndo computation "Haskell"
-- "Hello, Haskell!"
--
newtype Endo a
Endo :: (a -> a) -> Endo a
[appEndo] :: Endo a -> a -> a
-- | Boolean monoid under conjunction (&&).
--
-- -- >>> getAll (All True <> mempty <> All False) -- False ---- --
-- >>> getAll (mconcat (map (\x -> All (even x)) [2,4,6,7,8])) -- False --newtype All All :: Bool -> All [getAll] :: All -> Bool -- | Boolean monoid under disjunction (||). -- --
-- >>> getAny (Any True <> mempty <> Any False) -- True ---- --
-- >>> getAny (mconcat (map (\x -> Any (even x)) [2,4,6,7,8])) -- True --newtype Any Any :: Bool -> Any [getAny] :: Any -> Bool -- | Monoid under addition. -- --
-- >>> getSum (Sum 1 <> Sum 2 <> mempty) -- 3 --newtype Sum a Sum :: a -> Sum a [getSum] :: Sum a -> a -- | Monoid under multiplication. -- --
-- >>> getProduct (Product 3 <> Product 4 <> mempty) -- 12 --newtype Product a Product :: a -> Product a [getProduct] :: Product a -> a -- | Monoid under <|>. -- --
-- >>> getAlt (Alt (Just 12) <> Alt (Just 24)) -- Just 12 ---- --
-- >>> getAlt $ Alt Nothing <> Alt (Just 24) -- Just 24 --newtype Alt (f :: k -> Type) (a :: k) Alt :: f a -> Alt (f :: k -> Type) (a :: k) [getAlt] :: Alt (f :: k -> Type) (a :: k) -> f a instance Control.DeepSeq.NFData (Data.Prim.Count e) instance GHC.Real.Real (Data.Prim.Count e) instance GHC.Real.Integral (Data.Prim.Count e) instance GHC.Num.Num (Data.Prim.Count e) instance GHC.Enum.Bounded (Data.Prim.Count e) instance GHC.Enum.Enum (Data.Prim.Count e) instance GHC.Classes.Ord (Data.Prim.Count e) instance GHC.Show.Show (Data.Prim.Count e) instance GHC.Classes.Eq (Data.Prim.Count e) instance Control.DeepSeq.NFData (Data.Prim.Off e) instance GHC.Real.Real (Data.Prim.Off e) instance GHC.Real.Integral (Data.Prim.Off e) instance GHC.Num.Num (Data.Prim.Off e) instance GHC.Enum.Bounded (Data.Prim.Off e) instance GHC.Enum.Enum (Data.Prim.Off e) instance GHC.Classes.Ord (Data.Prim.Off e) instance GHC.Show.Show (Data.Prim.Off e) instance GHC.Classes.Eq (Data.Prim.Off e) instance Data.Prim.Class.Prim (Data.Prim.Off e) instance Data.Prim.Class.Prim (Data.Prim.Count e) module Data.Prim.Array newtype Size Size :: Int -> Size [unSize] :: Size -> Int -- | Immutable array with boxed elements. data BArray e BArray :: Array# e -> BArray e -- | Compare pointers for two immutable arrays and see if they refer to the -- exact same one. isSameBArray :: BArray a -> BArray a -> Bool -- | O(1) - Get the number of elements in an immutable array -- -- Documentation for utilized primop: sizeofArray#. sizeOfBArray :: forall e. BArray e -> Size -- | O(1) - Index an element in the immutable boxed array. -- -- Documentation for utilized primop: indexArray#. -- --
-- >>> import Data.Prim.Array -- -- >>> let a = fromListBArray [[0 .. i] | i <- [0 .. 10 :: Int]] -- -- >>> indexBArray a 1 -- [0,1] -- -- >>> indexBArray a 5 -- [0,1,2,3,4,5] --indexBArray :: forall e. BArray e -> Int -> e -- | O(sz) - Copy a subsection of an immutable array into a -- subsection of a mutable array. Source and destination arrays must not -- be the same array in different states. -- -- Documentation for utilized primop: copyArray#. -- --
-- >>> let a = fromListBArray ['a'..'z'] -- -- >>> a -- BArray "abcdefghijklmnopqrstuvwxyz" -- -- >>> cloneBArray a 23 3 -- BArray "xyz" --cloneBArray :: forall e. BArray e -> Int -> Size -> BArray e -- | O(1) - Convert a pure immutable boxed array into a mutable -- boxed array. Use freezeBMArray in order to go in the opposite -- direction. -- -- Documentation for utilized primop: unsafeThawArray#. -- --
-- >>> ma <- thawBArray $ fromListBArray [1 .. 5 :: Integer] -- -- >>> writeBMArray ma 1 10 -- -- >>> freezeBMArray ma -- BArray [1,10,3,4,5] ---- -- Be careful not to retain a reference to the pure immutable source -- array after the thawed version gets mutated. -- --
-- >>> let a = fromListBArray [1 .. 5 :: Integer] -- -- >>> ma' <- thawBArray a -- -- >>> writeBMArray ma' 0 100000 -- -- >>> a -- BArray [100000,2,3,4,5] --thawBArray :: forall e m s. MonadPrim s m => BArray e -> m (BMArray e s) -- | O(sz) - Create a new mutable array with size sz and -- copy that number of elements from source immutable srcArray -- starting at an offset startIx into the newly created -- dstMutArray. This function can help avoid an issue with -- referential transparency that is inherent to thawBArray. -- --
-- >>> let a = fromListBArray [1 .. 5 :: Int] -- -- >>> ma <- thawCopyBArray a 1 3 -- -- >>> writeBMArray ma 1 10 -- -- >>> freezeBMArray ma -- BArray [2,10,4] -- -- >>> a -- BArray [1,2,3,4,5] --thawCopyBArray :: forall e m s. MonadPrim s m => BArray e -> Int -> Size -> m (BMArray e s) -- | Convert a pure boxed array into a list. It should work fine with GHC -- built-in list fusion. toListBArray :: forall e. BArray e -> [e] -- | O(length list) - Convert a list into an immutable boxed array. -- It is more efficient to use fromListBArrayN when the number of -- elements is known ahead of time. The reason for this is that it is -- necessary to iterate the whole list twice: once to count how many -- elements there is in order to create large enough array that can fit -- them; and the second time to load the actual elements. Naturally, -- infinite lists will grind the program to a halt. -- --
-- >>> fromListBArray "Hello Haskell" -- BArray "Hello Haskell" --fromListBArray :: forall e. [e] -> BArray e -- | O(min(length list, sz)) - Same as fromListBArray, except -- that it will allocate an array exactly of n size, as such it -- will not convert any portion of the list that doesn't fit into the -- newly created array. -- --
-- >>> fromListBArrayN 3 [1 :: Int, 2, 3] -- BArray [1,2,3] -- -- >>> fromListBArrayN 3 [1 :: Int ..] -- BArray [1,2,3] --fromListBArrayN :: forall e. HasCallStack => Size -> [e] -> BArray e -- | O(1) - cast a boxed immutable Array that is wired with -- GHC to BArray from primal. -- --
-- >>> import Data.Array.IArray as IA -- -- >>> let arr = IA.listArray (10, 15) [30 .. 35] :: IA.Array Int Integer -- -- >>> arr -- array (10,15) [(10,30),(11,31),(12,32),(13,33),(14,34),(15,35)] -- -- >>> fromBaseBArray arr -- BArray [30,31,32,33,34,35] --fromBaseBArray :: Array ix e -> BArray e -- | O(1) - cast a boxed BArray from primal into -- Array, which is wired with GHC. Resulting array range starts at -- 0, like any sane array would. -- --
-- >>> let arr = fromListBArray [1, 2, 3 :: Integer] -- -- >>> arr -- BArray [1,2,3] -- -- >>> toBaseBArray arr -- array (0,2) [(0,1),(1,2),(2,3)] --toBaseBArray :: BArray e -> Array Int e -- | Mutable array with boxed elements. data BMArray e s BMArray :: MutableArray# s e -> BMArray e s -- | O(1) - Get the size of a mutable boxed array -- -- Documentation for utilized primop: sizeofMutableArray#. -- --
-- >>> ma <- newBMArray 1024 "Element of each cell"
--
-- >>> getSizeOfBMArray ma
-- Size {unSize = 1024}
--
getSizeOfBMArray :: forall e m s. MonadPrim s m => BMArray e s -> m Size
-- | O(1) - Read an element from a mutable boxed array at the
-- supplied index.
--
-- Documentation for utilized primop: readArray#.
--
--
-- >>> ma <- makeBMArray 10 (pure . ("Element ix: " ++) . show)
--
-- >>> readBMArray ma 5
-- "Element ix: 5"
--
readBMArray :: forall e m s. MonadPrim s m => BMArray e s -> Int -> m e
-- | O(1) - Write an element elt into the mutable boxed
-- array dstMutArray at the supplied index ix. The
-- actual element will be evaluated to WHNF prior to mutation.
--
-- -- >>> ma <- newBMArray 4 (Nothing :: Maybe Integer) -- -- >>> writeBMArray ma 2 (Just 2) -- -- >>> freezeBMArray ma -- BArray [Nothing,Nothing,Just 2,Nothing] ---- -- It is important to note that an element is evaluated prior to being -- written into a cell, so it will not overwrite the value of an array's -- cell if it evaluates to an exception: -- --
-- >>> import Control.Prim.Exception -- -- >>> writeBMArray ma 2 (impureThrow DivideByZero) -- *** Exception: divide by zero -- -- >>> freezeBMArray ma -- BArray [Nothing,Nothing,Just 2,Nothing] ---- -- However, it is evaluated only to Weak Head Normal Form (WHNF), so it -- is still possible to write something that eventually evaluates to -- bottom. -- --
-- >>> writeBMArray ma 3 (Just (7 `div` 0 )) -- -- >>> freezeBMArray ma -- BArray [Nothing,Nothing,Just 2,Just *** Exception: divide by zero -- -- >>> readBMArray ma 3 -- Just *** Exception: divide by zero ---- -- Either deepseq or writeDeepBMArray can be used to -- alleviate that. writeBMArray :: forall e m s. MonadPrim s m => BMArray e s -> Int -> e -> m () -- | O(1) - Same as writeBMArray but allows to write a thunk -- into an array instead of an evaluated element. Careful with memory -- leaks and thunks that evaluate to exceptions. -- -- Documentation for utilized primop: writeArray#. -- --
-- >>> newBMArray 10 'A' >>= freezeBMArray -- BArray "AAAAAAAAAA" --newBMArray :: forall e m s. MonadPrim s m => Size -> e -> m (BMArray e s) -- | Same as newBMArray, except initial element is allowed to be a -- thunk. -- -- Documentation for utilized primop: newArray#. -- --
-- >>> import Data.Prim -- -- >>> let xs = "Hello Haskell" -- -- >>> ma <- newRawBMArray (Size (length xs)) :: IO (BMArray Char RW) -- -- >>> mapM_ (\(i, x) -> writeBMArray ma i x) (zip [0..] xs) -- -- >>> freezeBMArray ma -- BArray "Hello Haskell" --newRawBMArray :: forall e m s. (HasCallStack, MonadPrim s m) => Size -> m (BMArray e s) -- | Create new mutable boxed array of the supplied size and fill it with a -- monadic action that is applied to indices of each array cell. -- --
-- >>> ma <- makeBMArray 5 $ \i -> (toEnum (i + 97) :: Char) <$ putStrLn ("Handling index: " ++ show i)
-- Handling index: 0
-- Handling index: 1
-- Handling index: 2
-- Handling index: 3
-- Handling index: 4
--
-- >>> freezeBMArray ma
-- BArray "abcde"
--
makeBMArray :: forall e m s. MonadPrim s m => Size -> (Int -> m e) -> m (BMArray e s)
-- | O(sz) - Copy a subsection of a mutable array into a subsection
-- of another or the same mutable array. Therefore, unlike
-- copyBArray, memory ia allowed to overlap between source and
-- destination.
--
-- Documentation for utilized primop: copyMutableArray#.
--
-- -- >>> import Data.Prim.Array -- -- >>> let a = fromListSBArray [[0 .. i] | i <- [0 .. 10 :: Int]] -- -- >>> indexSBArray a 1 -- [0,1] -- -- >>> indexSBArray a 5 -- [0,1,2,3,4,5] --indexSBArray :: forall e. SBArray e -> Int -> e -- | O(sz) - Copy a subsection of an immutable array into a -- subsection of a mutable array. Source and destination arrays must not -- be the same array in different states. -- -- Documentation for utilized primop: copySmallArray#. -- --
-- >>> let a = fromListSBArray ['a'..'z'] -- -- >>> a -- SBArray "abcdefghijklmnopqrstuvwxyz" -- -- >>> cloneSBArray a 23 3 -- SBArray "xyz" --cloneSBArray :: forall e. SBArray e -> Int -> Size -> SBArray e -- | O(1) - Convert a pure immutable boxed array into a mutable -- boxed array. Use freezeSBMArray in order to go in the opposite -- direction. -- -- Documentation for utilized primop: unsafeThawSmallArray#. -- --
-- >>> ma <- thawSBArray $ fromListSBArray [1 .. 5 :: Integer] -- -- >>> writeSBMArray ma 1 10 -- -- >>> freezeSBMArray ma -- SBArray [1,10,3,4,5] ---- -- Be careful not to retain a reference to the pure immutable source -- array after the thawed version gets mutated. -- --
-- >>> let a = fromListSBArray [1 .. 5 :: Integer] -- -- >>> ma' <- thawSBArray a -- -- >>> writeSBMArray ma' 0 100000 -- -- >>> a -- SBArray [100000,2,3,4,5] --thawSBArray :: forall e m s. MonadPrim s m => SBArray e -> m (SBMArray e s) -- | O(sz) - Create a new mutable array with size sz and -- copy that number of elements from source immutable srcArray -- starting at an offset startIx into the newly created -- dstMutArray. This function can help avoid an issue with -- referential transparency that is inherent to thawSBArray. -- --
-- >>> let a = fromListSBArray [1 .. 5 :: Int] -- -- >>> ma <- thawCopySBArray a 1 3 -- -- >>> writeSBMArray ma 1 10 -- -- >>> freezeSBMArray ma -- SBArray [2,10,4] -- -- >>> a -- SBArray [1,2,3,4,5] --thawCopySBArray :: forall e m s. MonadPrim s m => SBArray e -> Int -> Size -> m (SBMArray e s) -- | Convert a pure boxed array into a list. It should work fine with GHC -- built-in list fusion. toListSBArray :: forall e. SBArray e -> [e] -- | O(length list) - Convert a list into an immutable boxed array. -- It is more efficient to use fromListSBArrayN when the number of -- elements is known ahead of time. The reason for this is that it is -- necessary to iterate the whole list twice: once to count how many -- elements there is in order to create large enough array that can fit -- them; and the second time to load the actual elements. Naturally, -- infinite lists will grind the program to a halt. -- --
-- >>> fromListSBArray "Hello Haskell" -- SBArray "Hello Haskell" --fromListSBArray :: forall e. [e] -> SBArray e -- | O(min(length list, sz)) - Same as fromListSBArray, -- except that it will allocate an array exactly of n size, as -- such it will not convert any portion of the list that doesn't fit into -- the newly created array. -- --
-- >>> fromListSBArrayN 3 [1 :: Int, 2, 3] -- SBArray [1,2,3] -- -- >>> fromListSBArrayN 3 [1 :: Int ..] -- SBArray [1,2,3] --fromListSBArrayN :: forall e. HasCallStack => Size -> [e] -> SBArray e -- | Small boxed mutable array data SBMArray e s SBMArray :: SmallMutableArray# s e -> SBMArray e s -- | Compare pointers for two mutable arrays and see if they refer to the -- exact same one. -- -- Documentation for utilized primop: sameSmallMutableArray#. isSameSBMArray :: forall a s. SBMArray a s -> SBMArray a s -> Bool -- | O(1) - Get the size of a mutable boxed array -- -- Documentation for utilized primop: getSizeofSmallMutableArray# -- for ghc-8.10 and newer and fallback to sizeofMutableArray# for -- older versions. -- --
-- >>> ma <- newSBMArray 1024 "Element of each cell"
--
-- >>> getSizeOfSBMArray ma
-- Size {unSize = 1024}
--
getSizeOfSBMArray :: forall e m s. MonadPrim s m => SBMArray e s -> m Size
-- | O(1) - Read an element from a mutable small boxed array at the
-- supplied index.
--
-- Documentation for utilized primop: readSmallArray#.
--
--
-- >>> ma <- makeSBMArray 10 (pure . ("Element ix: " ++) . show)
--
-- >>> readSBMArray ma 5
-- "Element ix: 5"
--
readSBMArray :: forall e m s. MonadPrim s m => SBMArray e s -> Int -> m e
-- | O(1) - Write an element elt into the mutable small
-- boxed array dstMutArray at the supplied index ix.
-- The actual element will be evaluated to WHNF prior to mutation.
--
-- -- >>> ma <- newSBMArray 4 (Nothing :: Maybe Integer) -- -- >>> writeSBMArray ma 2 (Just 2) -- -- >>> freezeSBMArray ma -- SBArray [Nothing,Nothing,Just 2,Nothing] ---- -- It is important to note that an element is evaluated prior to being -- written into a cell, so it will not overwrite the value of an array's -- cell if it evaluates to an exception: -- --
-- >>> import Control.Prim.Exception -- -- >>> writeSBMArray ma 2 (impureThrow DivideByZero) -- *** Exception: divide by zero -- -- >>> freezeSBMArray ma -- SBArray [Nothing,Nothing,Just 2,Nothing] ---- -- However, it is evaluated only to Weak Head Normal Form (WHNF), so it -- is still possible to write something that eventually evaluates to -- bottom. -- --
-- >>> writeSBMArray ma 3 (Just (7 `div` 0 )) -- -- >>> freezeSBMArray ma -- SBArray [Nothing,Nothing,Just 2,Just *** Exception: divide by zero ---- -- Either deepseq or writeDeepSBMArray can be used to -- alleviate that. writeSBMArray :: forall e m s. MonadPrim s m => SBMArray e s -> Int -> e -> m () -- | O(1) - Same as writeSBMArray but allows to write a thunk -- into an array instead of an evaluated element. Careful with memory -- leaks and thunks that evaluate to exceptions. -- -- Documentation for utilized primop: writeSmallArray#. -- --
-- >>> newSBMArray 10 'A' >>= freezeSBMArray -- SBArray "AAAAAAAAAA" --newSBMArray :: forall e m s. MonadPrim s m => Size -> e -> m (SBMArray e s) -- | Same as newSBMArray, except initial element is allowed to be a -- thunk. -- -- Documentation for utilized primop: newSmallArray#. -- --
-- >>> import Data.Prim -- -- >>> let xs = "Hello Haskell" -- -- >>> ma <- newRawSBMArray (Size (length xs)) :: IO (SBMArray Char RW) -- -- >>> mapM_ (\(i, x) -> writeSBMArray ma i x) (zip [0..] xs) -- -- >>> freezeSBMArray ma -- SBArray "Hello Haskell" --newRawSBMArray :: forall e m s. (HasCallStack, MonadPrim s m) => Size -> m (SBMArray e s) -- | Create new mutable boxed array of the supplied size and fill it with a -- monadic action that is applied to indices of each array cell. -- --
-- >>> ma <- makeSBMArray 5 $ \i -> (toEnum (i + 97) :: Char) <$ putStrLn ("Handling index: " ++ show i)
-- Handling index: 0
-- Handling index: 1
-- Handling index: 2
-- Handling index: 3
-- Handling index: 4
--
-- >>> freezeSBMArray ma
-- SBArray "abcde"
--
makeSBMArray :: forall e m s. MonadPrim s m => Size -> (Int -> m e) -> m (SBMArray e s)
-- | O(sz) - Copy a subsection of a mutable array into a subsection
-- of another or the same mutable array. Therefore, unlike
-- copySBArray, memory ia allowed to overlap between source and
-- destination.
--
-- Documentation for utilized primop: copySmallMutableArray#.
--
-- -- >>> let a = fromListUArray ([Left pi, Right 123] :: [Either Double Int]) -- -- >>> indexUArray a 0 -- Left 3.141592653589793 -- -- >>> indexUArray a 1 -- Right 123 --indexUArray :: forall e. Prim e => UArray e -> Int -> e -- | O(sz) - Copy a subsection of an immutable array into a -- subsection of another mutable array. Source and destination arrays -- must not be the same array in different states. -- -- Documentation for utilized primop: copyByteArray#. -- --
-- >>> ma <- thawUArray $ fromListUArray [1 .. 5 :: Int] -- -- >>> writeUMArray ma 1 10 -- -- >>> freezeUMArray ma -- UArray [1,10,3,4,5] ---- -- Be careful not to retain a reference to the pure immutable source -- array after the thawed version gets mutated. -- --
-- >>> let a = fromListUArray [1 .. 5 :: Int] -- -- >>> ma' <- thawUArray a -- -- >>> writeUMArray ma' 0 100000 -- -- >>> a -- UArray [100000,2,3,4,5] --thawUArray :: forall e m s. MonadPrim s m => UArray e -> m (UMArray e s) -- | O(n) - Convert a pure boxed array into a list. It should work -- fine with GHC built-in list fusion. toListUArray :: forall e. Prim e => UArray e -> [e] -- | O(length list) - Convert a list into an immutable boxed array. -- It is more efficient to use fromListUArrayN when the number of -- elements is known ahead of time. The reason for this is that it is -- necessary to iterate the whole list twice: once to count how many -- elements there is in order to create large enough array that can fit -- them; and the second time to load the actual elements. Naturally, -- infinite lists will grind the program to a halt. -- --
-- >>> fromListUArray "Hello Haskell" -- UArray "Hello Haskell" --fromListUArray :: forall e. Prim e => [e] -> UArray e -- | O(min(length list, sz)) - Same as fromListUArray, except -- it will allocate an array exactly of n size, as such it will -- not convert any portion of the list that doesn't fit into the newly -- created array. -- --
-- >>> fromListUArrayN 3 [1 :: Int, 2, 3] -- UArray [1,2,3] -- -- >>> fromListUArrayN 3 [1 :: Int ..] -- UArray [1,2,3] --fromListUArrayN :: forall e. Prim e => Size -> [e] -> UArray e -- | O(1) - cast an unboxed UArray that is wired with GHC to -- UArray from primal. -- --
-- >>> import Data.Array.IArray as IA -- -- >>> import Data.Array.Unboxed as UA -- -- >>> let uarr = IA.listArray (10, 15) [30 .. 35] :: UA.UArray Int Word -- -- >>> uarr -- array (10,15) [(10,30),(11,31),(12,32),(13,33),(14,34),(15,35)] -- -- >>> fromBaseUArray uarr -- UArray [30,31,32,33,34,35] --fromBaseUArray :: (Prim e, IArray UArray e) => UArray ix e -> UArray e -- | O(1) - cast an unboxed UArray from primal into -- UArray, which is wired with GHC. Resulting array range starts -- at 0, like any sane array would. -- --
-- >>> let uarr = fromListUArray [1, 2, 3 :: Int] -- -- >>> uarr -- UArray [1,2,3] -- -- >>> toBaseUArray uarr -- array (0,2) [(0,1),(1,2),(2,3)] --toBaseUArray :: (Prim e, IArray UArray e) => UArray e -> UArray Int e data UMArray e s UMArray :: MutableByteArray# s -> UMArray e s -- | O(1) - Compare pointers for two mutable arrays and see if they -- refer to the exact same one. -- -- Documentation for utilized primop: sameMutableByteArray#. isSameUMArray :: forall a b s. UMArray a s -> UMArray b s -> Bool -- | O(1) - Check if memory for mutable unboxed array was allocated -- as pinned. -- -- Documentation for utilized primop: isMutableByteArrayPinned#. isPinnedUMArray :: forall e s. UMArray e s -> Bool -- | O(1) - Get the size of a mutable unboxed array -- -- Documentation for utilized primop: getSizeofMutableByteArray#. -- --
-- >>> ma <- thawUArray $ fromListUArray ['a' .. 'z']
--
-- >>> getSizeOfUMArray ma
-- Size {unSize = 26}
--
getSizeOfUMArray :: forall e m s. (Prim e, MonadPrim s m) => UMArray e s -> m Size
-- | O(1) - Read an element from a mutable unboxed array at the
-- supplied index.
--
-- Documentation for utilized primop: readMutableByteArray#.
--
-- -- >>> ma <- thawUArray $ fromListUArray "Hi!" -- -- >>> readUMArray ma 2 -- '!' --readUMArray :: forall e m s. (Prim e, MonadPrim s m) => UMArray e s -> Int -> m e -- | O(1) - Write an element into an unboxed mutable array at a -- supplied index. -- -- Documentation for utilized primop: writeMutableByteArray#. -- --
-- >>> import Data.Prim -- -- >>> ma <- newRawUMArray 4 :: IO (UMArray (Maybe Int) RW) -- -- >>> mapM_ (\i -> writeUMArray ma i Nothing) [0, 1, 3] -- -- >>> writeUMArray ma 2 (Just 2) -- -- >>> freezeUMArray ma -- UArray [Nothing,Nothing,Just 2,Nothing] --writeUMArray :: forall e m s. (Prim e, MonadPrim s m) => UMArray e s -> Int -> e -> m () -- | O(sz) - Allocate new mutable unboxed array. Similar to -- newRawUMArray, except all elements are initialized to the -- supplied initial value. This is equivalent to makeUMArray sz -- (const (pure a)) but often will be more efficient. -- --
-- >>> import Data.Prim -- -- >>> let xs = "Hello" -- -- >>> ma <- newUMArray (Size (length xs) + 8) '!' :: IO (UMArray Char RW) -- -- >>> mapM_ (\(i, x) -> writeUMArray ma i x) (zip [0..] xs) -- -- >>> freezeUMArray ma -- UArray "Hello!!!!!!!!" --newUMArray :: forall e m s. (Prim e, MonadPrim s m) => Size -> e -> m (UMArray e s) -- | O(1) - Allocate new mutable unboxed array. None of the elements -- are initialized so expect it to contain some random garbage. -- -- Documentation for utilized primop: newByteArray#. -- --
-- >>> import Data.Prim -- -- >>> let xs = "Hello Haskell" -- -- >>> ma <- newRawUMArray (Size (length xs)) :: IO (UMArray Char RW) -- -- >>> mapM_ (\(i, x) -> writeUMArray ma i x) (zip [0..] xs) -- -- >>> freezeUMArray ma -- UArray "Hello Haskell" --newRawUMArray :: forall e m s. (Prim e, MonadPrim s m) => Size -> m (UMArray e s) -- | Create new mutable unboxed array of the supplied size and fill it with -- a monadic action that is applied to indices of each array cell. -- --
-- >>> ma <- makeUMArray 5 $ \i -> (toEnum (i + 97) :: Char) <$ putStrLn ("Handling index: " ++ show i)
-- Handling index: 0
-- Handling index: 1
-- Handling index: 2
-- Handling index: 3
-- Handling index: 4
--
-- >>> freezeUMArray ma
-- UArray "abcde"
--
makeUMArray :: forall e m s. (Prim e, MonadPrim s m) => Size -> (Int -> m e) -> m (UMArray e s)
-- | Same newUMArray, but allocate memory as pinned. See
-- newRawPinnedUMArray for more info.
--
-- -- foreign import ccall "stdlib.h &free" -- p_free :: FunPtr (Ptr a -> IO ()) ---- -- or a pointer to a Haskell function created using a wrapper stub -- declared to produce a FunPtr of the correct type. For example: -- --
-- type Compare = Int -> Int -> Bool -- foreign import ccall "wrapper" -- mkCompare :: Compare -> IO (FunPtr Compare) ---- -- Calls to wrapper stubs like mkCompare allocate storage, which -- should be released with freeHaskellFunPtr when no longer -- required. -- -- To convert FunPtr values to corresponding Haskell functions, -- one can define a dynamic stub for the specific foreign type, -- e.g. -- --
-- type IntFunction = CInt -> IO () -- foreign import ccall "dynamic" -- mkFun :: FunPtr IntFunction -> IntFunction --data FunPtr a -- | Casts a Ptr to a FunPtr. -- -- Note: this is valid only on architectures where data and -- function pointers range over the same set of addresses, and should -- only be used for bindings to external libraries whose interface -- already relies on this assumption. castPtrToFunPtr :: Ptr a -> FunPtr b -- | Casts a FunPtr to a Ptr. -- -- Note: this is valid only on architectures where data and -- function pointers range over the same set of addresses, and should -- only be used for bindings to external libraries whose interface -- already relies on this assumption. castFunPtrToPtr :: FunPtr a -> Ptr b -- | Casts a FunPtr to a FunPtr of a different type. castFunPtr :: FunPtr a -> FunPtr b -- | The constant nullFunPtr contains a distinguished value of -- FunPtr that is not associated with a valid memory location. nullFunPtr :: FunPtr a -- | Computes the offset required to get from the second to the first -- argument. We have -- --
-- p2 == p1 `plusPtr` (p2 `minusPtr` p1) --minusPtr :: Ptr a -> Ptr b -> Int -- | Given an arbitrary address and an alignment constraint, -- alignPtr yields the next higher address that fulfills the -- alignment constraint. An alignment constraint x is fulfilled -- by any address divisible by x. This operation is idempotent. alignPtr :: Ptr a -> Int -> Ptr a -- | Advances the given address by the given offset in bytes. plusPtr :: Ptr a -> Int -> Ptr b -- | The castPtr function casts a pointer from one type to another. castPtr :: Ptr a -> Ptr b -- | The constant nullPtr contains a distinguished value of -- Ptr that is not associated with a valid memory location. nullPtr :: Ptr a -- | An unsigned integral type that can be losslessly converted to and from -- Ptr. This type is also compatible with the C99 type -- uintptr_t, and can be marshalled to and from that type -- safely. newtype WordPtr WordPtr :: Word -> WordPtr -- | casts a Ptr to a WordPtr ptrToWordPtr :: Ptr a -> WordPtr -- | casts a WordPtr to a Ptr wordPtrToPtr :: WordPtr -> Ptr a -- | A signed integral type that can be losslessly converted to and from -- Ptr. This type is also compatible with the C99 type -- intptr_t, and can be marshalled to and from that type safely. newtype IntPtr IntPtr :: Int -> IntPtr -- | casts a Ptr to an IntPtr ptrToIntPtr :: Ptr a -> IntPtr -- | casts an IntPtr to a Ptr intPtrToPtr :: IntPtr -> Ptr a -- | Perform atomic modification of an element in the Ptr at the -- supplied index. Returns the artifact of computation b. -- Offset is in number of elements, rather than bytes. Implies a full -- memory barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. casOffPtr :: (MonadPrim s m, Atomic e) => Ptr e -> Off e -> e -> e -> m e -- | Perform atomic modification of an element in the Ptr at the -- supplied index. Returns the artifact of computation b. -- Offset is in number of elements, rather than bytes. Implies a full -- memory barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicModifyOffPtr :: (MonadPrim s m, Atomic e) => Ptr e -> Off e -> (e -> (e, b)) -> m b -- | Perform atomic modification of an element in the Ptr at the -- supplied index. Offset is in number of elements, rather than bytes. -- Implies a full memory barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicModifyOffPtr_ :: (MonadPrim s m, Atomic e) => Ptr e -> Off e -> (e -> e) -> m () -- | Perform atomic modification of an element in the Ptr at the -- supplied index. Returns the previous value. Offset is in number of -- elements, rather than bytes. Implies a full memory barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicModifyFetchOldOffPtr :: (MonadPrim s m, Atomic e) => Ptr e -> Off e -> (e -> e) -> m e -- | Perform atomic modification of an element in the Ptr at the -- supplied index. Offset is in number of elements, rather than bytes. -- Implies a full memory barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicModifyFetchNewOffPtr :: (MonadPrim s m, Atomic e) => Ptr e -> Off e -> (e -> e) -> m e -- | Add a numeric value to an element of a Ptr, corresponds to -- (+) done atomically. Returns the previous value. -- Offset is in number of elements, rather than bytes. Implies a full -- memory barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicAddFetchOldOffPtr :: (MonadPrim s m, AtomicCount e) => Ptr e -> Off e -> e -> m e -- | Add a numeric value to an element of a Ptr, corresponds to -- (+) done atomically. Returns the new value. Offset is -- in number of elements, rather than bytes. Implies a full memory -- barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicAddFetchNewOffPtr :: (MonadPrim s m, AtomicCount e) => Ptr e -> Off e -> e -> m e -- | Subtract a numeric value from an element of a Ptr, corresponds -- to (-) done atomically. Returns the previous value. -- Offset is in number of elements, rather than bytes. Implies a full -- memory barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicSubFetchOldOffPtr :: (MonadPrim s m, AtomicCount e) => Ptr e -> Off e -> e -> m e -- | Subtract a numeric value from an element of a Ptr, corresponds -- to (-) done atomically. Returns the new value. Offset -- is in number of elements, rather than bytes. Implies a full memory -- barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicSubFetchNewOffPtr :: (MonadPrim s m, AtomicCount e) => Ptr e -> Off e -> e -> m e -- | Binary conjunction (AND) of an element of a Ptr with the -- supplied value, corresponds to (.&.) done -- atomically. Returns the previous value. Offset is in number of -- elements, rather than bytes. Implies a full memory barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicAndFetchOldOffPtr :: (MonadPrim s m, AtomicBits e) => Ptr e -> Off e -> e -> m e -- | Binary conjunction (AND) of an element of a Ptr with the -- supplied value, corresponds to (.&.) done -- atomically. Returns the new value. Offset is in number of elements, -- rather than bytes. Implies a full memory barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicAndFetchNewOffPtr :: (MonadPrim s m, AtomicBits e) => Ptr e -> Off e -> e -> m e -- | Negation of binary conjunction (NAND) of an element of a Ptr -- with the supplied value, corresponds to \x y -> -- complement (x .&. y) done atomically. Returns -- the previous value. Offset is in number of elements, rather than -- bytes. Implies a full memory barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicNandFetchOldOffPtr :: (MonadPrim s m, AtomicBits e) => Ptr e -> Off e -> e -> m e -- | Negation of binary conjunction (NAND) of an element of a Ptr -- with the supplied value, corresponds to \x y -> -- complement (x .&. y) done atomically. Returns -- the new value. Offset is in number of elements, rather than bytes. -- Implies a full memory barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicNandFetchNewOffPtr :: (MonadPrim s m, AtomicBits e) => Ptr e -> Off e -> e -> m e -- | Binary disjunction (OR) of an element of a Ptr with the -- supplied value, corresponds to (.|.) done atomically. -- Returns the previous value. Offset is in number of elements, rather -- than bytes. Implies a full memory barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicOrFetchOldOffPtr :: (MonadPrim s m, AtomicBits e) => Ptr e -> Off e -> e -> m e -- | Binary disjunction (OR) of an element of a Ptr with the -- supplied value, corresponds to (.|.) done atomically. -- Returns the new value. Offset is in number of elements, rather than -- bytes. Implies a full memory barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicOrFetchNewOffPtr :: (MonadPrim s m, AtomicBits e) => Ptr e -> Off e -> e -> m e -- | Binary exclusive disjunction (XOR) of an element of a Ptr with -- the supplied value, corresponds to xor done -- atomically. Returns the previous value. Offset is in number of -- elements, rather than bytes. Implies a full memory barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicXorFetchOldOffPtr :: (MonadPrim s m, AtomicBits e) => Ptr e -> Off e -> e -> m e -- | Binary exclusive disjunction (XOR) of an element of a Ptr with -- the supplied value, corresponds to xor done -- atomically. Returns the new value. Offset is in number of elements, -- rather than bytes. Implies a full memory barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicXorFetchNewOffPtr :: (MonadPrim s m, AtomicBits e) => Ptr e -> Off e -> e -> m e -- | Binary negation (NOT) of an element of a Ptr, corresponds to -- (complement) done atomically. Returns the previous -- value. Offset is in number of elements, rather than bytes. Implies a -- full memory barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicNotFetchOldOffPtr :: (MonadPrim s m, AtomicBits e) => Ptr e -> Off e -> m e -- | Binary negation (NOT) of an element of a Ptr, corresponds to -- (complement) done atomically. Returns the new value. -- Offset is in number of elements, rather than bytes. Implies a full -- memory barrier. -- -- Note - Bounds are not checked, therefore this function is -- unsafe. atomicNotFetchNewOffPtr :: (MonadPrim s m, AtomicBits e) => Ptr e -> Off e -> m e prefetchPtr0 :: MonadPrim s m => Ptr e -> m () prefetchPtr1 :: MonadPrim s m => Ptr a -> m () prefetchPtr2 :: MonadPrim s m => Ptr e -> m () prefetchPtr3 :: MonadPrim s m => Ptr e -> m () prefetchOffPtr0 :: (MonadPrim s m, Prim e) => Ptr e -> Off e -> m () prefetchOffPtr1 :: (MonadPrim s m, Prim e) => Ptr e -> Off e -> m () prefetchOffPtr2 :: (MonadPrim s m, Prim e) => Ptr e -> Off e -> m () prefetchOffPtr3 :: (MonadPrim s m, Prim e) => Ptr e -> Off e -> m () module Foreign.Prim.StablePtr -- | A stable pointer is a reference to a Haskell expression that is -- guaranteed not to be affected by garbage collection, i.e., it will -- neither be deallocated nor will the value of the stable pointer itself -- change during garbage collection (ordinary references may be relocated -- during garbage collection). Consequently, stable pointers can be -- passed to foreign code, which can treat it as an opaque reference to a -- Haskell value. -- -- A value of type StablePtr a is a stable pointer to a Haskell -- expression of type a. data StablePtr a StablePtr :: StablePtr# a -> StablePtr a -- | Same as newStablePtr, but generalized to MonadPrim newStablePtr :: MonadPrim RW m => a -> m (StablePtr a) -- | Same as deRefStablePtr, but generalized to MonadPrim deRefStablePtr :: MonadPrim RW m => StablePtr a -> m a -- | Same as freeStablePtr, but generalized to MonadPrim freeStablePtr :: MonadPrim RW m => StablePtr a -> m () -- | Coerce a stable pointer to an address. No guarantees are made about -- the resulting value, except that the original stable pointer can be -- recovered by castPtrToStablePtr. In particular, the address may -- not refer to an accessible memory location and any attempt to pass it -- to the member functions of the class Storable leads to -- undefined behaviour. castStablePtrToPtr :: StablePtr a -> Ptr () -- | The inverse of castStablePtrToPtr, i.e., we have the identity -- --
-- sp == castPtrToStablePtr (castStablePtrToPtr sp) ---- -- for any stable pointer sp on which freeStablePtr has -- not been executed yet. Moreover, castPtrToStablePtr may only be -- applied to pointers that have been produced by -- castStablePtrToPtr. castPtrToStablePtr :: Ptr () -> StablePtr a instance Control.DeepSeq.NFData (GHC.Stable.StablePtr a) instance GHC.Show.Show (GHC.Stable.StablePtr a) module Foreign.Prim.WeakPtr -- | A weak pointer object with a key and a value. The value has type -- v. -- -- A weak pointer expresses a relationship between two objects, the -- key and the value: if the key is considered to be alive -- by the garbage collector, then the value is also alive. A reference -- from the value to the key does not keep the key alive. -- -- A weak pointer may also have a finalizer of type IO (); if it -- does, then the finalizer will be run at most once, at a time after the -- key has become unreachable by the program ("dead"). The storage -- manager attempts to run the finalizer(s) for an object soon after the -- object dies, but promptness is not guaranteed. -- -- It is not guaranteed that a finalizer will eventually run, and no -- attempt is made to run outstanding finalizers when the program exits. -- Therefore finalizers should not be relied on to clean up resources - -- other methods (eg. exception handlers) should be employed, possibly in -- addition to finalizers. -- -- References from the finalizer to the key are treated in the same way -- as references from the value to the key: they do not keep the key -- alive. A finalizer may therefore ressurrect the key, perhaps by -- storing it in the same data structure. -- -- The finalizer, and the relationship between the key and the value, -- exist regardless of whether the program keeps a reference to the -- Weak object or not. -- -- There may be multiple weak pointers with the same key. In this case, -- the finalizers for each of these weak pointers will all be run in some -- arbitrary order, or perhaps concurrently, when the key dies. If the -- programmer specifies a finalizer that assumes it has the only -- reference to an object (for example, a file that it wishes to close), -- then the programmer must ensure that there is only one such finalizer. -- -- If there are no other threads to run, the runtime system will check -- for runnable finalizers before declaring the system to be deadlocked. -- -- WARNING: weak pointers to ordinary non-primitive Haskell types are -- particularly fragile, because the compiler is free to optimise away or -- duplicate the underlying data structure. Therefore attempting to place -- a finalizer on an ordinary Haskell type may well result in the -- finalizer running earlier than you expected. This is not a problem for -- caches and memo tables where early finalization is benign. -- -- Finalizers can be used reliably for types that are created -- explicitly and have identity, such as IORef and -- MVar. However, to place a finalizer on one of these types, -- you should use the specific operation provided for that type, e.g. -- mkWeakIORef and addMVarFinalizer respectively (the -- non-uniformity is accidental). These operations attach the finalizer -- to the primitive object inside the box (e.g. MutVar# in the -- case of IORef), because attaching the finalizer to the box -- itself fails when the outer box is optimised away by the compiler. data Weak v Weak :: Weak# v -> Weak v -- | Same as mkWeak, except it requires a finalizer to be supplied. -- For a version without finalizers use mkWeakNoFinalizer mkWeak :: MonadUnliftPrim RW m => a -> v -> m b -> m (Weak v) -- | Similar to mkWeak, except it does not require a finalizer. mkWeakNoFinalizer :: MonadPrim RW m => a -> v -> m (Weak v) -- | Same as mkWeakPtr, except it requires a finalizer to be -- supplied. For a version without finalizers use -- mkWeakPtrNoFinalizer mkWeakPtr :: MonadUnliftPrim RW m => k -> m b -> m (Weak k) -- | Similar to mkWeakPtr, except it does not require a finalizer. mkWeakPtrNoFinalizer :: MonadPrim RW m => k -> m (Weak k) -- | Same as addFinalizer. addFinalizer :: MonadUnliftPrim RW m => k -> m b -> m () -- | Add a foreign function finalizer with a single argument addCFinalizer :: MonadPrim RW m => FunPtr (Ptr a -> IO ()) -> Ptr a -> Weak v -> m Bool -- | Add a foreign function finalizer with two arguments addCFinalizerEnv :: MonadPrim RW m => FunPtr (Ptr env -> Ptr a -> IO ()) -> Ptr env -> Ptr a -> Weak v -> m Bool -- | Similar to deRefWeak deRefWeak :: MonadPrim RW m => Weak v -> m (Maybe v) -- | Similar to finalize finalizeWeak :: MonadPrim RW m => Weak v -> m () module Data.Prim.Ref -- | Mutable variable that can hold any value. This is just like -- STRef, but with type arguments flipped and is generalized to -- work in MonadPrim. It only stores a reference to the value -- which means it works on boxed values. If the type can be unboxed with -- Prim class, consider using PVar package -- instead. data Ref a s Ref :: MutVar# s a -> Ref a s -- | Compatibility synonym type IORef a = Ref a RW -- | Compatibility synonym type STRef s a = Ref a s -- | Create a new mutable variable. Initial value will be forced to WHNF -- (weak head normal form). -- --
-- >>> import Debug.Trace -- -- >>> import Data.Prim.Ref -- -- >>> ref <- newRef (trace "Initial value is evaluated" (217 :: Int)) -- Initial value is evaluated -- -- >>> modifyFetchOldRef ref succ -- 217 -- -- >>> readRef ref -- 218 --newRef :: MonadPrim s m => a -> m (Ref a s) -- | Create a new mutable variable. Same as newRef, but ensures that -- value is evaluated to normal form. -- --
-- >>> import Debug.Trace -- -- >>> import Data.Prim.Ref -- -- >>> ref <- newDeepRef (Just (trace "Initial value is evaluated" (217 :: Int))) -- Initial value is evaluated -- -- >>> readRef ref -- Just 217 --newDeepRef :: (NFData a, MonadPrim s m) => a -> m (Ref a s) -- | Check whether supplied Refs refer to the exact same one or not. isSameRef :: Ref a s -> Ref a s -> Bool -- | Read contents of the mutable variable -- --
-- >>> import Data.Prim.Ref -- -- >>> ref <- newRef "Hello World!" -- -- >>> readRef ref -- "Hello World!" --readRef :: MonadPrim s m => Ref a s -> m a -- | Swap a value of a mutable variable with a new one, while retrieving -- the old one. New value is evaluated prior to it being written to the -- variable. -- --
-- >>> ref <- newRef (Left "Initial" :: Either String String) -- -- >>> swapRef ref (Right "Last") -- Left "Initial" -- -- >>> readRef ref -- Right "Last" --swapRef :: MonadPrim s m => Ref a s -> a -> m a -- | Swap a value of a mutable variable with a new one, while retrieving -- the old one. New value is evaluated to normal form prior to it -- being written to the variable. -- --
-- >>> ref <- newRef (Just "Initial") -- -- >>> swapDeepRef ref (Just (errorWithoutStackTrace "foo")) -- *** Exception: foo -- -- >>> readRef ref -- Just "Initial" --swapDeepRef :: (NFData a, MonadPrim s m) => Ref a s -> a -> m a -- | Write a value into a mutable variable strictly. If evaluating a value -- results in exception, original value in the mutable variable will not -- be affected. Another great benfit of this over writeLazyRef is -- that it helps avoiding memory leaks. -- --
-- >>> ref <- newRef "Original value" -- -- >>> import Control.Prim.Exception -- -- >>> _ <- try $ writeRef ref undefined :: IO (Either SomeException ()) -- -- >>> readRef ref -- "Original value" -- -- >>> writeRef ref "New total value" -- -- >>> readRef ref -- "New total value" --writeRef :: MonadPrim s m => Ref a s -> a -> m () -- | Same as writeRef, but will evaluate the argument to Normal Form -- prior to writing it to the Ref writeDeepRef :: (NFData a, MonadPrim s m) => Ref a s -> a -> m () -- | Apply a pure function to the contents of a mutable variable strictly. -- Returns the artifact produced by the modifying function. Artifact is -- not forced, therfore it cannot affect the outcome of modification. -- This function is a faster alternative to atomicModifyRef, -- except without any guarantees of atomicity and ordering of mutable -- operations during concurrent modification of the same Ref. For -- lazy version see modifyLazyRef and for strict evaluation to -- normal form see modifyDeepRef. modifyRef :: MonadPrim s m => Ref a s -> (a -> (a, b)) -> m b -- | Same as modifyRef, except it will evaluate result of -- computation to normal form. modifyDeepRef :: (NFData a, MonadPrim s m) => Ref a s -> (a -> (a, b)) -> m b -- | Apply a pure function to the contents of a mutable variable strictly. modifyRef_ :: MonadPrim s m => Ref a s -> (a -> a) -> m () -- | Apply a pure function to the contents of a mutable variable strictly. -- Returns the new value. modifyFetchNewRef :: MonadPrim s m => Ref a s -> (a -> a) -> m a -- | Apply a pure function to the contents of a mutable variable strictly. -- Returns the old value. -- --
-- >>> ref1 <- newRef (10 :: Int) -- -- >>> ref2 <- newRef (201 :: Int) -- -- >>> modifyRefM_ ref1 (\x -> modifyFetchOldRef ref2 (* x)) -- -- >>> readRef ref1 -- 201 -- -- >>> readRef ref2 -- 2010 --modifyFetchOldRef :: MonadPrim s m => Ref a s -> (a -> a) -> m a -- | Modify value of a mutable variable with a monadic action. It is not -- strict in a return value of type b, but the ne value written -- into the mutable variable is evaluated to WHNF. -- --
-- >>> ref <- newRef (Just "Some value") -- -- >>> modifyRefM_ ref $ \ mv -> Nothing <$ mapM_ putStrLn mv -- Some value -- -- >>> readRef ref -- Nothing --modifyRefM_ :: MonadPrim s m => Ref a s -> (a -> m a) -> m () -- | Apply a monadic action to the contents of a mutable variable strictly. -- Returns the new value. modifyFetchNewRefM :: MonadPrim s m => Ref a s -> (a -> m a) -> m a -- | Apply a monadic action to the contents of a mutable variable strictly. -- Returns the old value. -- --
-- >>> refName <- newRef "My name is: " -- -- >>> refMyName <- newRef "Alexey" -- -- >>> myName <- modifyFetchOldRefM refMyName $ \ name -> "Leo" <$ modifyRef_ refName (++ name) -- -- >>> readRef refName >>= putStrLn -- My name is: Alexey -- -- >>> putStrLn myName -- Alexey -- -- >>> readRef refMyName >>= putStrLn -- Leo --modifyFetchOldRefM :: MonadPrim s m => Ref a s -> (a -> m a) -> m a -- | This will behave exactly the same as readRef when the -- Ref is accessed within a single thread only. However, despite -- being slower, it can help with with restricting order of operations in -- cases when multiple threads perform modifications to the Ref -- because it implies a memory barrier. atomicReadRef :: MonadPrim s m => Ref e s -> m e -- | Same as atomicWriteRef, but also returns the old value. atomicSwapRef :: MonadPrim s m => Ref e s -> e -> m e -- | Evaluate a value and write it atomically into a Ref. This is -- different from writeRef because a memory barrier will be -- issued. Use this instead of writeRef in order to guarantee the -- ordering of operations in a concurrent environment. atomicWriteRef :: MonadPrim s m => Ref e s -> e -> m () -- | Apply a function to the value stored in a mutable Ref -- atomically. Function is applied strictly with respect to the newly -- returned value, which matches the semantics of -- atomicModifyIORef`, however the difference is that the -- artifact returned by the action is not evaluated. -- --
-- >>> --atomicModifyRef :: MonadPrim s m => Ref a s -> (a -> (a, b)) -> m b atomicModifyRef_ :: MonadPrim s m => Ref a s -> (a -> a) -> m () -- | Appy a function to the value in mutable Ref atomically atomicModifyFetchRef :: MonadPrim s m => Ref a s -> (a -> (a, b)) -> m (a, a, b) atomicModifyFetchNewRef :: MonadPrim s m => Ref a s -> (a -> a) -> m a atomicModifyFetchOldRef :: MonadPrim s m => Ref a s -> (a -> a) -> m a atomicModifyFetchBothRef :: MonadPrim s m => Ref a s -> (a -> a) -> m (a, a) casRef :: MonadPrim s m => Ref a s -> a -> a -> m (Bool, a) atomicModifyRef2 :: MonadPrim s m => Ref a s -> (a -> (a, b)) -> m b atomicModifyRef2_ :: MonadPrim s m => Ref a s -> (a -> a) -> m () atomicModifyFetchNewRef2 :: MonadPrim s m => Ref a s -> (a -> a) -> m a atomicModifyFetchOldRef2 :: MonadPrim s m => Ref a s -> (a -> a) -> m a atomicModifyFetchBothRef2 :: MonadPrim s m => Ref a s -> (a -> a) -> m (a, a) atomicModifyFetchRef2 :: MonadPrim s m => Ref a s -> (a -> (a, b)) -> m (a, a, b) -- | Create a new mutable variable. Initial value stays unevaluated. -- --
-- >>> import Debug.Trace -- -- >>> import Data.Prim.Ref -- -- >>> ref <- newLazyRef (trace "Initial value is evaluated" (undefined :: Int)) -- -- >>> writeRef ref 1024 -- -- >>> modifyFetchNewRef ref succ -- 1025 --newLazyRef :: MonadPrim s m => a -> m (Ref a s) -- | Write a value into a mutable variable lazily. -- --
-- >>> ref <- newRef "Original value" -- -- >>> import Debug.Trace -- -- >>> writeLazyRef ref (trace "'New string' is evaluated" "New string") -- -- >>> x <- readRef ref -- -- >>> writeRef ref (trace "'Totally new string' is evaluated" "Totally new string") -- 'Totally new string' is evaluated -- -- >>> putStrLn x -- 'New string' is evaluated -- New string --writeLazyRef :: MonadPrim s m => Ref a s -> a -> m () -- | Swap a value of a mutable variable with a new one lazily, while -- retrieving the old one. New value is not evaluated prior to it -- being written to the variable. -- --
-- >>> ref <- newRef "Initial" -- -- >>> swapLazyRef ref undefined -- "Initial" -- -- >>> _ <- swapLazyRef ref "Different" -- -- >>> readRef ref -- "Different" --swapLazyRef :: MonadPrim s m => Ref a s -> a -> m a -- | Apply a pure function to the contents of a mutable variable lazily. -- Returns the artifact produced by the modifying function. modifyLazyRef :: MonadPrim s m => Ref a s -> (a -> (a, b)) -> m b -- | Same as modifyRefM, but do not evaluate the new value written -- into the Ref. modifyLazyRefM :: MonadPrim s m => Ref a s -> (a -> m (a, b)) -> m b atomicWriteLazyRef :: MonadPrim s m => Ref b s -> b -> m () atomicModifyLazyRef :: MonadPrim s m => Ref a s -> (a -> (a, b)) -> m b atomicModifyFetchNewLazyRef :: MonadPrim s m => Ref a s -> (a -> a) -> m a atomicModifyFetchOldLazyRef :: MonadPrim s m => Ref a s -> (a -> a) -> m a atomicModifyFetchBothLazyRef :: MonadPrim s m => Ref a s -> (a -> a) -> m (a, a) atomicModifyFetchLazyRef :: MonadPrim s m => Ref a s -> (a -> (a, b)) -> m (a, a, b) -- | Convert Ref to STRef toSTRef :: Ref a s -> STRef s a -- | Convert STRef to Ref fromSTRef :: STRef s a -> Ref a s -- | Convert Ref to IORef toIORef :: Ref a RW -> IORef a -- | Convert IORef to Ref fromIORef :: IORef a -> Ref a RW -- | Create a Weak pointer associated with the supplied Ref. -- -- Same as mkWeakRef from base, but works in any -- MonadPrim with RealWorld state token. mkWeakRef :: forall a b m. MonadUnliftPrim RW m => Ref a RW -> m b -> m (Weak (Ref a RW)) instance GHC.Classes.Eq (Data.Prim.Ref.Ref a s)