----------------------------------------------------------------------------
-- |
-- Module      :  Data.Emacs.Module.NonNullPtr.Internal
-- Copyright   :  (c) Sergey Vinokurov 2018
-- License     :  Apache-2.0 (see LICENSE)
-- Maintainer  :  serg.foo@gmail.com
----------------------------------------------------------------------------

{-# LANGUAGE GeneralizedNewtypeDeriving #-}

module Data.Emacs.Module.NonNullPtr.Internal (NonNullPtr(..)) where

import Foreign

newtype NonNullPtr a = NonNullPtr { NonNullPtr a -> Ptr a
unNonNullPtr :: Ptr a }
  deriving (NonNullPtr a -> NonNullPtr a -> Bool
(NonNullPtr a -> NonNullPtr a -> Bool)
-> (NonNullPtr a -> NonNullPtr a -> Bool) -> Eq (NonNullPtr a)
forall a. NonNullPtr a -> NonNullPtr a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NonNullPtr a -> NonNullPtr a -> Bool
$c/= :: forall a. NonNullPtr a -> NonNullPtr a -> Bool
== :: NonNullPtr a -> NonNullPtr a -> Bool
$c== :: forall a. NonNullPtr a -> NonNullPtr a -> Bool
Eq, Eq (NonNullPtr a)
Eq (NonNullPtr a)
-> (NonNullPtr a -> NonNullPtr a -> Ordering)
-> (NonNullPtr a -> NonNullPtr a -> Bool)
-> (NonNullPtr a -> NonNullPtr a -> Bool)
-> (NonNullPtr a -> NonNullPtr a -> Bool)
-> (NonNullPtr a -> NonNullPtr a -> Bool)
-> (NonNullPtr a -> NonNullPtr a -> NonNullPtr a)
-> (NonNullPtr a -> NonNullPtr a -> NonNullPtr a)
-> Ord (NonNullPtr a)
NonNullPtr a -> NonNullPtr a -> Bool
NonNullPtr a -> NonNullPtr a -> Ordering
NonNullPtr a -> NonNullPtr a -> NonNullPtr a
forall a. Eq (NonNullPtr a)
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall a. NonNullPtr a -> NonNullPtr a -> Bool
forall a. NonNullPtr a -> NonNullPtr a -> Ordering
forall a. NonNullPtr a -> NonNullPtr a -> NonNullPtr a
min :: NonNullPtr a -> NonNullPtr a -> NonNullPtr a
$cmin :: forall a. NonNullPtr a -> NonNullPtr a -> NonNullPtr a
max :: NonNullPtr a -> NonNullPtr a -> NonNullPtr a
$cmax :: forall a. NonNullPtr a -> NonNullPtr a -> NonNullPtr a
>= :: NonNullPtr a -> NonNullPtr a -> Bool
$c>= :: forall a. NonNullPtr a -> NonNullPtr a -> Bool
> :: NonNullPtr a -> NonNullPtr a -> Bool
$c> :: forall a. NonNullPtr a -> NonNullPtr a -> Bool
<= :: NonNullPtr a -> NonNullPtr a -> Bool
$c<= :: forall a. NonNullPtr a -> NonNullPtr a -> Bool
< :: NonNullPtr a -> NonNullPtr a -> Bool
$c< :: forall a. NonNullPtr a -> NonNullPtr a -> Bool
compare :: NonNullPtr a -> NonNullPtr a -> Ordering
$ccompare :: forall a. NonNullPtr a -> NonNullPtr a -> Ordering
$cp1Ord :: forall a. Eq (NonNullPtr a)
Ord, Int -> NonNullPtr a -> ShowS
[NonNullPtr a] -> ShowS
NonNullPtr a -> String
(Int -> NonNullPtr a -> ShowS)
-> (NonNullPtr a -> String)
-> ([NonNullPtr a] -> ShowS)
-> Show (NonNullPtr a)
forall a. Int -> NonNullPtr a -> ShowS
forall a. [NonNullPtr a] -> ShowS
forall a. NonNullPtr a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NonNullPtr a] -> ShowS
$cshowList :: forall a. [NonNullPtr a] -> ShowS
show :: NonNullPtr a -> String
$cshow :: forall a. NonNullPtr a -> String
showsPrec :: Int -> NonNullPtr a -> ShowS
$cshowsPrec :: forall a. Int -> NonNullPtr a -> ShowS
Show, Ptr b -> Int -> IO (NonNullPtr a)
Ptr b -> Int -> NonNullPtr a -> IO ()
Ptr (NonNullPtr a) -> IO (NonNullPtr a)
Ptr (NonNullPtr a) -> Int -> IO (NonNullPtr a)
Ptr (NonNullPtr a) -> Int -> NonNullPtr a -> IO ()
Ptr (NonNullPtr a) -> NonNullPtr a -> IO ()
NonNullPtr a -> Int
(NonNullPtr a -> Int)
-> (NonNullPtr a -> Int)
-> (Ptr (NonNullPtr a) -> Int -> IO (NonNullPtr a))
-> (Ptr (NonNullPtr a) -> Int -> NonNullPtr a -> IO ())
-> (forall b. Ptr b -> Int -> IO (NonNullPtr a))
-> (forall b. Ptr b -> Int -> NonNullPtr a -> IO ())
-> (Ptr (NonNullPtr a) -> IO (NonNullPtr a))
-> (Ptr (NonNullPtr a) -> NonNullPtr a -> IO ())
-> Storable (NonNullPtr a)
forall b. Ptr b -> Int -> IO (NonNullPtr a)
forall b. Ptr b -> Int -> NonNullPtr a -> IO ()
forall a. Ptr (NonNullPtr a) -> IO (NonNullPtr a)
forall a. Ptr (NonNullPtr a) -> Int -> IO (NonNullPtr a)
forall a. Ptr (NonNullPtr a) -> Int -> NonNullPtr a -> IO ()
forall a. Ptr (NonNullPtr a) -> NonNullPtr a -> IO ()
forall a. NonNullPtr a -> Int
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
forall a b. Ptr b -> Int -> IO (NonNullPtr a)
forall a b. Ptr b -> Int -> NonNullPtr a -> IO ()
poke :: Ptr (NonNullPtr a) -> NonNullPtr a -> IO ()
$cpoke :: forall a. Ptr (NonNullPtr a) -> NonNullPtr a -> IO ()
peek :: Ptr (NonNullPtr a) -> IO (NonNullPtr a)
$cpeek :: forall a. Ptr (NonNullPtr a) -> IO (NonNullPtr a)
pokeByteOff :: Ptr b -> Int -> NonNullPtr a -> IO ()
$cpokeByteOff :: forall a b. Ptr b -> Int -> NonNullPtr a -> IO ()
peekByteOff :: Ptr b -> Int -> IO (NonNullPtr a)
$cpeekByteOff :: forall a b. Ptr b -> Int -> IO (NonNullPtr a)
pokeElemOff :: Ptr (NonNullPtr a) -> Int -> NonNullPtr a -> IO ()
$cpokeElemOff :: forall a. Ptr (NonNullPtr a) -> Int -> NonNullPtr a -> IO ()
peekElemOff :: Ptr (NonNullPtr a) -> Int -> IO (NonNullPtr a)
$cpeekElemOff :: forall a. Ptr (NonNullPtr a) -> Int -> IO (NonNullPtr a)
alignment :: NonNullPtr a -> Int
$calignment :: forall a. NonNullPtr a -> Int
sizeOf :: NonNullPtr a -> Int
$csizeOf :: forall a. NonNullPtr a -> Int
Storable)