{-# LINE 1 "src/Language/Perl/Internal/Constants.hsc" #-}

{-# LANGUAGE PatternSynonyms #-}

{- |

Constants and stuff extracted from header files.

-}

module Language.Perl.Internal.Constants
  (
  -- * Flag values for 'call' functions.
  --
  -- See <https://perldoc.perl.org/perlcall#FLAG-VALUES perlcall> for more
  -- detail.
    pattern G_VOID
  , pattern G_SCALAR
  , pattern G_ARRAY
  , pattern G_DISCARD
  , pattern G_NOARGS
  , pattern G_EVAL
  , pattern G_KEEPERR
  -- * Flag values for 'get_sv' "variable-creation" functions.
  --
  -- See <https://perldoc.perl.org/perlguts#Creating-New-Variables perlguts> for more detail.
  , pattern GV_ADD
  , pattern GV_ADDMULTI
  , pattern GV_ADDWARN
  -- * Underlying C types
  , IV
  , NV
  )
  where





import Data.Int

-- | void context
pattern G_VOID :: (Num a, Eq a) => a
pattern G_VOID   = 1
{-# LINE 44 "src/Language/Perl/Internal/Constants.hsc" #-}

-- | scalar context
pattern G_SCALAR :: (Num a, Eq a) => a
pattern G_SCALAR   = 2
{-# LINE 48 "src/Language/Perl/Internal/Constants.hsc" #-}

-- | list context (yes - it IS called list context
-- in the Perl docco, despite the name)
pattern G_ARRAY :: (Num a, Eq a) => a
pattern G_ARRAY   = 3
{-# LINE 53 "src/Language/Perl/Internal/Constants.hsc" #-}

-- | discard results
pattern G_DISCARD :: (Num a, Eq a) => a
pattern G_DISCARD   = 4
{-# LINE 57 "src/Language/Perl/Internal/Constants.hsc" #-}

-- | no args -- use with caution
pattern G_NOARGS :: (Num a, Eq a) => a
pattern G_NOARGS   = 16
{-# LINE 61 "src/Language/Perl/Internal/Constants.hsc" #-}

-- | catch exceptions
pattern G_EVAL :: (Num a, Eq a) => a
pattern G_EVAL   = 8
{-# LINE 65 "src/Language/Perl/Internal/Constants.hsc" #-}

-- | do ... something with errors.
-- see <https://perldoc.perl.org/perlcall#FLAG-VALUES perlcall>
pattern G_KEEPERR :: (Num a, Eq a) => a
pattern G_KEEPERR   = 32
{-# LINE 70 "src/Language/Perl/Internal/Constants.hsc" #-}

-- | used in calls to "get_sv" - specifies
-- that the named variable should be created.
pattern GV_ADD :: (Num a, Eq a) => a
pattern GV_ADD   = 1
{-# LINE 75 "src/Language/Perl/Internal/Constants.hsc" #-}

-- | may be bitwise-ORed with 'GV_ADD' - specifies
-- that no warning should be emitted if the
-- variable is used only once.
pattern GV_ADDMULTI :: (Num a, Eq a) => a
pattern GV_ADDMULTI   = 2
{-# LINE 81 "src/Language/Perl/Internal/Constants.hsc" #-}

-- | may be bitwise-ORed with 'GV_ADD' - issues the warning:
--
-- @
-- Had to create <varname> unexpectedly
-- @
--
-- if the named variable did not exist before the function was called.
pattern GV_ADDWARN :: (Num a, Eq a) => a
pattern GV_ADDWARN   = 4
{-# LINE 91 "src/Language/Perl/Internal/Constants.hsc" #-}


-- | Underlying C integer type used by Perl. (\"IV" = "Integer value".)
type IV = Int64
{-# LINE 95 "src/Language/Perl/Internal/Constants.hsc" #-}

-- | Underlying C floating-point type used by Perl. (\"NV" = "Numeric value".)
type NV = Double
{-# LINE 98 "src/Language/Perl/Internal/Constants.hsc" #-}