-- 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. -- --

Note

-- -- This is an identical class to MonadThrow from -- exceptions package. The reason why it was copied, instead of -- a direct dependency on the aforementioned package is because -- MonadCatch and MonadMask are not right abstractions -- for exception handling in presence of concurrency and also because -- instances for such transformers as MaybeT and ExceptT -- are flawed. class Monad m => MonadThrow m -- | Throw an exception. Note that this throws when this action is run in -- the monad m, not when it is applied. It is a generalization -- of Control.Prim.Exception's throw. throwM :: (MonadThrow m, Exception e) => e -> m a instance Control.Prim.Monad.Throw.MonadThrow GHC.Maybe.Maybe instance (e GHC.Types.~ GHC.Exception.Type.SomeException) => Control.Prim.Monad.Throw.MonadThrow (Data.Either.Either e) instance Control.Prim.Monad.Throw.MonadThrow GHC.Types.IO instance Control.Prim.Monad.Throw.MonadThrow (GHC.ST.ST s) instance Control.Prim.Monad.Throw.MonadThrow GHC.Conc.Sync.STM instance Control.Prim.Monad.Throw.MonadThrow m => Control.Prim.Monad.Throw.MonadThrow (Control.Monad.Trans.Cont.ContT r m) instance (e GHC.Types.~ GHC.Exception.Type.SomeException, GHC.Base.Monad m) => Control.Prim.Monad.Throw.MonadThrow (Control.Monad.Trans.Except.ExceptT e m) instance Control.Prim.Monad.Throw.MonadThrow m => Control.Prim.Monad.Throw.MonadThrow (Control.Monad.Trans.Identity.IdentityT m) instance GHC.Base.Monad m => Control.Prim.Monad.Throw.MonadThrow (Control.Monad.Trans.Maybe.MaybeT m) instance Control.Prim.Monad.Throw.MonadThrow m => Control.Prim.Monad.Throw.MonadThrow (Control.Monad.Trans.Reader.ReaderT r m) instance (GHC.Base.Monoid w, Control.Prim.Monad.Throw.MonadThrow m) => Control.Prim.Monad.Throw.MonadThrow (Control.Monad.Trans.RWS.Lazy.RWST r w s m) instance (GHC.Base.Monoid w, Control.Prim.Monad.Throw.MonadThrow m) => Control.Prim.Monad.Throw.MonadThrow (Control.Monad.Trans.RWS.Strict.RWST r w s m) instance Control.Prim.Monad.Throw.MonadThrow m => Control.Prim.Monad.Throw.MonadThrow (Control.Monad.Trans.State.Lazy.StateT s m) instance Control.Prim.Monad.Throw.MonadThrow m => Control.Prim.Monad.Throw.MonadThrow (Control.Monad.Trans.State.Strict.StateT s m) instance (GHC.Base.Monoid w, Control.Prim.Monad.Throw.MonadThrow m) => Control.Prim.Monad.Throw.MonadThrow (Control.Monad.Trans.Writer.Lazy.WriterT w m) instance (GHC.Base.Monoid w, Control.Prim.Monad.Throw.MonadThrow m) => Control.Prim.Monad.Throw.MonadThrow (Control.Monad.Trans.Writer.Strict.WriterT w m) instance (GHC.Base.Monoid w, Control.Prim.Monad.Throw.MonadThrow m) => Control.Prim.Monad.Throw.MonadThrow (Control.Monad.Trans.Accum.AccumT w m) instance Control.Prim.Monad.Throw.MonadThrow m => Control.Prim.Monad.Throw.MonadThrow (Control.Monad.Trans.Select.SelectT r m) instance Control.Prim.Monad.Throw.MonadThrow m => Control.Prim.Monad.Throw.MonadThrow (Control.Monad.Trans.RWS.CPS.RWST r w st m) instance Control.Prim.Monad.Throw.MonadThrow m => Control.Prim.Monad.Throw.MonadThrow (Control.Monad.Trans.Writer.CPS.WriterT w m) module Control.Prim.Eval -- | This is an action that ensures that the value is still available and -- garbage collector has not cleaned it up. -- -- Make sure not to use it after some computation that doesn't return, -- like after forever for example, otherwise touch will simply -- be removed by ghc and bad things will happen. If you have a case like -- that, make sure to use withAlivePrimBase or keepAlive -- instead. touch :: MonadPrim s m => a -> m () -- | Same as touch#, except it is not restricted to RealWorld -- state token. touch# :: a -> State# s -> State# s -- | Similar to touch. See withAlive# for more info. keepAlive :: MonadUnliftPrim s m => a -> m b -> m b -- | Forward compatible operator that might be introduced in some future -- ghc version. -- -- See: #17760 -- -- Current version is not as efficient as the version that will be -- introduced in the future, because it works around the ghc bug by -- simply preventing inlining and relying on the touch function. keepAlive# :: a -> (State# s -> (# State# s, r #)) -> State# s -> (# State# s, r #) -- | 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` -- | 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 -- | 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 -- | Bogus Normal Form. This is useful in places where NFData -- constraint is required, but an instance can't really be created in any -- meaningful way for the type at hand. Creating environment in -- benchmarks is one such place where it may come in handy. newtype BNF a BNF :: a -> BNF a instance Control.DeepSeq.NFData (Control.Prim.Eval.BNF a) module Control.Prim.Monad -- | A shorter synonym for the magical RealWorld type RW = RealWorld -- | 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 type MonadIO m = MonadPrim RW m class MonadThrow m => MonadPrim s m | m -> s -- | Construct a primitive action prim :: MonadPrim s m => (State# s -> (# State# s, a #)) -> m a class MonadUnliftPrim s m => MonadPrimBase s m -- | Unwrap a primitive action primBase :: MonadPrimBase s m => m a -> State# s -> (# State# s, a #) type MonadUnliftIO m = MonadUnliftPrim RW m class MonadPrim s m => MonadUnliftPrim s m withRunInST :: MonadUnliftPrim s m => ((forall a. m a -> ST s a) -> ST s b) -> m b runInPrimBase1 :: MonadUnliftPrim s m => (a -> m b) -> ((a -> State# s -> (# State# s, b #)) -> State# s -> (# State# s, c #)) -> m c runInPrimBase2 :: MonadUnliftPrim s m => (a -> m b) -> (c -> m d) -> ((a -> State# s -> (# State# s, b #)) -> (c -> State# s -> (# State# s, d #)) -> State# s -> (# State# s, e #)) -> m e -- | The strict ST monad. The ST monad allows for destructive -- updates, but is escapable (unlike IO). A computation of type -- ST s a returns a value of type a, and execute -- in "thread" s. The s parameter is either -- -- -- -- It serves to keep the internal states of different invocations of -- runST separate from each other and from invocations of -- stToIO. -- -- The >>= and >> operations are strict in the -- state (though not in values stored in the state). For example, -- --
--   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. -- --

Highly unsafe!

unsafePrim :: MonadPrim s m => (State# s' -> (# State# s', a #)) -> m a -- | Coerce the state token of prim operation and wrap it into a -- MonadPrim action. -- --

Highly unsafe!

unsafePrim_ :: MonadPrim s m => (State# s' -> State# s') -> m () -- | Unwrap any MonadPrimBase action while coercing the state token -- --

Highly unsafe!

unsafePrimBase :: MonadPrimBase s' m => m a -> State# s -> (# State# s, a #) -- | Unwrap any MonadPrimBase action that does not return anything, -- while coercing the state token -- --

Highly unsafe!

unsafePrimBase_ :: MonadPrimBase s' m => m () -> State# s -> State# s -- | Convert a MonadPrimBase action to another MonadPrim -- while coercing the state token. -- --

Highly unsafe!

unsafePrimBaseToPrim :: (MonadPrimBase sn n, MonadPrim sm m) => n a -> m a -- | Convert a MonadPrimBase action to IO while coercing the -- state token to RealWorld. -- --

Highly unsafe!

unsafePrimBaseToIO :: MonadPrimBase s m => m a -> IO a -- | Convert a MonadPrimBase action to ST while coercing the -- state token s. -- --

Highly unsafe!

unsafePrimBaseToST :: MonadPrimBase sm m => m a -> ST s a -- | Convert an IO action to some MonadPrim while coercing -- the state token. -- --

Highly unsafe!

-- -- It is similar to unsafeSTToIO, except resulting action can be -- any other MonadPrim action, therefore it is a lot more -- dangerous. unsafeIOToPrim :: MonadPrim s m => IO a -> m a -- | Convert an ST action to some MonadPrim while coercing -- the state token. -- --

Highly unsafe!

unsafeSTToPrim :: MonadPrim s' m => ST s a -> m a -- | A version of liftPrimBase that coerce the state token. -- --

Highly unsafe!

unsafeLiftPrimBase :: forall sn n sm m a. (MonadPrimBase sn n, MonadPrim sm m) => n a -> m a -- | Same as noDuplicate, except works in any MonadPrim. noDuplicatePrim :: MonadPrim s m => m () -- | Same as unsafeDupablePerformIO, except works not only with -- IO, but with other MonadPrimBase actions as well. -- Reading and writing values into memory is safe, as long as writing -- action is idempotent. On the other hand things like memory or resource -- allocation, exceptions handling are not safe at all, since supplied -- action can be run multiple times and a copy interrupted at will. unsafeDupablePerformPrimBase :: MonadPrimBase s m => m a -> a -- | Take an IO and compute it as a pure value, while inlining the -- action itself. -- --

Ridiculously unsafe!

-- -- This is even more unsafe then both unsafePerformIO and -- unsafeDupableInterleaveIO. -- -- The only time it is really safe to use is on idempotent action that -- only read values from memory, but do note do any mutation, allocation -- and certainly not interaction with real world. -- -- In bytestring it is known as -- accursedUnutterablePerformIO. Here are some resources that -- discuss it's unsafety: -- -- unsafeInlineIO :: IO a -> a -- | Take an ST and compute it as a pure value, while inlining the -- action itself. Same as unsafeInlineIO. -- --

Ridiculously unsafe!

unsafeInlineST :: ST s a -> a -- | Take any MonadPrimBase action and compute it as a pure value, -- while inlining the action. Same as unsafeInlineIO, but applied -- to any MonadPrimBase action. -- --

Ridiculously unsafe!

unsafeInlinePrimBase :: MonadPrimBase s m => m a -> a -- | Same as unsafeInterleaveIO, except works in any -- MonadPrimBase unsafeInterleavePrimBase :: MonadPrimBase s m => m a -> m a -- | Same as unsafeDupableInterleaveIO, except works in any -- MonadPrimBase unsafeDupableInterleavePrimBase :: MonadPrimBase s m => m a -> m a -- | This is the "back door" into the IO monad, allowing IO -- computation to be performed at any time. For this to be safe, the -- IO computation should be free of side effects and independent -- of its environment. -- -- If the I/O computation wrapped in unsafePerformIO performs side -- effects, then the relative order in which those side effects take -- place (relative to the main I/O trunk, or other calls to -- unsafePerformIO) is indeterminate. Furthermore, when using -- unsafePerformIO to cause side-effects, you should take the -- following precautions to ensure the side effects are performed as many -- times as you expect them to be. Note that these precautions are -- necessary for GHC, but may not be sufficient, and other compilers may -- require different precautions: -- -- -- -- It is less well known that unsafePerformIO is not type safe. -- For example: -- --
--   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: -- -- HeapOverflow :: AsyncException -- | This exception is raised by another thread calling killThread, -- or by the system if it needs to terminate the thread for some reason. ThreadKilled :: AsyncException -- | This exception is raised by default in the main thread of the program -- when the user requests to terminate the program via the usual -- mechanism(s) (e.g. Control-C in the console). UserInterrupt :: AsyncException -- | Superclass for asynchronous exceptions. data SomeAsyncException SomeAsyncException :: e -> SomeAsyncException isSyncException :: Exception e => e -> Bool isAsyncException :: Exception e => e -> Bool asyncExceptionToException :: Exception e => e -> SomeException asyncExceptionFromException :: Exception e => SomeException -> Maybe e -- | This is thrown when the user calls error. The first -- String is the argument given to error, second -- String is the location. data ErrorCall ErrorCallWithLocation :: String -> String -> ErrorCall pattern ErrorCall :: String -> ErrorCall -- | Arithmetic exceptions. data ArithException Overflow :: ArithException Underflow :: ArithException LossOfPrecision :: ArithException DivideByZero :: ArithException Denormal :: ArithException RatioZeroDenominator :: ArithException -- | Exceptions generated by array operations data ArrayException -- | An attempt was made to index an array outside its declared bounds. IndexOutOfBounds :: String -> ArrayException -- | An attempt was made to evaluate an element of an array that had not -- been initialized. UndefinedElement :: String -> ArrayException -- | assert was applied to False. newtype AssertionFailed AssertionFailed :: String -> AssertionFailed -- | Exceptions that occur in the IO monad. An -- IOException records a more specific error type, a descriptive -- string and maybe the handle that was used when the error was flagged. data IOException -- | Thrown when the runtime system detects that the computation is -- guaranteed not to terminate. Note that there is no guarantee that the -- runtime system will notice whether any given computation is guaranteed -- to terminate or not. data NonTermination NonTermination :: NonTermination -- | Thrown when the program attempts to call atomically, from the -- stm package, inside another call to atomically. data NestedAtomically NestedAtomically :: NestedAtomically -- | The thread is blocked on an MVar, but there are no other -- references to the MVar so it can't ever continue. data BlockedIndefinitelyOnMVar BlockedIndefinitelyOnMVar :: BlockedIndefinitelyOnMVar -- | The thread is waiting to retry an STM transaction, but there are no -- other references to any TVars involved, so it can't ever -- continue. data BlockedIndefinitelyOnSTM BlockedIndefinitelyOnSTM :: BlockedIndefinitelyOnSTM -- | This thread has exceeded its allocation limit. See -- setAllocationCounter and enableAllocationLimit. data AllocationLimitExceeded AllocationLimitExceeded :: AllocationLimitExceeded -- | There are no runnable threads, so the program is deadlocked. The -- Deadlock exception is raised in the main thread only. data Deadlock Deadlock :: Deadlock -- | CallStacks are a lightweight method of obtaining a partial -- call-stack at any point in the program. -- -- A function can request its call-site with the HasCallStack -- constraint. For example, we can define -- --
--   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: -- --
    --
  1. If there is a CallStack in scope -- i.e. the enclosing -- function has a HasCallStack constraint -- GHC will append the -- new call-site to the existing CallStack.
  2. --
  3. If there is no CallStack in scope -- e.g. in the GHCi -- session above -- and the enclosing definition does not have an -- explicit type signature, GHC will infer a HasCallStack -- constraint for the enclosing definition (subject to the monomorphism -- restriction).
  4. --
  5. If there is no CallStack in scope and the enclosing -- definition has an explicit type signature, GHC will solve the -- HasCallStack constraint for the singleton CallStack -- containing just the current call-site.
  6. --
-- -- CallStacks do not interact with the RTS and do not require -- compilation with -prof. On the other hand, as they are built -- up explicitly via the HasCallStack constraints, they will -- generally not contain as much information as the simulated call-stacks -- maintained by the RTS. -- -- A CallStack is a [(String, SrcLoc)]. The -- String is the name of function that was called, the -- SrcLoc is the call-site. The list is ordered with the most -- recently called function at the head. -- -- NOTE: The intrepid user may notice that HasCallStack is just an -- alias for an implicit parameter ?callStack :: CallStack. This -- is an implementation detail and should not be considered part -- of the CallStack API, we may decide to change the -- implementation in the future. data CallStack -- | Request a CallStack. -- -- NOTE: The implicit parameter ?callStack :: CallStack is an -- implementation detail and should not be considered part of the -- CallStack API, we may decide to change the implementation in -- the future. type HasCallStack = ?callStack :: CallStack -- | Return the current CallStack. -- -- Does *not* include the call-site of callStack. callStack :: HasCallStack => CallStack -- | Extract a list of call-sites from the CallStack. -- -- The list is ordered by most recent call. getCallStack :: CallStack -> [([Char], SrcLoc)] -- | Pretty print a CallStack. prettyCallStack :: CallStack -> String -- | A single location in the source code. data SrcLoc SrcLoc :: [Char] -> [Char] -> [Char] -> Int -> Int -> Int -> Int -> SrcLoc [srcLocPackage] :: SrcLoc -> [Char] [srcLocModule] :: SrcLoc -> [Char] [srcLocFile] :: SrcLoc -> [Char] [srcLocStartLine] :: SrcLoc -> Int [srcLocStartCol] :: SrcLoc -> Int [srcLocEndLine] :: SrcLoc -> Int [srcLocEndCol] :: SrcLoc -> Int -- | Pretty print a SrcLoc. prettySrcLoc :: SrcLoc -> String module Control.Prim.Concurrent.MVar -- | Mutable variable that can either be empty or full. Same as -- MVar, but works with any state token therefore it is also -- usable within ST monad. data MVar a s MVar :: MVar# s a -> MVar a s -- | Checks whether supplied MVar is empty. isEmptyMVar :: forall a m s. MonadPrim s m => MVar a s -> m Bool -- | Checks whether supplied MVars refer to the exact same one. isSameMVar :: forall a s. MVar a s -> MVar a s -> Bool -- | Construct an MVar with initial value in it, which is evaluated -- to WHNF newMVar :: forall a m s. MonadPrim s m => a -> m (MVar a s) -- | Construct an MVar with initial value in it. -- -- Same as newMVar from base, but works in any -- MonadPrim. newLazyMVar :: forall a m s. MonadPrim s m => a -> m (MVar a s) -- | Construct an MVar with initial value in it. newDeepMVar :: forall a m s. (NFData a, MonadPrim s m) => a -> m (MVar a s) -- | Construct an empty MVar. -- -- Same as newEmptyMVar from base, but works in any -- MonadPrim. newEmptyMVar :: forall a m s. MonadPrim s m => m (MVar a s) -- | Write a value into an MVar. Blocks the current thread if -- MVar is empty and waits until it gets filled by another thread. -- Evaluates the argument to WHNF prior to writing it. putMVar :: forall a m s. MonadPrim s m => MVar a s -> a -> m () -- | Same as putMVar, but allows to write a thunk into an MVar. -- -- Same as putMVar from base, but works in any -- MonadPrim. putLazyMVar :: forall a m s. MonadPrim s m => MVar a s -> a -> m () -- | Same as putMVar, but evaluates the argument to NF prior to writing it. putDeepMVar :: forall a m s. (NFData a, MonadPrim s m) => MVar a s -> a -> m () -- | Attempt to write a value into MVar. Unlike putMVar this -- function never blocks. It also returns True if MVar was -- empty and placing the value in it turned out to be successfull and -- False otherwise. Evaluates the supplied argumetn to WHNF prior -- to attempting a write operation. tryPutMVar :: forall a m s. MonadPrim s m => MVar a s -> a -> m Bool -- | Same as tryPutMVar, but allows to put thunks into an -- MVar -- -- Same as tryPutMVar from base, but works in any -- MonadPrim. tryPutLazyMVar :: forall a m s. MonadPrim s m => MVar a s -> a -> m Bool -- | Same as tryPutMVar, but evaluates the argument to NF prior to -- attempting to write into the MVar tryPutDeepMVar :: forall a m s. (NFData a, MonadPrim s m) => MVar a s -> a -> m Bool -- | Write a value into the MVar regardless if it is currently empty or -- not. If there is a currently a value it will in the MVar it will -- simply b discarded. However, if there is another thread that is -- blocked on attempt to write into this MVar, current operation will -- block on attempt to fill the MVar. Therefore writeMVar is not -- atomic. Argument is evaluated to WHNF prior to clearing the contents -- of MVar writeMVar :: forall a m s. MonadPrim s m => MVar a s -> a -> m () -- | Get the value from MVar atomically without affecting its -- contents. Blocks the current thread if the MVar is currently -- empty and waits until another thread fills it with a value. -- -- Same as readMVar from base, but works in any -- MonadPrim. readMVar :: forall a m s. MonadPrim s m => MVar a s -> m a -- | Get the value from MVar atomically without affecting its -- contents. It does not block and returns the immediately or -- Nothing if the supplied MVar was empty. -- -- Same as tryReadMVar from base, but works in any -- MonadPrim. tryReadMVar :: forall a m s. MonadPrim s m => MVar a s -> m (Maybe a) -- | Remove the value from MVar and return it. Blocks the cuurent -- thread if MVar is empty and waits until antoher thread fills -- it. -- -- Same as takeMVar from base, but works in any -- MonadPrim. takeMVar :: forall a m s. MonadPrim s m => MVar a s -> m a -- | Remove the value from MVar and return it immediately without -- blocking. Nothing is returned if MVar was empty. -- -- Same as tryTakeMVar from base, but works in any -- MonadPrim. tryTakeMVar :: forall a m s. MonadPrim s m => MVar a s -> m (Maybe a) -- | Remove a value from an MVar, unless it was already empty. It -- effectively empties the MVar however note that by the time this -- action returns there is a possibility that another thread might have -- filled it with a different value. clearMVar :: forall a m s. MonadPrim s m => MVar a s -> m () -- | Replace current value in an MVar with a new one. Supplied value -- is evaluated to WHNF prior to current value being extracted from the -- MVar. If MVar is currently empty this operation will -- block the current thread until it gets filled in another thread. -- Furthermore it is possible for another thread to fill the MVar -- after the old value is extracted, but before the new one has a chance -- to placed inside the MVar, thus blocking current thread once -- more until another thread empties this MVar. In other words -- this operation is not atomic. swapMVar :: forall a m s. MonadPrim s m => MVar a s -> a -> m a -- | Same as swapMVar, but allows writing thunks into the -- MVar. -- -- Same as swapMVar from base, but works in any -- MonadUnliftPrim. swapLazyMVar :: forall a m s. MonadPrim s m => MVar a s -> a -> m a -- | Same as swapMVar, but evaluates the argument value to NF. swapDeepMVar :: forall a m s. (NFData a, MonadPrim s m) => MVar a s -> a -> m a -- | Apply an action to the contents of an MVar. Current thread will -- be blocked if supplied MVar is empty and will wait until another -- thread fills it with a value. While the action is being appplied other -- threads should not put anything into the MVar otherwise current -- thread will get blocked again until another thread empties the -- MVar. In other words this is not an atomic operation, but it is -- exception safe, since the contents of MVar are restored -- regardless of the outcome of supplied action. -- -- Same as withMVar from base, but works in -- MonadUnliftPrim with RealWorld state token. withMVar :: forall a b m. MonadUnliftPrim RW m => MVar a RW -> (a -> m b) -> m b -- | Same as withMVar, but with supplied action executed with async -- exceptions masked, but still interruptable. -- -- Same as withMVarMasked from base, but works in -- MonadUnliftPrim with RealWorld state token. withMVarMasked :: forall a b m. MonadUnliftPrim RW m => MVar a RW -> (a -> m b) -> m b -- | Apply a monadic action to the contents of supplied MVar. -- Provides the same guarantees as withMVar. -- -- Same as modifyMVar_ from base, but is strict with -- respect to result of the action and works in MonadUnliftPrim -- with RealWorld state token. modifyMVar_ :: forall a m. MonadUnliftPrim RW m => MVar a RW -> (a -> m a) -> m () -- | Same as modifyMVarMAsked_, but the supplied action has async -- exceptions masked. -- -- Same as modifyMVar from base, except that it is strict -- in the new value and it works in MonadUnliftPrim with -- RealWorld state token. modifyMVarMasked_ :: forall a m. MonadUnliftPrim RW m => MVar a RW -> (a -> m a) -> m () -- | Same as modifyMVar_, but also returns the original value that -- was stored in the MVar modifyFetchOldMVar :: forall a m. MonadUnliftPrim RW m => MVar a RW -> (a -> m a) -> m a -- | Same as modifyFetchOldMVar, but supplied action will run with -- async exceptions masked, but still interruptible modifyFetchOldMVarMasked :: forall a m. MonadUnliftPrim RW m => MVar a RW -> (a -> m a) -> m a -- | Same as modifyMVar_, but also returns the result of running the -- supplied action, i.e. the new value that got stored in the -- MVar. modifyFetchNewMVar :: forall a m. MonadUnliftPrim RW m => MVar a RW -> (a -> m a) -> m a -- | Same as modifyFetchNewMVar, but supplied action will run with -- async exceptions masked, but still interruptible modifyFetchNewMVarMasked :: forall a m. MonadUnliftPrim RW m => MVar a RW -> (a -> m a) -> m a -- | Apply a monadic action to the contents of supplied MVar. -- Provides the same guarantees as withMVar. -- -- Same as modifyMVar from base, except that it is strict -- in the new value and it works in MonadUnliftPrim with -- RealWorld state token. modifyMVar :: forall a b m. MonadUnliftPrim RW m => MVar a RW -> (a -> m (a, b)) -> m b -- | Apply a monadic action to the contents of supplied MVar. -- Provides the same guarantees as withMVar. -- -- Same as modifyMVarMasked from base, except that it is -- strict in the new value and it works in MonadUnliftPrim with -- RealWorld state token. modifyMVarMasked :: forall a b m. MonadUnliftPrim RW m => MVar a RW -> (a -> m (a, b)) -> m b -- | Create a Weak pointer associated with the supplied MVar. -- -- Same as mkWeakMVar from base, but works in any -- MonadPrim with RealWorld state token. mkWeakMVar :: forall a b m. MonadUnliftPrim RW m => MVar a RW -> m b -> m (Weak (MVar a RW)) -- | Cast MVar into and the MVar from base toBaseMVar :: MVar a RW -> MVar a -- | Cast MVar from base into MVar. fromBaseMVar :: MVar a -> MVar a RW instance GHC.Classes.Eq (Control.Prim.Concurrent.MVar.MVar a s) module Data.Prim.StableName -- | An abstract name for an object, that supports equality and hashing. -- -- Stable names have the following property: -- -- -- -- The reverse is not necessarily true: if two stable names are not -- equal, then the objects they name may still be equal. Note in -- particular that makeStableName may return a different -- StableName after an object is evaluated. -- -- Stable Names are similar to Stable Pointers -- (Foreign.StablePtr), but differ in the following ways: -- -- data StableName a StableName :: StableName# a -> StableName a -- | Makes a StableName for an arbitrary object. The object passed -- as the first argument is not evaluated by makeStableName. makeStableName :: MonadPrim RW m => a -> m (StableName a) -- | Similar to makeDynamicStableName, but returns -- StableName Any and is generalized to MonadPrim makeAnyStableName :: MonadPrim RW m => a -> m (StableName Any) -- | Convert a StableName to an Int. The Int returned -- is not necessarily unique; several StableNames may map to the -- same Int (in practice however, the chances of this are small, -- so the result of hashStableName makes a good hash key). hashStableName :: StableName a -> Int -- | Equality on StableName that does not require that the types of -- the arguments match. eqStableName :: StableName a -> StableName b -> Bool instance GHC.Show.Show (GHC.StableName.StableName a) module Foreign.Prim unsafeThawByteArray# :: ByteArray# -> State# s -> (# State# s, MutableByteArray# s #) mutableByteArrayContents# :: MutableByteArray# s -> Addr# unsafeThawArrayArray# :: ArrayArray# -> State# s -> (# State# s, MutableArrayArray# s #) unInt# :: Int -> Int# unWord# :: Word -> Word# -- | Same as touch#, except it is not restricted to RealWorld -- state token. touch# :: a -> State# s -> State# s -- | Forward compatible operator that might be introduced in some future -- ghc version. -- -- See: #17760 -- -- Current version is not as efficient as the version that will be -- introduced in the future, because it works around the ghc bug by -- simply preventing inlining and relying on the touch function. keepAlive# :: a -> (State# s -> (# State# s, r #)) -> State# s -> (# State# s, r #) -- | Read 8-bit character; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsChar# :: ByteArray# -> Int# -> Char# -- | 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. writeWord8ArrayAsChar# :: MutableByteArray# d -> Int# -> Char# -> State# d -> State# d -- | Read 31-bit character; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsWideChar# :: ByteArray# -> Int# -> 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. writeWord8ArrayAsWideChar# :: MutableByteArray# d -> Int# -> Char# -> State# d -> State# d -- | Read address; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsAddr# :: ByteArray# -> Int# -> Addr# -- | 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. writeWord8ArrayAsAddr# :: MutableByteArray# d -> Int# -> Addr# -> State# d -> State# d -- | Read stable pointer; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsStablePtr# :: ByteArray# -> Int# -> StablePtr# a -- | 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. writeWord8ArrayAsStablePtr# :: MutableByteArray# d -> Int# -> StablePtr# a -> State# d -> State# d -- | Read float; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsFloat# :: ByteArray# -> Int# -> Float# -- | 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. writeWord8ArrayAsFloat# :: MutableByteArray# d -> Int# -> Float# -> State# d -> State# d -- | Read double; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsDouble# :: ByteArray# -> Int# -> Double# -- | 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. writeWord8ArrayAsDouble# :: MutableByteArray# d -> Int# -> Double# -> State# d -> State# d -- | Read 16-bit int; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsInt16# :: ByteArray# -> Int# -> Int# -- | 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. writeWord8ArrayAsInt16# :: MutableByteArray# d -> Int# -> Int# -> State# d -> State# d -- | Read 32-bit int; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsInt32# :: ByteArray# -> Int# -> 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. writeWord8ArrayAsInt32# :: MutableByteArray# d -> Int# -> Int# -> State# d -> State# d -- | Read 64-bit int; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsInt64# :: ByteArray# -> Int# -> 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. writeWord8ArrayAsInt64# :: MutableByteArray# d -> Int# -> Int# -> State# d -> State# d -- | Read int; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsInt# :: ByteArray# -> Int# -> 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. writeWord8ArrayAsInt# :: MutableByteArray# d -> Int# -> Int# -> State# d -> State# d -- | Read 16-bit word; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsWord16# :: ByteArray# -> Int# -> Word# -- | 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. writeWord8ArrayAsWord16# :: MutableByteArray# d -> Int# -> Word# -> State# d -> State# d -- | Read 32-bit word; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsWord32# :: ByteArray# -> Int# -> 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. writeWord8ArrayAsWord32# :: MutableByteArray# d -> Int# -> Word# -> State# d -> State# d -- | Read 64-bit word; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsWord64# :: ByteArray# -> Int# -> 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. writeWord8ArrayAsWord64# :: MutableByteArray# d -> Int# -> Word# -> State# d -> State# d -- | Read word; offset in bytes. -- -- Warning: this can fail with an unchecked exception. indexWord8ArrayAsWord# :: ByteArray# -> Int# -> Word# -- | Warning: this can fail with an unchecked exception. readWord8ArrayAsWord# :: MutableByteArray# d -> Int# -> State# d -> (# State# d, Word# #) -- | Warning: this can fail with an unchecked exception. writeWord8ArrayAsWord# :: MutableByteArray# d -> Int# -> Word# -> State# d -> State# d -- | 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 #) -- | 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 #) -- | 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# -- | Haskell type representing the C bool type. (The concrete -- types of Foreign.C.Types#platform are platform-specific.) newtype CBool CBool :: Word8 -> CBool -- | Determine whether a ByteArray# is guaranteed not to move -- during GC. isByteArrayPinned# :: ByteArray# -> Int# -- | Determine whether a MutableByteArray# is guaranteed not to -- move during GC. isMutableByteArrayPinned# :: MutableByteArray# d -> Int# -- | Return the number of elements in the array. getSizeofMutableByteArray# :: MutableByteArray# d -> State# d -> (# State# d, Int# #) syncXorFetchNewWord64ArrayIO :: MutableByteArray# s -> Int# -> Word64 -> IO Word64 syncXorFetchNewWord64AddrIO :: Addr# -> Int# -> Word64 -> IO Word64 syncXorFetchNewInt64ArrayIO :: MutableByteArray# s -> Int# -> Int64 -> IO Int64 syncXorFetchNewInt64AddrIO :: Addr# -> Int# -> Int64 -> IO Int64 syncXorFetchOldWord64ArrayIO :: MutableByteArray# s -> Int# -> Word64 -> IO Word64 syncXorFetchOldWord64AddrIO :: Addr# -> Int# -> Word64 -> IO Word64 syncXorFetchOldInt64ArrayIO :: MutableByteArray# s -> Int# -> Int64 -> IO Int64 syncXorFetchOldInt64AddrIO :: Addr# -> Int# -> Int64 -> IO Int64 syncOrFetchNewWord64ArrayIO :: MutableByteArray# s -> Int# -> Word64 -> IO Word64 syncOrFetchNewWord64AddrIO :: Addr# -> Int# -> Word64 -> IO Word64 syncOrFetchNewInt64ArrayIO :: MutableByteArray# s -> Int# -> Int64 -> IO Int64 syncOrFetchNewInt64AddrIO :: Addr# -> Int# -> Int64 -> IO Int64 syncOrFetchOldWord64ArrayIO :: MutableByteArray# s -> Int# -> Word64 -> IO Word64 syncOrFetchOldWord64AddrIO :: Addr# -> Int# -> Word64 -> IO Word64 syncOrFetchOldInt64ArrayIO :: MutableByteArray# s -> Int# -> Int64 -> IO Int64 syncOrFetchOldInt64AddrIO :: Addr# -> Int# -> Int64 -> IO Int64 syncNandFetchNewWord64ArrayIO :: MutableByteArray# s -> Int# -> Word64 -> IO Word64 syncNandFetchNewWord64AddrIO :: Addr# -> Int# -> Word64 -> IO Word64 syncNandFetchNewInt64ArrayIO :: MutableByteArray# s -> Int# -> Int64 -> IO Int64 syncNandFetchNewInt64AddrIO :: Addr# -> Int# -> Int64 -> IO Int64 syncNandFetchOldWord64ArrayIO :: MutableByteArray# s -> Int# -> Word64 -> IO Word64 syncNandFetchOldWord64AddrIO :: Addr# -> Int# -> Word64 -> IO Word64 syncNandFetchOldInt64ArrayIO :: MutableByteArray# s -> Int# -> Int64 -> IO Int64 syncNandFetchOldInt64AddrIO :: Addr# -> Int# -> Int64 -> IO Int64 syncAndFetchNewWord64ArrayIO :: MutableByteArray# s -> Int# -> Word64 -> IO Word64 syncAndFetchNewWord64AddrIO :: Addr# -> Int# -> Word64 -> IO Word64 syncAndFetchNewInt64ArrayIO :: MutableByteArray# s -> Int# -> Int64 -> IO Int64 syncAndFetchNewInt64AddrIO :: Addr# -> Int# -> Int64 -> IO Int64 syncAndFetchOldWord64ArrayIO :: MutableByteArray# s -> Int# -> Word64 -> IO Word64 syncAndFetchOldWord64AddrIO :: Addr# -> Int# -> Word64 -> IO Word64 syncAndFetchOldInt64ArrayIO :: MutableByteArray# s -> Int# -> Int64 -> IO Int64 syncAndFetchOldInt64AddrIO :: Addr# -> Int# -> Int64 -> IO Int64 syncSubFetchNewWord64ArrayIO :: MutableByteArray# s -> Int# -> Word64 -> IO Word64 syncSubFetchNewWord64AddrIO :: Addr# -> Int# -> Word64 -> IO Word64 syncSubFetchNewInt64ArrayIO :: MutableByteArray# s -> Int# -> Int64 -> IO Int64 syncSubFetchNewInt64AddrIO :: Addr# -> Int# -> Int64 -> IO Int64 syncSubFetchOldWord64ArrayIO :: MutableByteArray# s -> Int# -> Word64 -> IO Word64 syncSubFetchOldWord64AddrIO :: Addr# -> Int# -> Word64 -> IO Word64 syncSubFetchOldInt64ArrayIO :: MutableByteArray# s -> Int# -> Int64 -> IO Int64 syncSubFetchOldInt64AddrIO :: Addr# -> Int# -> Int64 -> IO Int64 syncAddFetchNewWord64ArrayIO :: MutableByteArray# s -> Int# -> Word64 -> IO Word64 syncAddFetchNewWord64AddrIO :: Addr# -> Int# -> Word64 -> IO Word64 syncAddFetchNewInt64ArrayIO :: MutableByteArray# s -> Int# -> Int64 -> IO Int64 syncAddFetchNewInt64AddrIO :: Addr# -> Int# -> Int64 -> IO Int64 syncAddFetchOldWord64ArrayIO :: MutableByteArray# s -> Int# -> Word64 -> IO Word64 syncAddFetchOldWord64AddrIO :: Addr# -> Int# -> Word64 -> IO Word64 syncAddFetchOldInt64ArrayIO :: MutableByteArray# s -> Int# -> Int64 -> IO Int64 syncAddFetchOldInt64AddrIO :: Addr# -> Int# -> Int64 -> IO Int64 syncCasWord64ArrayIO :: MutableByteArray# s -> Int# -> Word64 -> Word64 -> IO Word64 syncCasWord64AddrIO :: Addr# -> Int# -> Word64 -> Word64 -> IO Word64 syncCasInt64ArrayIO :: MutableByteArray# s -> Int# -> Int64 -> Int64 -> IO Int64 syncCasInt64AddrIO :: Addr# -> Int# -> Int64 -> Int64 -> IO Int64 syncCasWord64BoolArrayIO :: MutableByteArray# s -> Int# -> Word64 -> Word64 -> IO CBool syncCasWord64BoolAddrIO :: Addr# -> Int# -> Word64 -> Word64 -> IO CBool syncCasInt64BoolArrayIO :: MutableByteArray# s -> Int# -> Int64 -> Int64 -> IO CBool syncCasInt64BoolAddrIO :: Addr# -> Int# -> Int64 -> Int64 -> IO CBool syncXorFetchNewWordArrayIO :: MutableByteArray# s -> Int# -> Word -> IO Word syncXorFetchNewWordAddrIO :: Addr# -> Int# -> Word -> IO Word syncXorFetchNewIntArrayIO :: MutableByteArray# s -> Int# -> Int -> IO Int syncXorFetchNewIntAddrIO :: Addr# -> Int# -> Int -> IO Int syncXorFetchOldWordArrayIO :: MutableByteArray# s -> Int# -> Word -> IO Word syncXorFetchOldWordAddrIO :: Addr# -> Int# -> Word -> IO Word syncXorFetchOldIntArrayIO :: MutableByteArray# s -> Int# -> Int -> IO Int syncXorFetchOldIntAddrIO :: Addr# -> Int# -> Int -> IO Int syncOrFetchNewWordArrayIO :: MutableByteArray# s -> Int# -> Word -> IO Word syncOrFetchNewWordAddrIO :: Addr# -> Int# -> Word -> IO Word syncOrFetchNewIntArrayIO :: MutableByteArray# s -> Int# -> Int -> IO Int syncOrFetchNewIntAddrIO :: Addr# -> Int# -> Int -> IO Int syncOrFetchOldWordArrayIO :: MutableByteArray# s -> Int# -> Word -> IO Word syncOrFetchOldWordAddrIO :: Addr# -> Int# -> Word -> IO Word syncOrFetchOldIntArrayIO :: MutableByteArray# s -> Int# -> Int -> IO Int syncOrFetchOldIntAddrIO :: Addr# -> Int# -> Int -> IO Int syncNandFetchNewWordArrayIO :: MutableByteArray# s -> Int# -> Word -> IO Word syncNandFetchNewWordAddrIO :: Addr# -> Int# -> Word -> IO Word syncNandFetchNewIntArrayIO :: MutableByteArray# s -> Int# -> Int -> IO Int syncNandFetchNewIntAddrIO :: Addr# -> Int# -> Int -> IO Int syncNandFetchOldWordArrayIO :: MutableByteArray# s -> Int# -> Word -> IO Word syncNandFetchOldWordAddrIO :: Addr# -> Int# -> Word -> IO Word syncNandFetchOldIntArrayIO :: MutableByteArray# s -> Int# -> Int -> IO Int syncNandFetchOldIntAddrIO :: Addr# -> Int# -> Int -> IO Int syncAndFetchNewWordArrayIO :: MutableByteArray# s -> Int# -> Word -> IO Word syncAndFetchNewWordAddrIO :: Addr# -> Int# -> Word -> IO Word syncAndFetchNewIntArrayIO :: MutableByteArray# s -> Int# -> Int -> IO Int syncAndFetchNewIntAddrIO :: Addr# -> Int# -> Int -> IO Int syncAndFetchOldWordArrayIO :: MutableByteArray# s -> Int# -> Word -> IO Word syncAndFetchOldWordAddrIO :: Addr# -> Int# -> Word -> IO Word syncAndFetchOldIntArrayIO :: MutableByteArray# s -> Int# -> Int -> IO Int syncAndFetchOldIntAddrIO :: Addr# -> Int# -> Int -> IO Int syncSubFetchNewWordArrayIO :: MutableByteArray# s -> Int# -> Word -> IO Word syncSubFetchNewWordAddrIO :: Addr# -> Int# -> Word -> IO Word syncSubFetchNewIntArrayIO :: MutableByteArray# s -> Int# -> Int -> IO Int syncSubFetchNewIntAddrIO :: Addr# -> Int# -> Int -> IO Int syncSubFetchOldWordArrayIO :: MutableByteArray# s -> Int# -> Word -> IO Word syncSubFetchOldWordAddrIO :: Addr# -> Int# -> Word -> IO Word syncSubFetchOldIntArrayIO :: MutableByteArray# s -> Int# -> Int -> IO Int syncSubFetchOldIntAddrIO :: Addr# -> Int# -> Int -> IO Int syncAddFetchNewWordArrayIO :: MutableByteArray# s -> Int# -> Word -> IO Word syncAddFetchNewWordAddrIO :: Addr# -> Int# -> Word -> IO Word syncAddFetchNewIntArrayIO :: MutableByteArray# s -> Int# -> Int -> IO Int syncAddFetchNewIntAddrIO :: Addr# -> Int# -> Int -> IO Int syncAddFetchOldWordArrayIO :: MutableByteArray# s -> Int# -> Word -> IO Word syncAddFetchOldWordAddrIO :: Addr# -> Int# -> Word -> IO Word syncAddFetchOldIntArrayIO :: MutableByteArray# s -> Int# -> Int -> IO Int syncAddFetchOldIntAddrIO :: Addr# -> Int# -> Int -> IO Int syncCasWordArrayIO :: MutableByteArray# s -> Int# -> Word -> Word -> IO Word syncCasWordAddrIO :: Addr# -> Int# -> Word -> Word -> IO Word syncCasIntArrayIO :: MutableByteArray# s -> Int# -> Int -> Int -> IO Int syncCasIntAddrIO :: Addr# -> Int# -> Int -> Int -> IO Int syncCasWordBoolArrayIO :: MutableByteArray# s -> Int# -> Word -> Word -> IO CBool syncCasWordBoolAddrIO :: Addr# -> Int# -> Word -> Word -> IO CBool syncCasIntBoolArrayIO :: MutableByteArray# s -> Int# -> Int -> Int -> IO CBool syncCasIntBoolAddrIO :: Addr# -> Int# -> Int -> Int -> IO CBool syncXorFetchNewWord32ArrayIO :: MutableByteArray# s -> Int# -> Word32 -> IO Word32 syncXorFetchNewWord32AddrIO :: Addr# -> Int# -> Word32 -> IO Word32 syncXorFetchNewInt32ArrayIO :: MutableByteArray# s -> Int# -> Int32 -> IO Int32 syncXorFetchNewInt32AddrIO :: Addr# -> Int# -> Int32 -> IO Int32 syncXorFetchOldWord32ArrayIO :: MutableByteArray# s -> Int# -> Word32 -> IO Word32 syncXorFetchOldWord32AddrIO :: Addr# -> Int# -> Word32 -> IO Word32 syncXorFetchOldInt32ArrayIO :: MutableByteArray# s -> Int# -> Int32 -> IO Int32 syncXorFetchOldInt32AddrIO :: Addr# -> Int# -> Int32 -> IO Int32 syncOrFetchNewWord32ArrayIO :: MutableByteArray# s -> Int# -> Word32 -> IO Word32 syncOrFetchNewWord32AddrIO :: Addr# -> Int# -> Word32 -> IO Word32 syncOrFetchNewInt32ArrayIO :: MutableByteArray# s -> Int# -> Int32 -> IO Int32 syncOrFetchNewInt32AddrIO :: Addr# -> Int# -> Int32 -> IO Int32 syncOrFetchOldWord32ArrayIO :: MutableByteArray# s -> Int# -> Word32 -> IO Word32 syncOrFetchOldWord32AddrIO :: Addr# -> Int# -> Word32 -> IO Word32 syncOrFetchOldInt32ArrayIO :: MutableByteArray# s -> Int# -> Int32 -> IO Int32 syncOrFetchOldInt32AddrIO :: Addr# -> Int# -> Int32 -> IO Int32 syncNandFetchNewWord32ArrayIO :: MutableByteArray# s -> Int# -> Word32 -> IO Word32 syncNandFetchNewWord32AddrIO :: Addr# -> Int# -> Word32 -> IO Word32 syncNandFetchNewInt32ArrayIO :: MutableByteArray# s -> Int# -> Int32 -> IO Int32 syncNandFetchNewInt32AddrIO :: Addr# -> Int# -> Int32 -> IO Int32 syncNandFetchOldWord32ArrayIO :: MutableByteArray# s -> Int# -> Word32 -> IO Word32 syncNandFetchOldWord32AddrIO :: Addr# -> Int# -> Word32 -> IO Word32 syncNandFetchOldInt32ArrayIO :: MutableByteArray# s -> Int# -> Int32 -> IO Int32 syncNandFetchOldInt32AddrIO :: Addr# -> Int# -> Int32 -> IO Int32 syncAndFetchNewWord32ArrayIO :: MutableByteArray# s -> Int# -> Word32 -> IO Word32 syncAndFetchNewWord32AddrIO :: Addr# -> Int# -> Word32 -> IO Word32 syncAndFetchNewInt32ArrayIO :: MutableByteArray# s -> Int# -> Int32 -> IO Int32 syncAndFetchNewInt32AddrIO :: Addr# -> Int# -> Int32 -> IO Int32 syncAndFetchOldWord32ArrayIO :: MutableByteArray# s -> Int# -> Word32 -> IO Word32 syncAndFetchOldWord32AddrIO :: Addr# -> Int# -> Word32 -> IO Word32 syncAndFetchOldInt32ArrayIO :: MutableByteArray# s -> Int# -> Int32 -> IO Int32 syncAndFetchOldInt32AddrIO :: Addr# -> Int# -> Int32 -> IO Int32 syncSubFetchNewWord32ArrayIO :: MutableByteArray# s -> Int# -> Word32 -> IO Word32 syncSubFetchNewWord32AddrIO :: Addr# -> Int# -> Word32 -> IO Word32 syncSubFetchNewInt32ArrayIO :: MutableByteArray# s -> Int# -> Int32 -> IO Int32 syncSubFetchNewInt32AddrIO :: Addr# -> Int# -> Int32 -> IO Int32 syncSubFetchOldWord32ArrayIO :: MutableByteArray# s -> Int# -> Word32 -> IO Word32 syncSubFetchOldWord32AddrIO :: Addr# -> Int# -> Word32 -> IO Word32 syncSubFetchOldInt32ArrayIO :: MutableByteArray# s -> Int# -> Int32 -> IO Int32 syncSubFetchOldInt32AddrIO :: Addr# -> Int# -> Int32 -> IO Int32 syncAddFetchNewWord32ArrayIO :: MutableByteArray# s -> Int# -> Word32 -> IO Word32 syncAddFetchNewWord32AddrIO :: Addr# -> Int# -> Word32 -> IO Word32 syncAddFetchNewInt32ArrayIO :: MutableByteArray# s -> Int# -> Int32 -> IO Int32 syncAddFetchNewInt32AddrIO :: Addr# -> Int# -> Int32 -> IO Int32 syncAddFetchOldWord32ArrayIO :: MutableByteArray# s -> Int# -> Word32 -> IO Word32 syncAddFetchOldWord32AddrIO :: Addr# -> Int# -> Word32 -> IO Word32 syncAddFetchOldInt32ArrayIO :: MutableByteArray# s -> Int# -> Int32 -> IO Int32 syncAddFetchOldInt32AddrIO :: Addr# -> Int# -> Int32 -> IO Int32 syncCasWord32ArrayIO :: MutableByteArray# s -> Int# -> Word32 -> Word32 -> IO Word32 syncCasWord32AddrIO :: Addr# -> Int# -> Word32 -> Word32 -> IO Word32 syncCasInt32ArrayIO :: MutableByteArray# s -> Int# -> Int32 -> Int32 -> IO Int32 syncCasInt32AddrIO :: Addr# -> Int# -> Int32 -> Int32 -> IO Int32 syncCasWord32BoolArrayIO :: MutableByteArray# s -> Int# -> Word32 -> Word32 -> IO CBool syncCasWord32BoolAddrIO :: Addr# -> Int# -> Word32 -> Word32 -> IO CBool syncCasInt32BoolArrayIO :: MutableByteArray# s -> Int# -> Int32 -> Int32 -> IO CBool syncCasInt32BoolAddrIO :: Addr# -> Int# -> Int32 -> Int32 -> IO CBool syncXorFetchNewWord16ArrayIO :: MutableByteArray# s -> Int# -> Word16 -> IO Word16 syncXorFetchNewWord16AddrIO :: Addr# -> Int# -> Word16 -> IO Word16 syncXorFetchNewInt16ArrayIO :: MutableByteArray# s -> Int# -> Int16 -> IO Int16 syncXorFetchNewInt16AddrIO :: Addr# -> Int# -> Int16 -> IO Int16 syncXorFetchOldWord16ArrayIO :: MutableByteArray# s -> Int# -> Word16 -> IO Word16 syncXorFetchOldWord16AddrIO :: Addr# -> Int# -> Word16 -> IO Word16 syncXorFetchOldInt16ArrayIO :: MutableByteArray# s -> Int# -> Int16 -> IO Int16 syncXorFetchOldInt16AddrIO :: Addr# -> Int# -> Int16 -> IO Int16 syncOrFetchNewWord16ArrayIO :: MutableByteArray# s -> Int# -> Word16 -> IO Word16 syncOrFetchNewWord16AddrIO :: Addr# -> Int# -> Word16 -> IO Word16 syncOrFetchNewInt16ArrayIO :: MutableByteArray# s -> Int# -> Int16 -> IO Int16 syncOrFetchNewInt16AddrIO :: Addr# -> Int# -> Int16 -> IO Int16 syncOrFetchOldWord16ArrayIO :: MutableByteArray# s -> Int# -> Word16 -> IO Word16 syncOrFetchOldWord16AddrIO :: Addr# -> Int# -> Word16 -> IO Word16 syncOrFetchOldInt16ArrayIO :: MutableByteArray# s -> Int# -> Int16 -> IO Int16 syncOrFetchOldInt16AddrIO :: Addr# -> Int# -> Int16 -> IO Int16 syncNandFetchNewWord16ArrayIO :: MutableByteArray# s -> Int# -> Word16 -> IO Word16 syncNandFetchNewWord16AddrIO :: Addr# -> Int# -> Word16 -> IO Word16 syncNandFetchNewInt16ArrayIO :: MutableByteArray# s -> Int# -> Int16 -> IO Int16 syncNandFetchNewInt16AddrIO :: Addr# -> Int# -> Int16 -> IO Int16 syncNandFetchOldWord16ArrayIO :: MutableByteArray# s -> Int# -> Word16 -> IO Word16 syncNandFetchOldWord16AddrIO :: Addr# -> Int# -> Word16 -> IO Word16 syncNandFetchOldInt16ArrayIO :: MutableByteArray# s -> Int# -> Int16 -> IO Int16 syncNandFetchOldInt16AddrIO :: Addr# -> Int# -> Int16 -> IO Int16 syncAndFetchNewWord16ArrayIO :: MutableByteArray# s -> Int# -> Word16 -> IO Word16 syncAndFetchNewWord16AddrIO :: Addr# -> Int# -> Word16 -> IO Word16 syncAndFetchNewInt16ArrayIO :: MutableByteArray# s -> Int# -> Int16 -> IO Int16 syncAndFetchNewInt16AddrIO :: Addr# -> Int# -> Int16 -> IO Int16 syncAndFetchOldWord16ArrayIO :: MutableByteArray# s -> Int# -> Word16 -> IO Word16 syncAndFetchOldWord16AddrIO :: Addr# -> Int# -> Word16 -> IO Word16 syncAndFetchOldInt16ArrayIO :: MutableByteArray# s -> Int# -> Int16 -> IO Int16 syncAndFetchOldInt16AddrIO :: Addr# -> Int# -> Int16 -> IO Int16 syncSubFetchNewWord16ArrayIO :: MutableByteArray# s -> Int# -> Word16 -> IO Word16 syncSubFetchNewWord16AddrIO :: Addr# -> Int# -> Word16 -> IO Word16 syncSubFetchNewInt16ArrayIO :: MutableByteArray# s -> Int# -> Int16 -> IO Int16 syncSubFetchNewInt16AddrIO :: Addr# -> Int# -> Int16 -> IO Int16 syncSubFetchOldWord16ArrayIO :: MutableByteArray# s -> Int# -> Word16 -> IO Word16 syncSubFetchOldWord16AddrIO :: Addr# -> Int# -> Word16 -> IO Word16 syncSubFetchOldInt16ArrayIO :: MutableByteArray# s -> Int# -> Int16 -> IO Int16 syncSubFetchOldInt16AddrIO :: Addr# -> Int# -> Int16 -> IO Int16 syncAddFetchNewWord16ArrayIO :: MutableByteArray# s -> Int# -> Word16 -> IO Word16 syncAddFetchNewWord16AddrIO :: Addr# -> Int# -> Word16 -> IO Word16 syncAddFetchNewInt16ArrayIO :: MutableByteArray# s -> Int# -> Int16 -> IO Int16 syncAddFetchNewInt16AddrIO :: Addr# -> Int# -> Int16 -> IO Int16 syncAddFetchOldWord16ArrayIO :: MutableByteArray# s -> Int# -> Word16 -> IO Word16 syncAddFetchOldWord16AddrIO :: Addr# -> Int# -> Word16 -> IO Word16 syncAddFetchOldInt16ArrayIO :: MutableByteArray# s -> Int# -> Int16 -> IO Int16 syncAddFetchOldInt16AddrIO :: Addr# -> Int# -> Int16 -> IO Int16 syncCasWord16ArrayIO :: MutableByteArray# s -> Int# -> Word16 -> Word16 -> IO Word16 syncCasWord16AddrIO :: Addr# -> Int# -> Word16 -> Word16 -> IO Word16 syncCasInt16ArrayIO :: MutableByteArray# s -> Int# -> Int16 -> Int16 -> IO Int16 syncCasInt16AddrIO :: Addr# -> Int# -> Int16 -> Int16 -> IO Int16 syncCasWord16BoolArrayIO :: MutableByteArray# s -> Int# -> Word16 -> Word16 -> IO CBool syncCasWord16BoolAddrIO :: Addr# -> Int# -> Word16 -> Word16 -> IO CBool syncCasInt16BoolArrayIO :: MutableByteArray# s -> Int# -> Int16 -> Int16 -> IO CBool syncCasInt16BoolAddrIO :: Addr# -> Int# -> Int16 -> Int16 -> IO CBool syncXorFetchNewWord8ArrayIO :: MutableByteArray# s -> Int# -> Word8 -> IO Word8 syncXorFetchNewWord8AddrIO :: Addr# -> Int# -> Word8 -> IO Word8 syncXorFetchNewInt8ArrayIO :: MutableByteArray# s -> Int# -> Int8 -> IO Int8 syncXorFetchNewInt8AddrIO :: Addr# -> Int# -> Int8 -> IO Int8 syncXorFetchOldWord8ArrayIO :: MutableByteArray# s -> Int# -> Word8 -> IO Word8 syncXorFetchOldWord8AddrIO :: Addr# -> Int# -> Word8 -> IO Word8 syncXorFetchOldInt8ArrayIO :: MutableByteArray# s -> Int# -> Int8 -> IO Int8 syncXorFetchOldInt8AddrIO :: Addr# -> Int# -> Int8 -> IO Int8 syncOrFetchNewWord8ArrayIO :: MutableByteArray# s -> Int# -> Word8 -> IO Word8 syncOrFetchNewWord8AddrIO :: Addr# -> Int# -> Word8 -> IO Word8 syncOrFetchNewInt8ArrayIO :: MutableByteArray# s -> Int# -> Int8 -> IO Int8 syncOrFetchNewInt8AddrIO :: Addr# -> Int# -> Int8 -> IO Int8 syncOrFetchOldWord8ArrayIO :: MutableByteArray# s -> Int# -> Word8 -> IO Word8 syncOrFetchOldWord8AddrIO :: Addr# -> Int# -> Word8 -> IO Word8 syncOrFetchOldInt8ArrayIO :: MutableByteArray# s -> Int# -> Int8 -> IO Int8 syncOrFetchOldInt8AddrIO :: Addr# -> Int# -> Int8 -> IO Int8 syncNandFetchNewWord8ArrayIO :: MutableByteArray# s -> Int# -> Word8 -> IO Word8 syncNandFetchNewWord8AddrIO :: Addr# -> Int# -> Word8 -> IO Word8 syncNandFetchNewInt8ArrayIO :: MutableByteArray# s -> Int# -> Int8 -> IO Int8 syncNandFetchNewInt8AddrIO :: Addr# -> Int# -> Int8 -> IO Int8 syncNandFetchOldWord8ArrayIO :: MutableByteArray# s -> Int# -> Word8 -> IO Word8 syncNandFetchOldWord8AddrIO :: Addr# -> Int# -> Word8 -> IO Word8 syncNandFetchOldInt8ArrayIO :: MutableByteArray# s -> Int# -> Int8 -> IO Int8 syncNandFetchOldInt8AddrIO :: Addr# -> Int# -> Int8 -> IO Int8 syncAndFetchNewWord8ArrayIO :: MutableByteArray# s -> Int# -> Word8 -> IO Word8 syncAndFetchNewWord8AddrIO :: Addr# -> Int# -> Word8 -> IO Word8 syncAndFetchNewInt8ArrayIO :: MutableByteArray# s -> Int# -> Int8 -> IO Int8 syncAndFetchNewInt8AddrIO :: Addr# -> Int# -> Int8 -> IO Int8 syncAndFetchOldWord8ArrayIO :: MutableByteArray# s -> Int# -> Word8 -> IO Word8 syncAndFetchOldWord8AddrIO :: Addr# -> Int# -> Word8 -> IO Word8 syncAndFetchOldInt8ArrayIO :: MutableByteArray# s -> Int# -> Int8 -> IO Int8 syncAndFetchOldInt8AddrIO :: Addr# -> Int# -> Int8 -> IO Int8 syncSubFetchNewWord8ArrayIO :: MutableByteArray# s -> Int# -> Word8 -> IO Word8 syncSubFetchNewWord8AddrIO :: Addr# -> Int# -> Word8 -> IO Word8 syncSubFetchNewInt8ArrayIO :: MutableByteArray# s -> Int# -> Int8 -> IO Int8 syncSubFetchNewInt8AddrIO :: Addr# -> Int# -> Int8 -> IO Int8 syncSubFetchOldWord8ArrayIO :: MutableByteArray# s -> Int# -> Word8 -> IO Word8 syncSubFetchOldWord8AddrIO :: Addr# -> Int# -> Word8 -> IO Word8 syncSubFetchOldInt8ArrayIO :: MutableByteArray# s -> Int# -> Int8 -> IO Int8 syncSubFetchOldInt8AddrIO :: Addr# -> Int# -> Int8 -> IO Int8 syncAddFetchNewWord8ArrayIO :: MutableByteArray# s -> Int# -> Word8 -> IO Word8 syncAddFetchNewWord8AddrIO :: Addr# -> Int# -> Word8 -> IO Word8 syncAddFetchNewInt8ArrayIO :: MutableByteArray# s -> Int# -> Int8 -> IO Int8 syncAddFetchNewInt8AddrIO :: Addr# -> Int# -> Int8 -> IO Int8 syncAddFetchOldWord8ArrayIO :: MutableByteArray# s -> Int# -> Word8 -> IO Word8 syncAddFetchOldWord8AddrIO :: Addr# -> Int# -> Word8 -> IO Word8 syncAddFetchOldInt8ArrayIO :: MutableByteArray# s -> Int# -> Int8 -> IO Int8 syncAddFetchOldInt8AddrIO :: Addr# -> Int# -> Int8 -> IO Int8 syncCasWord8ArrayIO :: MutableByteArray# s -> Int# -> Word8 -> Word8 -> IO Word8 syncCasWord8AddrIO :: Addr# -> Int# -> Word8 -> Word8 -> IO Word8 syncCasInt8ArrayIO :: MutableByteArray# s -> Int# -> Int8 -> Int8 -> IO Int8 syncCasInt8AddrIO :: Addr# -> Int# -> Int8 -> Int8 -> IO Int8 syncCasWord8BoolArrayIO :: MutableByteArray# s -> Int# -> Word8 -> Word8 -> IO CBool syncCasWord8BoolAddrIO :: Addr# -> Int# -> Word8 -> Word8 -> IO CBool syncCasInt8BoolArrayIO :: MutableByteArray# s -> Int# -> Int8 -> Int8 -> IO CBool syncCasInt8BoolAddrIO :: Addr# -> Int# -> Int8 -> Int8 -> IO CBool syncLockReleaseInt8AddrIO :: Addr# -> Int# -> IO () syncLockReleaseInt8ArrayIO :: MutableByteArray# s -> Int# -> IO () syncLockTestSetInt8AddrIO :: Addr# -> Int# -> IO Int8 syncLockTestSetInt8ArrayIO :: MutableByteArray# s -> Int# -> IO Int8 syncSynchronize :: IO () -- | Helper function for converting casBool IO actions ioCBoolToBoolBase :: IO CBool -> State# s -> (# State# s, Bool #) -- | Memory barrier. This will ensure that the cache is fully -- updated before continuing. syncSynchronize# :: State# s -> State# s withMemBarrier# :: (State# s -> (# State# s, a #)) -> State# s -> (# State# s, a #) withMemBarrier_# :: (State# s -> State# s) -> State# s -> State# s -- | Because GC is guaranteed not to move unpinned memory during the unsafe -- FFI call we can compare memory pointers on the C side. Because the -- addresses cannot change underneath us we can safely guarantee pointer -- equality for the same pinned or unpinned arrays isSameByteArray# :: ByteArray# -> ByteArray# -> Int# isSameMutableByteArray# :: MutableByteArray# s -> MutableByteArray# s -> Int# -- | Convert memcmp result into an ordering toOrdering# :: Int# -> Ordering fromOrdering# :: Ordering -> Int# memcmpAddr# :: Addr# -> Int# -> Addr# -> Int# -> Int# -> Int# memcmpAddrByteArray# :: Addr# -> Int# -> ByteArray# -> Int# -> Int# -> Int# memcmpByteArray# :: ByteArray# -> Int# -> ByteArray# -> Int# -> Int# -> Int# memcmpByteArrayAddr# :: ByteArray# -> Int# -> Addr# -> Int# -> Int# -> Int# memsetWord8MutableByteArray# :: MutableByteArray# s -> Int# -> Int# -> Word8 -> IO () memsetWord8Addr# :: Addr# -> Int# -> Int# -> Word8 -> IO () memsetInt8MutableByteArray# :: MutableByteArray# s -> Int# -> Int# -> Int8 -> IO () memsetInt8Addr# :: Addr# -> Int# -> Int# -> Int8 -> IO () memsetWord16MutableByteArray# :: MutableByteArray# s -> Int# -> Int# -> Word16 -> IO () memsetWord16Addr# :: Addr# -> Int# -> Int# -> Word16 -> IO () memsetInt16MutableByteArray# :: MutableByteArray# s -> Int# -> Int# -> Int16 -> IO () memsetInt16Addr# :: Addr# -> Int# -> Int# -> Int16 -> IO () memsetWord32MutableByteArray# :: MutableByteArray# s -> Int# -> Int# -> Word32 -> IO () memsetWord32Addr# :: Addr# -> Int# -> Int# -> Word32 -> IO () memsetInt32MutableByteArray# :: MutableByteArray# s -> Int# -> Int# -> Int32 -> IO () memsetInt32Addr# :: Addr# -> Int# -> Int# -> Int32 -> IO () memsetWord64MutableByteArray# :: MutableByteArray# s -> Int# -> Int# -> Word64 -> IO () memsetWord64Addr# :: Addr# -> Int# -> Int# -> Word64 -> IO () memsetInt64MutableByteArray# :: MutableByteArray# s -> Int# -> Int# -> Int64 -> IO () memsetInt64Addr# :: Addr# -> Int# -> Int# -> Int64 -> IO () memmoveAddr# :: Addr# -> Int# -> Addr# -> Int# -> Int# -> IO () memmoveMutableByteArray# :: MutableByteArray# s -> Int# -> MutableByteArray# s -> Int# -> Int# -> IO () memmoveMutableByteArrayToAddr# :: MutableByteArray# s -> Int# -> Addr# -> Int# -> Int# -> IO () memmoveMutableByteArrayFromAddr# :: Addr# -> Int# -> MutableByteArray# s -> Int# -> Int# -> IO () -- | Cast a 32bit Word into a Float word32ToFloat# :: Word# -> Float# -- | Cast a Float into a 32bit Word floatToWord32# :: Float# -> Word# -- | Cast a 64bit Word into a Double word64ToDouble# :: Word# -> Double# -- | Cast a Double into a 64bit Word doubleToWord64# :: Double# -> Word# getSizeofMutableArray# :: MutableArray# s a -> State# s -> (# State# s, Int# #) shrinkMutableArray# :: MutableArray# s a -> Int# -> State# s -> State# s resizeMutableArray# :: MutableArray# s a -> Int# -> a -> State# s -> (# State# s, MutableArray# s a #) -- | A shorter synonym for the magical RealWorld type RW = RealWorld -- | A value of type IO a is a computation which, when -- performed, does some I/O before returning a value of type a. -- -- There is really only one way to "perform" an I/O action: bind it to -- Main.main in your program. When your program is run, the I/O -- will be performed. It isn't possible to perform I/O from an arbitrary -- function, unless that function is itself in the IO monad and -- called at some point, directly or indirectly, from Main.main. -- -- IO is a monad, so IO actions can be combined using -- either the do-notation or the >> and >>= -- operations from the Monad class. newtype IO a IO :: (State# RealWorld -> (# State# RealWorld, a #)) -> IO a unIO :: IO a -> State# RealWorld -> (# State# RealWorld, a #) -- | Unwrap IO that returns unit unIO_ :: IO () -> State# RW -> State# RW -- | The strict ST monad. The ST monad allows for destructive -- updates, but is escapable (unlike IO). A computation of type -- ST s a returns a value of type a, and execute -- in "thread" s. The s parameter is either -- -- -- -- It serves to keep the internal states of different invocations of -- runST separate from each other and from invocations of -- stToIO. -- -- The >>= and >> operations are strict in the -- state (though not in values stored in the state). For example, -- --
--   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): -- -- -- -- Other uses of unsafeCoerce# are undefined. In particular, you -- should not use unsafeCoerce# to cast a T to an algebraic data -- type D, unless T is also an algebraic data type. For example, do not -- cast Int->Int to Bool, even if you later cast -- that Bool back to Int->Int before applying it. -- The reasons have to do with GHC's internal representation details (for -- the cognoscenti, data values can be entered but function closures -- cannot). If you want a safe type to cast things to, use Any, -- which is not an algebraic data type. -- -- Warning: this can fail with an unchecked exception. unsafeCoerce# :: forall (k0 :: RuntimeRep) (k1 :: RuntimeRep) (a :: TYPE k0) (b :: TYPE k1). a -> b -- | The null address. nullAddr# :: Addr# -- | The lazy function restrains strictness analysis a little. The -- call lazy e means the same as e, but lazy has -- a magical property so far as strictness analysis is concerned: it is -- lazy in its first argument, even though its semantics is strict. After -- strictness analysis has run, calls to lazy are inlined to be -- the identity function. -- -- This behaviour is occasionally useful when controlling evaluation -- order. Notably, lazy is used in the library definition of -- par: -- --
--   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 -- -- -- -- A value of type FunPtr a may be a pointer to a foreign -- function, either returned by another foreign function or imported with -- a a static address import like -- --
--   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: -- -- class Prim a where { type family PrimBase a :: *; type family SizeOf a :: Nat; type family Alignment a :: Nat; type SizeOf a = SizeOf (PrimBase a); type Alignment a = Alignment (PrimBase a); } toPrimBase :: Prim a => a -> PrimBase a toPrimBase :: (Prim a, Coercible a (PrimBase a)) => a -> PrimBase a fromPrimBase :: Prim a => PrimBase a -> a fromPrimBase :: (Prim a, Coercible a (PrimBase a)) => PrimBase a -> a -- | Returned value must match the SizeOf type level Nat sizeOf# :: Prim a => Proxy# a -> Int# -- | Returned value must match the SizeOf type level Nat sizeOf# :: (Prim a, Prim (PrimBase a)) => Proxy# a -> Int# -- | Returned value must match the Alignment type level Nat alignment# :: Prim a => Proxy# a -> Int# -- | Returned value must match the Alignment type level Nat alignment# :: (Prim a, Prim (PrimBase a)) => Proxy# a -> Int# indexByteOffByteArray# :: Prim a => ByteArray# -> Int# -> a indexByteOffByteArray# :: (Prim a, Prim (PrimBase a)) => ByteArray# -> Int# -> a indexByteArray# :: Prim a => ByteArray# -> Int# -> a indexByteArray# :: (Prim a, Prim (PrimBase a)) => ByteArray# -> Int# -> a indexOffAddr# :: Prim a => Addr# -> Int# -> a indexOffAddr# :: (Prim a, Prim (PrimBase a)) => Addr# -> Int# -> a readByteOffMutableByteArray# :: Prim a => MutableByteArray# s -> Int# -> State# s -> (# State# s, a #) readByteOffMutableByteArray# :: (Prim a, Prim (PrimBase a)) => MutableByteArray# s -> Int# -> State# s -> (# State# s, a #) readMutableByteArray# :: Prim a => MutableByteArray# s -> Int# -> State# s -> (# State# s, a #) readMutableByteArray# :: (Prim a, Prim (PrimBase a)) => MutableByteArray# s -> Int# -> State# s -> (# State# s, a #) readOffAddr# :: Prim a => Addr# -> Int# -> State# s -> (# State# s, a #) readOffAddr# :: (Prim a, Prim (PrimBase a)) => Addr# -> Int# -> State# s -> (# State# s, a #) writeByteOffMutableByteArray# :: Prim a => MutableByteArray# s -> Int# -> a -> State# s -> State# s writeByteOffMutableByteArray# :: (Prim a, Prim (PrimBase a)) => MutableByteArray# s -> Int# -> a -> State# s -> State# s writeMutableByteArray# :: Prim a => MutableByteArray# s -> Int# -> a -> State# s -> State# s writeMutableByteArray# :: (Prim a, Prim (PrimBase a)) => MutableByteArray# s -> Int# -> a -> State# s -> State# s writeOffAddr# :: Prim a => Addr# -> Int# -> a -> State# s -> State# s writeOffAddr# :: (Prim a, Prim (PrimBase a)) => Addr# -> Int# -> a -> State# s -> State# s -- | Set the region of MutableByteArray to the same value. Offset is in -- number of elements setMutableByteArray# :: Prim a => MutableByteArray# s -> Int# -> Int# -> a -> State# s -> State# s -- | Set the region of MutableByteArray to the same value. Offset is in -- number of elements setMutableByteArray# :: (Prim a, Prim (PrimBase a)) => MutableByteArray# s -> Int# -> Int# -> a -> State# s -> State# s -- | Set the region of memory to the same value. Offset is in number of -- elements setOffAddr# :: Prim a => Addr# -> Int# -> Int# -> a -> State# s -> State# s -- | Set the region of memory to the same value. Offset is in number of -- elements setOffAddr# :: (Prim a, Prim (PrimBase a)) => Addr# -> Int# -> Int# -> a -> State# s -> State# s -- | A loop that uses writeMutableByteArray# to set the values in -- the region. It is a suboptimal way to fill the memory with a single -- value that is why it is only provided here for convenience setMutableByteArrayLoop# :: Prim a => MutableByteArray# s -> Int# -> Int# -> a -> State# s -> State# s setOffAddrLoop# :: Prim a => Addr# -> Int# -> Int# -> a -> State# s -> State# s errorImpossible :: String -> String -> a bool2Int# :: Bool -> Int# int2Bool# :: Int# -> Bool -- | 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 instance (Data.Prim.Class.Prim a, Data.Prim.Class.Prim b) => Data.Prim.Class.Prim (Data.Either.Either a b) instance Data.Prim.Class.Prim () instance forall k (a :: k) (b :: k). (a GHC.Types.~ b) => Data.Prim.Class.Prim (a Data.Type.Equality.:~: b) instance Data.Prim.Class.Prim GHC.Types.Int instance Data.Prim.Class.Prim GHC.Int.Int8 instance Data.Prim.Class.Prim GHC.Int.Int16 instance Data.Prim.Class.Prim GHC.Int.Int32 instance Data.Prim.Class.Prim GHC.Int.Int64 instance Data.Prim.Class.Prim GHC.Types.Word instance Data.Prim.Class.Prim GHC.Word.Word8 instance Data.Prim.Class.Prim GHC.Word.Word16 instance Data.Prim.Class.Prim GHC.Word.Word32 instance Data.Prim.Class.Prim GHC.Word.Word64 instance Data.Prim.Class.Prim GHC.Types.Float instance Data.Prim.Class.Prim GHC.Types.Double instance Data.Prim.Class.Prim GHC.Types.Bool instance Data.Prim.Class.Prim GHC.Types.Char instance Data.Prim.Class.Prim (GHC.Ptr.Ptr a) instance Data.Prim.Class.Prim (GHC.Ptr.FunPtr a) instance Data.Prim.Class.Prim (GHC.Stable.StablePtr a) instance Data.Prim.Class.Prim Foreign.Ptr.IntPtr instance Data.Prim.Class.Prim Foreign.Ptr.WordPtr instance Data.Prim.Class.Prim Foreign.C.Types.CBool instance Data.Prim.Class.Prim Foreign.C.Types.CChar instance Data.Prim.Class.Prim Foreign.C.Types.CSChar instance Data.Prim.Class.Prim Foreign.C.Types.CUChar instance Data.Prim.Class.Prim Foreign.C.Types.CShort instance Data.Prim.Class.Prim Foreign.C.Types.CUShort instance Data.Prim.Class.Prim Foreign.C.Types.CInt instance Data.Prim.Class.Prim Foreign.C.Types.CUInt instance Data.Prim.Class.Prim Foreign.C.Types.CLong instance Data.Prim.Class.Prim Foreign.C.Types.CULong instance Data.Prim.Class.Prim Foreign.C.Types.CLLong instance Data.Prim.Class.Prim Foreign.C.Types.CULLong instance Data.Prim.Class.Prim Foreign.C.Types.CPtrdiff instance Data.Prim.Class.Prim Foreign.C.Types.CSize instance Data.Prim.Class.Prim Foreign.C.Types.CWchar instance Data.Prim.Class.Prim Foreign.C.Types.CSigAtomic instance Data.Prim.Class.Prim Foreign.C.Types.CIntPtr instance Data.Prim.Class.Prim Foreign.C.Types.CUIntPtr instance Data.Prim.Class.Prim Foreign.C.Types.CIntMax instance Data.Prim.Class.Prim Foreign.C.Types.CUIntMax instance Data.Prim.Class.Prim Foreign.C.Types.CFloat instance Data.Prim.Class.Prim Foreign.C.Types.CDouble instance Data.Prim.Class.Prim System.Posix.Types.Fd instance Data.Prim.Class.Prim Foreign.C.Error.Errno instance Data.Prim.Class.Prim System.Posix.Types.CDev instance Data.Prim.Class.Prim System.Posix.Types.CIno instance Data.Prim.Class.Prim System.Posix.Types.CMode instance Data.Prim.Class.Prim System.Posix.Types.COff instance Data.Prim.Class.Prim System.Posix.Types.CPid instance Data.Prim.Class.Prim System.Posix.Types.CSsize instance Data.Prim.Class.Prim System.Posix.Types.CGid instance Data.Prim.Class.Prim System.Posix.Types.CNlink instance Data.Prim.Class.Prim System.Posix.Types.CUid instance Data.Prim.Class.Prim System.Posix.Types.CCc instance Data.Prim.Class.Prim System.Posix.Types.CSpeed instance Data.Prim.Class.Prim System.Posix.Types.CTcflag instance Data.Prim.Class.Prim System.Posix.Types.CRLim instance Data.Prim.Class.Prim a => Data.Prim.Class.Prim (Data.Semigroup.Max a) instance Data.Prim.Class.Prim a => Data.Prim.Class.Prim (Data.Semigroup.Min a) instance Data.Prim.Class.Prim a => Data.Prim.Class.Prim (Data.Semigroup.First a) instance Data.Prim.Class.Prim a => Data.Prim.Class.Prim (Data.Semigroup.Last a) instance (Data.Prim.Class.Prim a, Data.Prim.Class.Prim b) => Data.Prim.Class.Prim (Data.Semigroup.Arg a b) instance forall k a (b :: k). Data.Prim.Class.Prim a => Data.Prim.Class.Prim (Data.Functor.Const.Const a b) instance forall k2 (a :: k2) (b :: k2). (a GHC.Types.~ b) => Data.Prim.Class.Prim (a Data.Type.Equality.:~~: b) instance Data.Prim.Class.Prim System.Posix.Types.CBlkSize instance Data.Prim.Class.Prim System.Posix.Types.CBlkCnt instance Data.Prim.Class.Prim System.Posix.Types.CClockId instance Data.Prim.Class.Prim System.Posix.Types.CFsBlkCnt instance Data.Prim.Class.Prim System.Posix.Types.CFsFilCnt instance Data.Prim.Class.Prim System.Posix.Types.CId instance Data.Prim.Class.Prim System.Posix.Types.CKey instance Data.Prim.Class.Prim System.Posix.Types.CTimer instance Data.Prim.Class.Prim System.Posix.Types.CSocklen instance Data.Prim.Class.Prim System.Posix.Types.CNfds instance forall k (f :: k -> *) (a :: k). Data.Prim.Class.Prim (f a) => Data.Prim.Class.Prim (Data.Monoid.Ap f a) instance forall k (f :: k -> *) (a :: k) (g :: k -> *). (Data.Prim.Class.Prim (f a), Data.Prim.Class.Prim (g a)) => Data.Prim.Class.Prim (Data.Functor.Product.Product f g a) instance forall k k1 (f :: k -> *) (g :: k1 -> k) (a :: k1). Data.Prim.Class.Prim (f (g a)) => Data.Prim.Class.Prim (Data.Functor.Compose.Compose f g a) instance Data.Prim.Class.Prim a => Data.Prim.Class.Prim (Data.Functor.Identity.Identity a) instance forall k (f :: k -> *) (a :: k). Data.Prim.Class.Prim (f a) => Data.Prim.Class.Prim (Data.Semigroup.Internal.Alt f a) instance Data.Prim.Class.Prim GHC.Types.Ordering instance Data.Prim.Class.Prim GHC.IO.Device.IODeviceType instance Data.Prim.Class.Prim GHC.IO.Device.SeekMode instance Data.Prim.Class.Prim GHC.Conc.Sync.BlockReason instance Data.Prim.Class.Prim GHC.Conc.Sync.ThreadStatus instance Data.Prim.Class.Prim GHC.IO.IOMode.IOMode instance Data.Prim.Class.Prim GHC.IO.Handle.Types.BufferMode instance Data.Prim.Class.Prim GHC.IO.Handle.Types.Newline instance Data.Prim.Class.Prim GHC.IO.Handle.Types.NewlineMode instance Data.Prim.Class.Prim GHC.Unicode.GeneralCategory instance Data.Prim.Class.Prim a => Data.Prim.Class.Prim (Data.Ord.Down a) instance Data.Prim.Class.Prim a => Data.Prim.Class.Prim (Data.Semigroup.Internal.Dual a) instance Data.Prim.Class.Prim a => Data.Prim.Class.Prim (Data.Semigroup.Internal.Sum a) instance Data.Prim.Class.Prim a => Data.Prim.Class.Prim (Data.Semigroup.Internal.Product a) instance Data.Prim.Class.Prim Data.Semigroup.Internal.All instance Data.Prim.Class.Prim Data.Semigroup.Internal.Any instance Data.Prim.Class.Prim GHC.Fingerprint.Type.Fingerprint instance Data.Prim.Class.Prim a => Data.Prim.Class.Prim (GHC.Real.Ratio a) instance Data.Prim.Class.Prim a => Data.Prim.Class.Prim (Data.Complex.Complex a) instance (Data.Prim.Class.Prim a, Data.Prim.Class.Prim b) => Data.Prim.Class.Prim (a, b) instance (Data.Prim.Class.Prim a, Data.Prim.Class.Prim b, Data.Prim.Class.Prim c) => Data.Prim.Class.Prim (a, b, c) instance (Data.Prim.Class.Prim a, Data.Prim.Class.Prim b, Data.Prim.Class.Prim c, Data.Prim.Class.Prim d) => Data.Prim.Class.Prim (a, b, c, d) instance (Data.Prim.Class.Prim a, Data.Prim.Class.Prim b, Data.Prim.Class.Prim c, Data.Prim.Class.Prim d, Data.Prim.Class.Prim e) => Data.Prim.Class.Prim (a, b, c, d, e) instance (Data.Prim.Class.Prim a, Data.Prim.Class.Prim b, Data.Prim.Class.Prim c, Data.Prim.Class.Prim d, Data.Prim.Class.Prim e, Data.Prim.Class.Prim f) => Data.Prim.Class.Prim (a, b, c, d, e, f) instance (Data.Prim.Class.Prim a, Data.Prim.Class.Prim b, Data.Prim.Class.Prim c, Data.Prim.Class.Prim d, Data.Prim.Class.Prim e, Data.Prim.Class.Prim f, Data.Prim.Class.Prim g) => Data.Prim.Class.Prim (a, b, c, d, e, f, g) instance (Data.Prim.Class.Prim a, Data.Prim.Class.Prim b, Data.Prim.Class.Prim c, Data.Prim.Class.Prim d, Data.Prim.Class.Prim e, Data.Prim.Class.Prim f, Data.Prim.Class.Prim g, Data.Prim.Class.Prim h) => Data.Prim.Class.Prim (a, b, c, d, e, f, g, h) instance (Data.Prim.Class.Prim a, Data.Prim.Class.Prim b, Data.Prim.Class.Prim c, Data.Prim.Class.Prim d, Data.Prim.Class.Prim e, Data.Prim.Class.Prim f, Data.Prim.Class.Prim g, Data.Prim.Class.Prim h, Data.Prim.Class.Prim i) => Data.Prim.Class.Prim (a, b, c, d, e, f, g, h, i) instance Data.Prim.Class.Prim a => Data.Prim.Class.Prim (GHC.Maybe.Maybe a) module Data.Prim.Atomic class (Prim a, Eq a) => Atomic a -- | Read an element from MutableByteArray# atomically. Implies full -- memory barrier. atomicReadMutableByteArray# :: Atomic a => MutableByteArray# s -> Int# -> State# s -> (# State# s, a #) -- | Write an element into MutableByteArray# atomically. Implies -- full memory barrier. atomicWriteMutableByteArray# :: Atomic a => MutableByteArray# s -> Int# -> a -> State# s -> State# s -- | Read an element from memory atomically. Implies full memory barrier. atomicReadOffAddr# :: Atomic a => Addr# -> Int# -> State# s -> (# State# s, a #) -- | Write an element directly into memory atomically. Implies full memory -- barrier. atomicWriteOffAddr# :: Atomic a => Addr# -> Int# -> a -> State# s -> State# s -- | Compare-and-swap (CAS) operation. Given a mutable array, offset in -- number of elements, an old value and a new value atomically swap the -- old value for the new one, but only if the actual old value was an -- exact match to the expetced old one that was supplied. Returns the -- actual old value, which if compared to supplied expected one will tell -- us whether atomic swap occured or not. casMutableByteArray# :: Atomic a => MutableByteArray# s -> Int# -> a -> a -> State# s -> (# State# s, a #) -- | Compare-and-swap (CAS) operation. Given a mutable array, offset in -- number of elements, an old value and a new value atomically swap the -- old value for the new one, but only if the actual old value was an -- exact match to the expetced old one that was supplied. Returns the -- actual old value, which if compared to supplied expected one will tell -- us whether atomic swap occured or not. casMutableByteArray# :: (Atomic a, Atomic (PrimBase a)) => MutableByteArray# s -> Int# -> a -> a -> State# s -> (# State# s, a #) casOffAddr# :: Atomic a => Addr# -> Int# -> a -> a -> State# s -> (# State# s, a #) casOffAddr# :: (Atomic a, Atomic (PrimBase a)) => Addr# -> Int# -> a -> a -> State# s -> (# State# s, a #) casBoolMutableByteArray# :: Atomic a => MutableByteArray# s -> Int# -> a -> a -> State# s -> (# State# s, Bool #) casBoolMutableByteArray# :: (Atomic a, Atomic (PrimBase a)) => MutableByteArray# s -> Int# -> a -> a -> State# s -> (# State# s, Bool #) casBoolOffAddr# :: Atomic a => Addr# -> Int# -> a -> a -> State# s -> (# State# s, Bool #) casBoolOffAddr# :: (Atomic a, Atomic (PrimBase a)) => Addr# -> Int# -> a -> a -> State# s -> (# State# s, Bool #) -- | Using casMutableByteArray# perform atomic modification of an -- element in a MutableByteArray#. This is essentially an -- implementation of a spinlock using CAS. atomicModifyMutableByteArray# :: Atomic a => MutableByteArray# s -> Int# -> (a -> (# a, b #)) -> State# s -> (# State# s, b #) -- | Using casOffAddr# perform atomic modification of an element in -- a OffAddr#. This is essentially an implementation of a -- spinlock using CAS. atomicModifyOffAddr# :: Atomic a => Addr# -> Int# -> (a -> (# a, b #)) -> State# s -> (# State# s, b #) class (Bits a, Atomic a) => AtomicBits a atomicAndFetchOldMutableByteArray# :: AtomicBits a => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicAndFetchOldMutableByteArray# :: (AtomicBits a, AtomicBits (PrimBase a)) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicAndFetchNewMutableByteArray# :: AtomicBits a => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicAndFetchNewMutableByteArray# :: (AtomicBits a, AtomicBits (PrimBase a)) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicNandFetchOldMutableByteArray# :: AtomicBits a => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicNandFetchOldMutableByteArray# :: (AtomicBits a, AtomicBits (PrimBase a)) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicNandFetchNewMutableByteArray# :: AtomicBits a => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicNandFetchNewMutableByteArray# :: (AtomicBits a, AtomicBits (PrimBase a)) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicOrFetchOldMutableByteArray# :: AtomicBits a => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicOrFetchOldMutableByteArray# :: (AtomicBits a, AtomicBits (PrimBase a)) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicOrFetchNewMutableByteArray# :: AtomicBits a => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicOrFetchNewMutableByteArray# :: (AtomicBits a, AtomicBits (PrimBase a)) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicXorFetchOldMutableByteArray# :: AtomicBits a => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicXorFetchOldMutableByteArray# :: (AtomicBits a, AtomicBits (PrimBase a)) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicXorFetchNewMutableByteArray# :: AtomicBits a => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicXorFetchNewMutableByteArray# :: (AtomicBits a, AtomicBits (PrimBase a)) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicAndFetchOldOffAddr# :: AtomicBits a => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicAndFetchOldOffAddr# :: (AtomicBits a, AtomicBits (PrimBase a)) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicAndFetchNewOffAddr# :: AtomicBits a => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicAndFetchNewOffAddr# :: (AtomicBits a, AtomicBits (PrimBase a)) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicNandFetchOldOffAddr# :: AtomicBits a => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicNandFetchOldOffAddr# :: (AtomicBits a, AtomicBits (PrimBase a)) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicNandFetchNewOffAddr# :: AtomicBits a => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicNandFetchNewOffAddr# :: (AtomicBits a, AtomicBits (PrimBase a)) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicOrFetchOldOffAddr# :: AtomicBits a => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicOrFetchOldOffAddr# :: (AtomicBits a, AtomicBits (PrimBase a)) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicOrFetchNewOffAddr# :: AtomicBits a => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicOrFetchNewOffAddr# :: (AtomicBits a, AtomicBits (PrimBase a)) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicXorFetchOldOffAddr# :: AtomicBits a => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicXorFetchOldOffAddr# :: (AtomicBits a, AtomicBits (PrimBase a)) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicXorFetchNewOffAddr# :: AtomicBits a => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicXorFetchNewOffAddr# :: (AtomicBits a, AtomicBits (PrimBase a)) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) class Atomic a => AtomicCount a atomicAddFetchOldMutableByteArray# :: AtomicCount a => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicAddFetchOldMutableByteArray# :: (AtomicCount a, AtomicCount (PrimBase a)) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicAddFetchNewMutableByteArray# :: AtomicCount a => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicAddFetchNewMutableByteArray# :: (AtomicCount a, AtomicCount (PrimBase a)) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicSubFetchOldMutableByteArray# :: AtomicCount a => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicSubFetchOldMutableByteArray# :: (AtomicCount a, AtomicCount (PrimBase a)) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicSubFetchNewMutableByteArray# :: AtomicCount a => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicSubFetchNewMutableByteArray# :: (AtomicCount a, AtomicCount (PrimBase a)) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicAddFetchOldOffAddr# :: AtomicCount a => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicAddFetchOldOffAddr# :: (AtomicCount a, AtomicCount (PrimBase a)) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicAddFetchNewOffAddr# :: AtomicCount a => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicAddFetchNewOffAddr# :: (AtomicCount a, AtomicCount (PrimBase a)) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicSubFetchOldOffAddr# :: AtomicCount a => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicSubFetchOldOffAddr# :: (AtomicCount a, AtomicCount (PrimBase a)) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicSubFetchNewOffAddr# :: AtomicCount a => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicSubFetchNewOffAddr# :: (AtomicCount a, AtomicCount (PrimBase a)) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) -- | Using casBoolMutableByteArray# perform atomic modification of -- an element in a MutableByteArray#. This is essentially an -- implementation of a spinlock using CAS. atomicBoolModifyMutableByteArray# :: Atomic a => MutableByteArray# s -> Int# -> (a -> (# a, b #)) -> State# s -> (# State# s, b #) -- | Using casBoolMutableByteArray# perform atomic modification of -- an element in a MutableByteArray#. Returns the previous value. atomicBoolModifyFetchOldMutableByteArray# :: Atomic a => MutableByteArray# s -> Int# -> (a -> a) -> State# s -> (# State# s, a #) -- | Using casMutableByteArray# perform atomic modification of an -- element in a MutableByteArray#. atomicModifyMutableByteArray_# :: Atomic a => MutableByteArray# s -> Int# -> (a -> a) -> State# s -> State# s -- | Using casMutableByteArray# perform atomic modification of an -- element in a MutableByteArray#. Returns the previous value. atomicModifyFetchOldMutableByteArray# :: Atomic a => MutableByteArray# s -> Int# -> (a -> a) -> State# s -> (# State# s, a #) -- | Using casMutableByteArray# perform atomic modification of an -- element in a MutableByteArray#. Returns the new value. atomicModifyFetchNewMutableByteArray# :: Atomic a => MutableByteArray# s -> Int# -> (a -> a) -> State# s -> (# State# s, a #) -- | Using casOffAddr# perform atomic modification of an element in -- a OffAddr#. atomicModifyOffAddr_# :: Atomic a => Addr# -> Int# -> (a -> a) -> State# s -> State# s -- | Using casBoolOffAddr# perform atomic modification of an element -- in a OffAddr#. This is essentially an implementation of a -- spinlock using CAS. atomicBoolModifyOffAddr# :: Atomic a => Addr# -> Int# -> (a -> (# a, b #)) -> State# s -> (# State# s, b #) -- | Using casOffAddr# perform atomic modification of an element in -- a OffAddr#. Returns the previous value. atomicModifyFetchOldOffAddr# :: Atomic a => Addr# -> Int# -> (a -> a) -> State# s -> (# State# s, a #) -- | Using casOffAddr# perform atomic modification of an element in -- a OffAddr#. Returns the new value. atomicModifyFetchNewOffAddr# :: Atomic a => Addr# -> Int# -> (a -> a) -> State# s -> (# State# s, a #) -- | Flip all bits atomically in the element of an array at the supplied -- offset. Returns the previous value. Implies full memory barrier. atomicNotFetchOldMutableByteArray# :: forall a s. AtomicBits a => MutableByteArray# s -> Int# -> State# s -> (# State# s, a #) -- | Flip all bits atomically in the element of an array at the supplied -- offset. Returns the new value. Implies full memory barrier. atomicNotFetchNewMutableByteArray# :: forall a s. AtomicBits a => MutableByteArray# s -> Int# -> State# s -> (# State# s, a #) -- | Flip all bits atomically in the element of an array at the supplied -- offset. Returns the previous value. Implies full memory barrier. atomicNotFetchOldOffAddr# :: forall a s. AtomicBits a => Addr# -> Int# -> State# s -> (# State# s, a #) -- | Flip all bits atomically in the element of an array at the supplied -- offset. Returns the new value. Implies full memory barrier. atomicNotFetchNewOffAddr# :: forall a s. AtomicBits a => Addr# -> Int# -> State# s -> (# State# s, a #) instance Data.Prim.Atomic.AtomicBits GHC.Int.Int8 instance Data.Prim.Atomic.AtomicBits GHC.Int.Int16 instance Data.Prim.Atomic.AtomicBits GHC.Int.Int32 instance Data.Prim.Atomic.AtomicBits GHC.Types.Int instance Data.Prim.Atomic.AtomicBits GHC.Word.Word8 instance Data.Prim.Atomic.AtomicBits GHC.Word.Word16 instance Data.Prim.Atomic.AtomicBits GHC.Word.Word32 instance Data.Prim.Atomic.AtomicBits GHC.Types.Word instance Data.Prim.Atomic.AtomicBits GHC.Int.Int64 instance Data.Prim.Atomic.AtomicBits GHC.Word.Word64 instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CLLong instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CULLong instance Data.Prim.Atomic.AtomicBits GHC.Types.Bool instance Data.Prim.Atomic.AtomicBits Foreign.Ptr.IntPtr instance Data.Prim.Atomic.AtomicBits Foreign.Ptr.WordPtr instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CBool instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CChar instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CSChar instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CUChar instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CShort instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CUShort instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CInt instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CUInt instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CLong instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CULong instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CPtrdiff instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CSize instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CWchar instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CSigAtomic instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CIntPtr instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CUIntPtr instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CIntMax instance Data.Prim.Atomic.AtomicBits Foreign.C.Types.CUIntMax instance Data.Prim.Atomic.AtomicBits System.Posix.Types.Fd instance Data.Prim.Atomic.AtomicBits a => Data.Prim.Atomic.AtomicBits (Data.Functor.Const.Const a b) instance Data.Prim.Atomic.AtomicBits a => Data.Prim.Atomic.AtomicBits (Data.Functor.Identity.Identity a) instance Data.Prim.Atomic.AtomicCount GHC.Int.Int8 instance Data.Prim.Atomic.AtomicCount GHC.Int.Int16 instance Data.Prim.Atomic.AtomicCount GHC.Int.Int32 instance Data.Prim.Atomic.AtomicCount GHC.Types.Int instance Data.Prim.Atomic.AtomicCount GHC.Word.Word8 instance Data.Prim.Atomic.AtomicCount GHC.Word.Word16 instance Data.Prim.Atomic.AtomicCount GHC.Word.Word32 instance Data.Prim.Atomic.AtomicCount GHC.Types.Word instance Data.Prim.Atomic.AtomicCount GHC.Int.Int64 instance Data.Prim.Atomic.AtomicCount GHC.Word.Word64 instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CLLong instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CULLong instance Data.Prim.Atomic.AtomicCount Foreign.Ptr.IntPtr instance Data.Prim.Atomic.AtomicCount Foreign.Ptr.WordPtr instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CBool instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CChar instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CSChar instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CUChar instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CShort instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CUShort instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CInt instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CUInt instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CLong instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CULong instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CPtrdiff instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CSize instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CWchar instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CSigAtomic instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CIntPtr instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CUIntPtr instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CIntMax instance Data.Prim.Atomic.AtomicCount Foreign.C.Types.CUIntMax instance Data.Prim.Atomic.AtomicCount System.Posix.Types.Fd instance Data.Prim.Atomic.AtomicCount Foreign.C.Error.Errno instance Data.Prim.Atomic.AtomicCount a => Data.Prim.Atomic.AtomicCount (Data.Functor.Const.Const a b) instance Data.Prim.Atomic.AtomicCount a => Data.Prim.Atomic.AtomicCount (Data.Functor.Identity.Identity a) instance Data.Prim.Atomic.AtomicCount a => Data.Prim.Atomic.AtomicCount (Data.Ord.Down a) instance Data.Prim.Atomic.AtomicCount a => Data.Prim.Atomic.AtomicCount (Data.Semigroup.Internal.Dual a) instance Data.Prim.Atomic.AtomicCount a => Data.Prim.Atomic.AtomicCount (Data.Semigroup.Internal.Sum a) instance Data.Prim.Atomic.AtomicCount a => Data.Prim.Atomic.AtomicCount (Data.Semigroup.Internal.Product a) instance Data.Prim.Atomic.Atomic GHC.Int.Int8 instance Data.Prim.Atomic.Atomic GHC.Int.Int16 instance Data.Prim.Atomic.Atomic GHC.Int.Int32 instance Data.Prim.Atomic.Atomic GHC.Types.Int instance Data.Prim.Atomic.Atomic GHC.Word.Word8 instance Data.Prim.Atomic.Atomic GHC.Word.Word16 instance Data.Prim.Atomic.Atomic GHC.Word.Word32 instance Data.Prim.Atomic.Atomic GHC.Types.Word instance Data.Prim.Atomic.Atomic GHC.Int.Int64 instance Data.Prim.Atomic.Atomic GHC.Word.Word64 instance Data.Prim.Atomic.Atomic Foreign.C.Types.CLLong instance Data.Prim.Atomic.Atomic Foreign.C.Types.CULLong instance Data.Prim.Atomic.Atomic GHC.Types.Bool instance Data.Prim.Atomic.Atomic GHC.Types.Char instance Data.Prim.Atomic.Atomic (GHC.Ptr.Ptr a) instance Data.Prim.Atomic.Atomic (GHC.Ptr.FunPtr a) instance Data.Prim.Atomic.Atomic Foreign.Ptr.IntPtr instance Data.Prim.Atomic.Atomic Foreign.Ptr.WordPtr instance Data.Prim.Atomic.Atomic Foreign.C.Types.CBool instance Data.Prim.Atomic.Atomic Foreign.C.Types.CChar instance Data.Prim.Atomic.Atomic Foreign.C.Types.CSChar instance Data.Prim.Atomic.Atomic Foreign.C.Types.CUChar instance Data.Prim.Atomic.Atomic Foreign.C.Types.CShort instance Data.Prim.Atomic.Atomic Foreign.C.Types.CUShort instance Data.Prim.Atomic.Atomic Foreign.C.Types.CInt instance Data.Prim.Atomic.Atomic Foreign.C.Types.CUInt instance Data.Prim.Atomic.Atomic Foreign.C.Types.CLong instance Data.Prim.Atomic.Atomic Foreign.C.Types.CULong instance Data.Prim.Atomic.Atomic Foreign.C.Types.CPtrdiff instance Data.Prim.Atomic.Atomic Foreign.C.Types.CSize instance Data.Prim.Atomic.Atomic Foreign.C.Types.CWchar instance Data.Prim.Atomic.Atomic Foreign.C.Types.CSigAtomic instance Data.Prim.Atomic.Atomic Foreign.C.Types.CIntPtr instance Data.Prim.Atomic.Atomic Foreign.C.Types.CUIntPtr instance Data.Prim.Atomic.Atomic Foreign.C.Types.CIntMax instance Data.Prim.Atomic.Atomic Foreign.C.Types.CUIntMax instance Data.Prim.Atomic.Atomic System.Posix.Types.Fd instance Data.Prim.Atomic.Atomic Foreign.C.Error.Errno instance Data.Prim.Atomic.Atomic a => Data.Prim.Atomic.Atomic (Data.Semigroup.Max a) instance Data.Prim.Atomic.Atomic a => Data.Prim.Atomic.Atomic (Data.Semigroup.Min a) instance Data.Prim.Atomic.Atomic a => Data.Prim.Atomic.Atomic (Data.Semigroup.First a) instance Data.Prim.Atomic.Atomic a => Data.Prim.Atomic.Atomic (Data.Semigroup.Last a) instance Data.Prim.Atomic.Atomic a => Data.Prim.Atomic.Atomic (Data.Functor.Const.Const a b) instance Data.Prim.Atomic.Atomic a => Data.Prim.Atomic.Atomic (Data.Functor.Identity.Identity a) instance Data.Prim.Atomic.Atomic GHC.Types.Ordering instance Data.Prim.Atomic.Atomic GHC.IO.Device.IODeviceType instance Data.Prim.Atomic.Atomic GHC.IO.Device.SeekMode instance Data.Prim.Atomic.Atomic GHC.Conc.Sync.BlockReason instance Data.Prim.Atomic.Atomic GHC.Conc.Sync.ThreadStatus instance Data.Prim.Atomic.Atomic GHC.IO.IOMode.IOMode instance Data.Prim.Atomic.Atomic GHC.IO.Handle.Types.Newline instance Data.Prim.Atomic.Atomic GHC.IO.Handle.Types.NewlineMode instance Data.Prim.Atomic.Atomic GHC.Unicode.GeneralCategory instance Data.Prim.Atomic.Atomic a => Data.Prim.Atomic.Atomic (Data.Ord.Down a) instance Data.Prim.Atomic.Atomic a => Data.Prim.Atomic.Atomic (Data.Semigroup.Internal.Dual a) instance Data.Prim.Atomic.Atomic a => Data.Prim.Atomic.Atomic (Data.Semigroup.Internal.Sum a) instance Data.Prim.Atomic.Atomic a => Data.Prim.Atomic.Atomic (Data.Semigroup.Internal.Product a) instance Data.Prim.Atomic.Atomic Data.Semigroup.Internal.All instance Data.Prim.Atomic.Atomic Data.Semigroup.Internal.Any module Control.Prim.Concurrent -- | A ThreadId is an abstract type representing a handle to a -- thread. ThreadId is an instance of Eq, Ord and -- Show, where the Ord instance implements an arbitrary -- total ordering over ThreadIds. The Show instance lets -- you convert an arbitrary-valued ThreadId to string form; -- showing a ThreadId value is occasionally useful when debugging -- or diagnosing the behaviour of a concurrent program. -- -- Note: in GHC, if you have a ThreadId, you essentially -- have a pointer to the thread itself. This means the thread itself -- can't be garbage collected until you drop the ThreadId. This -- misfeature will hopefully be corrected at a later date. data ThreadId ThreadId :: ThreadId# -> ThreadId -- | Wrapper around fork#. Unlike forkIO it does not install -- any exception handlers on the action, so you need make sure to do it -- yourself. fork :: MonadUnliftPrim RW m => m () -> m ThreadId -- | Spawn a thread and run an action in it. Any exception raised by the -- new thread will be passed to the supplied exception handler, which -- itself will be run in a masked state forkFinally :: MonadUnliftPrim RW m => m a -> (Either SomeException a -> m ()) -> m ThreadId -- | Wrapper around forkOn#. Unlike forkOn it does not -- install any exception handlers on the action, so you need make sure to -- do it yourself. forkOn :: MonadUnliftPrim RW m => Int -> m () -> m ThreadId forkOnFinally :: MonadUnliftPrim RW m => Int -> m a -> (Either SomeException a -> m ()) -> m ThreadId forkOS :: MonadUnliftPrim RW m => m () -> m ThreadId -- | Wrapper around killThread#, which throws ThreadKilled -- exception in the target thread. Use throwTo if you want a -- different exception to be thrown. killThread :: MonadPrim RW m => ThreadId -> m () -- | Just like yield this is a Wrapper around yield# primop , -- except that this version works for any state token. It is safe to use -- within ST because it can't affect the result of computation, -- just the order of evaluation with respect to other threads, which is -- not relevant for the state thread monad anyways. yield :: forall m s. MonadPrim s m => m () -- | Lifted version of threadDelay threadDelay :: MonadPrim RW m => Int -> m () -- | Lifted version of timeout timeout :: MonadUnliftPrim RW m => Int -> m a -> m (Maybe a) -- | Same as timeout, but ignores the outcome timeout_ :: MonadUnliftPrim RW m => Int -> m a -> m () -- | Wrapper around myThreadId#. myThreadId :: MonadPrim RW m => m ThreadId -- | Something that is not exported from base: convert a -- ThreadId to a regular integral type. threadIdToCInt :: ThreadId -> CInt threadStatus :: MonadPrim RW m => ThreadId -> m ThreadStatus -- | Pointer should refer to UTF8 encoded string of bytes labelThread :: MonadPrim RW m => ThreadId -> Ptr a -> m () -- | Check if current thread was spawned with forkOn# isCurrentThreadBound :: MonadPrim RW m => m Bool threadCapability :: MonadPrim RW m => ThreadId -> m (Int, Bool) getNumCapabilities :: MonadPrim RW m => m Int setNumCapabilities :: MonadPrim RW m => Int -> m () spark :: MonadPrim s m => a -> m a numSparks :: MonadPrim s m => m Int runSparks :: MonadPrim s m => m () -- | Wrapper for delay#. Sleep specified number of microseconds. Not -- designed for threaded runtime: Errors when compiled with -- -threaded delay :: MonadPrim s m => Int -> m () -- | Wrapper for waitRead#. Block and wait for input to become -- available on the Fd. Not designed for threaded runtime: -- Errors out when compiled with -threaded waitRead :: MonadPrim s m => Fd -> m () -- | Wrapper for waitWrite#. Block and wait until output is possible -- on the Fd. Not designed for threaded runtime: Errors out -- when compiled with -threaded waitWrite :: MonadPrim s m => Fd -> m () module Data.Prim.Atom newtype Atom a Atom :: a -> Atom a [unAtom] :: Atom a -> a acquireLockByteOffMutableByteArray :: MonadPrim s m => MutableByteArray# s -> Int# -> m () releaseLockByteOffMutableByteArray :: MonadPrim s m => MutableByteArray# s -> Int# -> m () acquireLockByteOffAddr :: MonadPrim s m => Addr# -> Int# -> m () releaseLockByteOffAddr :: MonadPrim s m => Addr# -> Int# -> m () withLockMutableByteArray :: forall e a m. (Prim e, MonadUnliftPrim RW m) => MutableByteArray# RealWorld -> Int# -> (Atom e -> m (Atom e, a)) -> m a withLockOffAddr :: forall e b. Prim e => Addr# -> Int# -> (Atom e -> IO (Atom e, b)) -> IO b atomicAddFetchOldMutableByteArrayNum# :: (Num a, Atomic a) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicAddFetchNewMutableByteArrayNum# :: (Num a, Atomic a) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicSubFetchOldMutableByteArrayNum# :: (Num a, Atomic a) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicSubFetchNewMutableByteArrayNum# :: (Num a, Atomic a) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicAddFetchOldOffAddrNum# :: (Num a, Atomic a) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicAddFetchNewOffAddrNum# :: (Num a, Atomic a) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicSubFetchOldOffAddrNum# :: (Num a, Atomic a) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicSubFetchNewOffAddrNum# :: (Num a, Atomic a) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicAndFetchOldMutableByteArrayBits# :: (Bits a, Atomic a) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicAndFetchNewMutableByteArrayBits# :: (Bits a, Atomic a) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicNandFetchOldMutableByteArrayBits# :: (Bits a, Atomic a) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicNandFetchNewMutableByteArrayBits# :: (Bits a, Atomic a) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicOrFetchOldMutableByteArrayBits# :: (Bits a, Atomic a) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicOrFetchNewMutableByteArrayBits# :: (Bits a, Atomic a) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicXorFetchOldMutableByteArrayBits# :: (Bits a, Atomic a) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicXorFetchNewMutableByteArrayBits# :: (Bits a, Atomic a) => MutableByteArray# s -> Int# -> a -> State# s -> (# State# s, a #) atomicAndFetchOldOffAddrBits# :: (Bits a, Atomic a) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicAndFetchNewOffAddrBits# :: (Bits a, Atomic a) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicNandFetchOldOffAddrBits# :: (Bits a, Atomic a) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicNandFetchNewOffAddrBits# :: (Bits a, Atomic a) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicOrFetchOldOffAddrBits# :: (Bits a, Atomic a) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicOrFetchNewOffAddrBits# :: (Bits a, Atomic a) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicXorFetchOldOffAddrBits# :: (Bits a, Atomic a) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) atomicXorFetchNewOffAddrBits# :: (Bits a, Atomic a) => Addr# -> Int# -> a -> State# s -> (# State# s, a #) instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Data.Prim.Atom.Atom a) instance Data.Bits.Bits a => Data.Bits.Bits (Data.Prim.Atom.Atom a) instance GHC.Float.RealFloat a => GHC.Float.RealFloat (Data.Prim.Atom.Atom a) instance GHC.Float.Floating a => GHC.Float.Floating (Data.Prim.Atom.Atom a) instance GHC.Real.Fractional a => GHC.Real.Fractional (Data.Prim.Atom.Atom a) instance GHC.Real.RealFrac a => GHC.Real.RealFrac (Data.Prim.Atom.Atom a) instance GHC.Real.Real a => GHC.Real.Real (Data.Prim.Atom.Atom a) instance GHC.Real.Integral a => GHC.Real.Integral (Data.Prim.Atom.Atom a) instance GHC.Enum.Enum a => GHC.Enum.Enum (Data.Prim.Atom.Atom a) instance GHC.Num.Num a => GHC.Num.Num (Data.Prim.Atom.Atom a) instance GHC.Classes.Ord a => GHC.Classes.Ord (Data.Prim.Atom.Atom a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Data.Prim.Atom.Atom a) instance GHC.Show.Show a => GHC.Show.Show (Data.Prim.Atom.Atom a) instance Data.Prim.Class.Prim a => Data.Prim.Class.Prim (Data.Prim.Atom.Atom a) instance (GHC.Classes.Eq a, Data.Prim.Class.Prim a) => Data.Prim.Atomic.Atomic (Data.Prim.Atom.Atom a) instance (GHC.Num.Num a, GHC.Classes.Eq a, Data.Prim.Class.Prim a) => Data.Prim.Atomic.AtomicCount (Data.Prim.Atom.Atom a) instance (Data.Bits.Bits a, GHC.Classes.Eq a, Data.Prim.Class.Prim a) => Data.Prim.Atomic.AtomicBits (Data.Prim.Atom.Atom a) module Data.Prim -- | Invariants: -- -- class Prim a newtype Atom a Atom :: a -> Atom a [unAtom] :: Atom a -> a class (Prim a, Eq a) => Atomic a class Atomic a => AtomicCount a class (Bits a, Atomic a) => AtomicBits a class MonadThrow m => MonadPrim s m | m -> s -- | A shorter synonym for the magical RealWorld type RW = RealWorld -- | 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 -- | The strict ST monad. The ST monad allows for destructive -- updates, but is escapable (unlike IO). A computation of type -- ST s a returns a value of type a, and execute -- in "thread" s. The s parameter is either -- -- -- -- It serves to keep the internal states of different invocations of -- runST separate from each other and from invocations of -- stToIO. -- -- The >>= and >> operations are strict in the -- state (though not in values stored in the state). For example, -- --
--   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: -- -- -- -- The method names refer to the monoid of lists under concatenation, but -- there are many other instances. -- -- Some types can be viewed as a monoid in more than one way, e.g. both -- addition and multiplication on numbers. In such cases we often define -- newtypes and make those instances of Monoid, e.g. -- Sum and Product. -- -- NOTE: Semigroup is a superclass of Monoid since -- base-4.11.0.0. class Semigroup a => Monoid a -- | Identity of mappend -- --
--   >>> "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#. -- -- -- --

Examples

-- --
--   >>> 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#. -- -- copyBArray :: forall e m s. MonadPrim s m => BArray e -> Int -> BMArray e s -> Int -> Size -> m () -- | O(sz) - Make an exact copy of a subsection of a pure immutable -- array. -- -- -- -- Documentation for utilized primop: cloneArray#. -- --

Examples

-- --
--   >>> 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#. -- -- -- --

Examples

-- --
--   >>> 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. -- -- -- -- Documentation for utilized primop: thawArray#. -- --

Examples

-- --
--   >>> 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. -- --

Example

-- --
--   >>> 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. -- -- -- --

Examples

-- --
--   >>> 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#. -- --

Example

-- --
--   >>> 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#. -- -- -- --

Example

-- --
--   >>> 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. -- -- -- --

Examples

-- --
--   >>> 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#. -- -- writeLazyBMArray :: forall e m s. MonadPrim s m => BMArray e s -> Int -> e -> m () -- | O(1) - Same as writeBMArray, except it ensures that the -- value being written is fully evaluated, i.e. to Normal Form (NF). -- -- writeDeepBMArray :: forall e m s. (MonadPrim s m, NFData e) => BMArray e s -> Int -> e -> m () -- | Compare pointers for two mutable arrays and see if they refer to the -- exact same one. -- -- Documentation for utilized primop: sameMutableArray#. isSameBMArray :: forall a s. BMArray a s -> BMArray a s -> Bool -- | Create a mutable boxed array where each element is set to the supplied -- initial value elt, which is evaluated before array allocation -- happens. See newLazyBMArray for an ability to initialize with a -- thunk. -- -- -- --

Examples

-- --
--   >>> 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#. -- -- newLazyBMArray :: forall e m s. MonadPrim s m => Size -> e -> m (BMArray e s) -- | Create new mutable array, where each element is initilized to a thunk -- that throws an error when evaluated. This is useful when there is a -- plan to later iterate over the whole array and write values into each -- cell in some index aware fashion. Consider makeBMArray as an -- alternative. -- -- -- --

Examples

-- --
--   >>> 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. -- -- -- --

Examples

-- --
--   >>> 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#. -- -- moveBMArray :: forall e m s. MonadPrim s m => BMArray e s -> Int -> BMArray e s -> Int -> Size -> m () -- | O(sz) - Allocate a new mutable array of size sz and -- copy that number of the elements over from the srcArray -- starting at index ix. Similar to cloneBArray, except -- it works on mutable arrays. -- -- Documentation for utilized primop: cloneMutableArray#. -- -- cloneBMArray :: forall e m s. MonadPrim s m => BMArray e s -> Int -> Size -> m (BMArray e s) -- | O(1) - Reduce the size of a mutable boxed array. -- -- Documentation for utilized primop: shrinkMutableArray#. -- -- -- --
    --
  1. 3.0
  2. --
shrinkBMArray :: forall e m s. MonadPrim s m => BMArray e s -> Size -> m () -- | O(1) - Either grow or shrink the size of a mutable unboxed -- array. Shrinking happens in-place without new array creation and data -- copy, while growing the array is implemented with creating new array -- and copy of the data over from the source array srcMutArray. -- This has a consequence that produced array dstMutArray might -- refer to the same srcMutArray or to a totally new array, -- which can be checked with isSameBMArray. -- -- Documentation on the utilized primop: resizeMutableArray#. -- -- -- --
    --
  1. 3.0
  2. --
resizeBMArray :: forall e m s. MonadPrim s m => BMArray e s -> Size -> e -> m (BMArray e s) -- | O(1) - Same as resizeBMArray, except when growing the -- array empty space at the end is filled with bottom. -- -- -- --
    --
  1. 3.0
  2. --
resizeRawBMArray :: forall e m s. MonadPrim s m => BMArray e s -> Size -> m (BMArray e s) -- | O(1) - Convert a mutable boxed array into an immutable one. Use -- thawBArray in order to go in the opposite direction. -- -- Documentation for utilized primop: unsafeFreezeArray#. -- -- freezeBMArray :: forall e m s. MonadPrim s m => BMArray e s -> m (BArray e) -- | O(sz) - Similar to freezeBMArray, except it creates a -- new array with the copy of a subsection of a mutable array before -- converting it into an immutable. -- -- Documentation for utilized primop: freezeArray#. -- -- freezeCopyBMArray :: forall e m s. MonadPrim s m => BMArray e s -> Int -> Size -> m (BArray e) -- | Small boxed immutable array data SBArray e SBArray :: SmallArray# e -> SBArray e -- | Compare pointers for two immutable arrays and see if they refer to the -- exact same one. isSameSBArray :: SBArray a -> SBArray a -> Bool -- | O(1) - Get the number of elements in an immutable array -- -- Documentation for utilized primop: sizeofSmallArray#. sizeOfSBArray :: forall e. SBArray e -> Size -- | O(1) - Index an element in the immutable small boxed array. -- -- Documentation for utilized primop: indexSmallArray#. -- -- -- --

Examples

-- --
--   >>> 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#. -- -- copySBArray :: forall e m s. MonadPrim s m => SBArray e -> Int -> SBMArray e s -> Int -> Size -> m () -- | O(sz) - Make an exact copy of a subsection of a pure immutable -- array. -- -- -- -- Documentation for utilized primop: cloneSmallArray#. -- --

Examples

-- --
--   >>> 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#. -- -- -- --

Examples

-- --
--   >>> 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. -- -- -- -- Documentation for utilized primop: thawSmallArray#. -- --

Examples

-- --
--   >>> 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. -- --

Example

-- --
--   >>> 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. -- -- -- --

Examples

-- --
--   >>> 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. -- --

Example

-- --
--   >>> 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#. -- -- -- --

Example

-- --
--   >>> 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. -- -- -- --

Examples

-- --
--   >>> 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#. -- -- writeLazySBMArray :: forall e m s. MonadPrim s m => SBMArray e s -> Int -> e -> m () -- | O(1) - Same as writeSBMArray, except it ensures that the -- value being written is fully evaluated, i.e. to Normal Form (NF). -- -- writeDeepSBMArray :: forall e m s. (MonadPrim s m, NFData e) => SBMArray e s -> Int -> e -> m () -- | Create a mutable boxed array where each element is set to the supplied -- initial value elt, which is evaluated before array allocation -- happens. See newLazySBMArray for an ability to initialize with -- a thunk. -- -- -- --

Examples

-- --
--   >>> 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#. -- -- newLazySBMArray :: forall e m s. MonadPrim s m => Size -> e -> m (SBMArray e s) -- | Create new mutable array, where each element is initilized to a thunk -- that throws an error when evaluated. This is useful when there is a -- plan to later iterate over the whole array and write values into each -- cell in some index aware fashion. Consider makeSBMArray as an -- alternative. -- -- -- --

Examples

-- --
--   >>> 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. -- -- -- --

Examples

-- --
--   >>> 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#. -- -- moveSBMArray :: forall e m s. MonadPrim s m => SBMArray e s -> Int -> SBMArray e s -> Int -> Size -> m () -- | O(sz) - Allocate a new small boxed mutable array of size -- sz and copy that number of the elements over from the -- srcArray starting at index ix. Similar to -- cloneSBArray, except that it works on mutable arrays. -- -- Documentation for utilized primop: cloneSmallMutableArray#. -- -- cloneSBMArray :: forall e m s. MonadPrim s m => SBMArray e s -> Int -> Size -> m (SBMArray e s) -- | O(1) - Reduce the size of a mutable small boxed array. -- -- Documentation for utilized primop: shrinkSmallMutableArray#. -- -- -- --
    --
  1. 3.0
  2. --
shrinkSBMArray :: forall e m s. MonadPrim s m => SBMArray e s -> Size -> m () -- | O(1) - Either grow or shrink the size of a mutable unboxed -- array. Shrinking happens in-place without new array creation and data -- copy, while growing the array is implemented with creating new array -- and copy of the data over from the source array srcMutArray. -- This has a consequence that produced array dstMutArray might -- refer to the same srcMutArray or to a totally new array, -- which can be checked with isSameSBMArray. -- -- Documentation on the utilized primop: resizeSmallMutableArray#. -- -- -- --
    --
  1. 3.0
  2. --
resizeSBMArray :: forall e m s. MonadPrim s m => SBMArray e s -> Size -> e -> m (SBMArray e s) -- | O(1) - Same as resizeSBMArray, except when growing the -- array empty space at the end is filled with bottom. -- -- -- --
    --
  1. 3.0
  2. --
resizeRawSBMArray :: forall e m s. MonadPrim s m => SBMArray e s -> Size -> m (SBMArray e s) -- | O(1) - Convert a mutable boxed array into an immutable one. Use -- thawSBArray in order to go in the opposite direction. -- -- Documentation for utilized primop: unsafeFreezeSmallArray#. -- -- freezeSBMArray :: forall e m s. MonadPrim s m => SBMArray e s -> m (SBArray e) -- | O(sz) - Similar to freezeSBMArray, except it creates a -- new array with the copy of a subsection of a mutable array before -- converting it into an immutable. -- -- Documentation for utilized primop: freezeSmallArray#. -- -- freezeCopySBMArray :: forall e m s. MonadPrim s m => SBMArray e s -> Int -> Size -> m (SBArray e) data UArray e UArray :: ByteArray# -> UArray e -- | O(1) - Compare pointers for two immutable arrays and see if -- they refer to the exact same one. -- -- Documentation for utilized primop: isSameByteArray#. isSameUArray :: forall a b. UArray a -> UArray b -> Bool -- | O(1) - Check if memory for immutable unboxed array was -- allocated as pinned. -- -- Documentation for utilized primop: isByteArrayPinned#. isPinnedUArray :: forall e. UArray e -> Bool -- | O(1) - Get the size of an immutable array in number of -- elements. -- -- Documentation for utilized primop: sizeofByteArray#. sizeOfUArray :: forall e. Prim e => UArray e -> Size -- | O(1) - Index an element of a pure unboxed array. -- -- Documentation for utilized primop: indexByteArray#. -- -- -- --

Examples

-- --
--   >>> 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#. -- -- copyUArray :: forall e m s. (Prim e, MonadPrim s m) => UArray e -> Int -> UMArray e s -> Int -> Size -> m () -- | O(1) - Convert a pure immutable unboxed array into a mutable -- unboxed array. Use freezeUMArray in order to go in the opposite -- direction. -- -- Documentation for utilized primop: unsafeThawByteArray#. -- -- -- --

Examples

-- --
--   >>> 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. -- --

Example

-- --
--   >>> 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. -- -- -- --

Examples

-- --
--   >>> 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#. -- --

Example

-- --
--   >>> 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#. -- -- -- --

Examples

-- --
--   >>> 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#. -- -- -- --

Examples

-- --
--   >>> 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. -- -- -- --

Examples

-- --
--   >>> 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#. -- -- -- --

Examples

-- --
--   >>> 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. -- -- -- --

Examples

-- --
--   >>> 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. -- -- newPinnedUMArray :: forall e m s. (Prim e, MonadPrim s m) => Size -> e -> m (UMArray e s) -- | O(1) - Same as newRawUMArray except allocate new mutable -- unboxed array as pinned -- -- Documentation for utilized primop: newPinnedByteArray#. -- -- newRawPinnedUMArray :: forall e m s. (Prim e, MonadPrim s m) => Size -> m (UMArray e s) -- | Same as makeUMArray, but allocate memory as pinned. -- -- makePinnedUMArray :: forall e m s. (Prim e, MonadPrim s m) => Size -> (Int -> m e) -> m (UMArray e s) -- | Same newUMArray, but allocate memory as pinned and aligned. See -- newRawAlignedPinnedUMArray for more info. -- -- newAlignedPinnedUMArray :: forall e m s. (Prim e, MonadPrim s m) => Size -> e -> m (UMArray e s) -- | O(1) - Same as newRawPinnedUMArray except allocate new -- mutable unboxed array as pinned and aligned according to the -- Prim instance for the type of element e -- -- Documentation for utilized primop: newAlignedPinnedByteArray#. -- -- newRawAlignedPinnedUMArray :: forall e m s. (Prim e, MonadPrim s m) => Size -> m (UMArray e s) -- | Same as makeUMArray, but allocate memory as pinned and aligned. -- -- makeAlignedPinnedUMArray :: forall e m s. (Prim e, MonadPrim s m) => Size -> (Int -> m e) -> m (UMArray 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: copyMutableByteArray#. -- -- moveUMArray :: forall e m s. (Prim e, MonadPrim s m) => UMArray e s -> Int -> UMArray e s -> Int -> Size -> m () -- | O(n) - Write the same element into the dstMutArray -- mutable array n times starting at dstStartIx offset. -- -- setUMArray :: forall e m s. (Prim e, MonadPrim s m) => UMArray e s -> Int -> Size -> e -> m () -- | O(1) - Reduce the size of a mutable unboxed array. -- -- Documentation for utilized primop: shrinkMutableByteArray#. -- -- -- --
    --
  1. 3.0
  2. --
shrinkUMArray :: forall e m s. (MonadPrim s m, Prim e) => UMArray e s -> Size -> m () -- | O(1) - Either grow or shrink the size of a mutable unboxed -- array. Shrinking happens without new allocation and data copy, while -- growing the array is implemented with allocation of new unpinned array -- and copy of the data over from the source array srcMutArray. -- This has a consequence that produced array dstMutArray might -- refer to the same srcMutArray or to a totally new array, -- which can be checked with isSameUMArray. -- -- Documentation on the utilized primop: resizeMutableByteArray#. -- -- -- --
    --
  1. 3.0
  2. --
resizeUMArray :: forall e m s. (MonadPrim s m, Prim e) => UMArray e s -> Size -> m (UMArray e s) -- | O(1) - Convert a mutable unboxed array into an immutable one. -- Use thawUArray in order to go in the opposite direction. -- -- Documentation on the utilized primop: unsafeFreezeByteArray#. -- -- freezeUMArray :: forall e m s. MonadPrim s m => UMArray e s -> m (UArray e) -- | Default "raw" element for boxed arrays. uninitialized :: HasCallStack => String -> String -> a -- | Helper for generating mutable arrays makeMutWith :: Monad m => (Size -> m b) -> (b -> Int -> a -> m ()) -> Size -> (Int -> m a) -> m b -- | Convert a list to a mutable array fromListMutWith :: Monad m => (Size -> m b) -> (b -> Int -> a -> m ()) -> Size -> [a] -> m b -- | Right fold that is strict on the element. The key feature of this -- function is that it can be used to convert an array to a list by -- integrating with list fusion using build. foldrWithFB :: (a e -> Size) -> (a e -> Int -> e) -> (e -> b -> b) -> b -> a e -> b -- | Check for equality of two arrays eqWith :: Eq e => (a e -> a e -> Bool) -> (a e -> Size) -> (a e -> Int -> e) -> a e -> a e -> Bool -- | Compare two arrays using supplied functions compareWith :: Ord e => (a e -> a e -> Bool) -> (a e -> Size) -> (a e -> Int -> e) -> a e -> a e -> Ordering -- | Append two arrays together using supplied functions appendWith :: (forall s. Size -> ST s (ma e s)) -> (forall s. a e -> Int -> ma e s -> Int -> Size -> ST s ()) -> (forall s. ma e s -> ST s (a e)) -> (a e -> Size) -> a e -> a e -> a e -- | Concat many arrays together using supplied functions concatWith :: (forall s. Size -> ST s (ma e s)) -> (forall s. a e -> Int -> ma e s -> Int -> Size -> ST s ()) -> (forall s. ma e s -> ST s (a e)) -> (a e -> Size) -> [a e] -> a e instance GHC.Enum.Enum Data.Prim.Array.Size instance GHC.Enum.Bounded Data.Prim.Array.Size instance GHC.Real.Integral Data.Prim.Array.Size instance GHC.Real.Real Data.Prim.Array.Size instance GHC.Num.Num Data.Prim.Array.Size instance GHC.Classes.Ord Data.Prim.Array.Size instance GHC.Classes.Eq Data.Prim.Array.Size instance GHC.Show.Show Data.Prim.Array.Size instance GHC.Classes.Eq (Data.Prim.Array.UMArray e s) instance Control.DeepSeq.NFData (Data.Prim.Array.UMArray e s) instance (Data.Prim.Class.Prim e, GHC.Show.Show e) => GHC.Show.Show (Data.Prim.Array.UArray e) instance Data.Prim.Class.Prim e => GHC.Exts.IsList (Data.Prim.Array.UArray e) instance (e GHC.Types.~ GHC.Types.Char) => Data.String.IsString (Data.Prim.Array.UArray e) instance Control.DeepSeq.NFData (Data.Prim.Array.UArray e) instance (Data.Prim.Class.Prim e, GHC.Classes.Eq e) => GHC.Classes.Eq (Data.Prim.Array.UArray e) instance (Data.Prim.Class.Prim e, GHC.Classes.Ord e) => GHC.Classes.Ord (Data.Prim.Array.UArray e) instance Data.Prim.Class.Prim e => GHC.Base.Semigroup (Data.Prim.Array.UArray e) instance Data.Prim.Class.Prim e => GHC.Base.Monoid (Data.Prim.Array.UArray e) instance GHC.Classes.Eq (Data.Prim.Array.SBMArray e s) instance GHC.Base.Functor Data.Prim.Array.SBArray instance Data.Foldable.Foldable Data.Prim.Array.SBArray instance Data.Functor.Classes.Show1 Data.Prim.Array.SBArray instance GHC.Show.Show e => GHC.Show.Show (Data.Prim.Array.SBArray e) instance GHC.Exts.IsList (Data.Prim.Array.SBArray e) instance (e GHC.Types.~ GHC.Types.Char) => Data.String.IsString (Data.Prim.Array.SBArray e) instance Control.DeepSeq.NFData e => Control.DeepSeq.NFData (Data.Prim.Array.SBArray e) instance GHC.Classes.Eq e => GHC.Classes.Eq (Data.Prim.Array.SBArray e) instance GHC.Classes.Ord e => GHC.Classes.Ord (Data.Prim.Array.SBArray e) instance Data.Functor.Classes.Eq1 Data.Prim.Array.SBArray instance Data.Functor.Classes.Ord1 Data.Prim.Array.SBArray instance GHC.Base.Semigroup (Data.Prim.Array.SBArray e) instance GHC.Base.Monoid (Data.Prim.Array.SBArray e) instance GHC.Classes.Eq (Data.Prim.Array.BMArray e s) instance GHC.Base.Functor Data.Prim.Array.BArray instance Data.Foldable.Foldable Data.Prim.Array.BArray instance Data.Functor.Classes.Show1 Data.Prim.Array.BArray instance GHC.Show.Show e => GHC.Show.Show (Data.Prim.Array.BArray e) instance GHC.Exts.IsList (Data.Prim.Array.BArray e) instance (e GHC.Types.~ GHC.Types.Char) => Data.String.IsString (Data.Prim.Array.BArray e) instance Control.DeepSeq.NFData e => Control.DeepSeq.NFData (Data.Prim.Array.BArray e) instance GHC.Classes.Eq e => GHC.Classes.Eq (Data.Prim.Array.BArray e) instance GHC.Classes.Ord e => GHC.Classes.Ord (Data.Prim.Array.BArray e) instance Data.Functor.Classes.Eq1 Data.Prim.Array.BArray instance Data.Functor.Classes.Ord1 Data.Prim.Array.BArray instance GHC.Base.Semigroup (Data.Prim.Array.BArray e) instance GHC.Base.Monoid (Data.Prim.Array.BArray e) instance Data.Prim.Class.Prim Data.Prim.Array.Size module Foreign.Prim.Ptr plusOffPtr :: Prim e => Ptr e -> Off e -> Ptr e plusByteOffPtr :: Ptr e -> Off Word8 -> Ptr e -- | Find the offset in number of elements that is between the two pointers -- by subtracting one address from another and dividing the result by the -- size of an element. minusOffPtr :: Prim e => Ptr e -> Ptr e -> Off e -- | Same as minusOffPtr, but will also return the remainder in -- bytes that is left over. minusOffRemPtr :: Prim e => Ptr e -> Ptr e -> (Off e, Off Word8) -- | Find the offset in bytes that is between the two pointers by -- subtracting one address from another. minusByteOffPtr :: Ptr e -> Ptr e -> Off Word8 readPtr :: (MonadPrim s m, Prim e) => Ptr e -> m e readOffPtr :: (MonadPrim s m, Prim e) => Ptr e -> Off e -> m e readByteOffPtr :: (MonadPrim s m, Prim e) => Ptr e -> Off Word8 -> m e writePtr :: (MonadPrim s m, Prim e) => Ptr e -> e -> m () writeOffPtr :: (MonadPrim s m, Prim e) => Ptr e -> Off e -> e -> m () writeByteOffPtr :: (MonadPrim s m, Prim e) => Ptr e -> Off Word8 -> e -> m () setOffPtr :: (MonadPrim s m, Prim e) => Ptr e -> Off e -> Count e -> e -> m () copyPtrToPtr :: (MonadPrim s m, Prim e) => Ptr e -> Off e -> Ptr e -> Off e -> Count e -> m () copyByteOffPtrToPtr :: (MonadPrim s m, Prim e) => Ptr e -> Off Word8 -> Ptr e -> Off Word8 -> Count e -> m () movePtrToPtr :: (MonadPrim s m, Prim e) => Ptr e -> Off e -> Ptr e -> Off e -> Count e -> m () moveByteOffPtrToPtr :: (MonadPrim s m, Prim e) => Ptr e -> Off Word8 -> Ptr e -> Off Word8 -> Count e -> m () -- | Compare memory between two pointers. Offsets and count is in number of -- elements, instead of byte count. Use compareByteOffPtrToPtr -- when offset in bytes is required. comparePtrToPtr :: Prim e => Ptr e -> Off e -> Ptr e -> Off e -> Count e -> Ordering -- | Same as comparePtrToPtr, except offset is in bytes instead of -- number of elements. compareByteOffPtrToPtr :: Prim e => Ptr e -> Off Word8 -> Ptr e -> Off Word8 -> Count e -> Ordering -- | Same as freeHaskellFunPtr freeHaskellFunPtr :: MonadPrim s m => FunPtr 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 -- | 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 -- -- -- -- A value of type FunPtr a may be a pointer to a foreign -- function, either returned by another foreign function or imported with -- a a static address import like -- --
--   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). -- --

Examples

-- --
--   >>> 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. -- --

Examples

-- --
--   >>> 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 -- --

Examples

-- --
--   >>> 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. -- --

Examples

-- --
--   >>> 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. -- --

Examples

-- --
--   >>> 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. -- --

Examples

-- --
--   >>> 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. -- --

Examples

-- --
--   >>> 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. -- --

Examples

modifyRefM :: MonadPrim s m => Ref a s -> (a -> m (a, b)) -> m b -- | Same as modifyRefM, except evaluates new value to normal form -- prior ot it being written to the mutable ref. modifyDeepRefM :: (NFData a, MonadPrim s m) => Ref a s -> (a -> m (a, b)) -> m b -- | Modify value of a mutable variable with a monadic action. Result is -- written strictly. -- --

Examples

-- --
--   >>> 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. -- --

Examples

-- --
--   >>> 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. -- --

Example

-- --
--   >>> 
--   
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. -- --

Examples

-- -- In below example you will see that initial value is never evaluated. -- --
--   >>> 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. -- --

Examples

-- --
--   >>> 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. -- --

Examples

-- --
--   >>> 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)