packages feed

hocilib-0.2.0: src/Database/Ocilib/Internal.hs

-- |
-- Module:      Database.Ocilib.Internal
-- Copyright:   (c) 2016 Thierry Bourrillon
--              (c) 2016 FPInsight, Eurl.
-- License:     BSD3
-- Maintainer:  Thierry Bourrillon <thierry.bourrillon@fpinsight.com>
-- Stability:   experimental
-- Portability: portable
--
--

module Database.Ocilib.Internal where

import Foreign.Ptr

-- | return Nothing if nullPtr Ptr otherwise
toMaybePtr :: Ptr a -> Maybe (Ptr a)
toMaybePtr a
    | a == nullPtr = Nothing
    | otherwise    = Just a