hs-perl5-0.1.0: Haskell interface to embedded Perl 5 interpreter

Safe HaskellSafe
LanguageHaskell2010

Language.Perl.Types

Contents

Description

Types for interfacing with an embedded Perl interpreter.

Synopsis

Basic types

data SV Source #

(pointer to a) scalar value.

Instances

Eq SV Source # 

Methods

(==) :: SV -> SV -> Bool #

(/=) :: SV -> SV -> Bool #

Show SV Source # 

Methods

showsPrec :: Int -> SV -> ShowS #

show :: SV -> String #

showList :: [SV] -> ShowS #

FromSV SV Source # 

Methods

fromSV :: SV -> IO SV Source #

ToSV SV Source # 

Methods

toSV :: SV -> IO SV Source #

data AV Source #

(pointer to an) array value.

Instances

Eq AV Source # 

Methods

(==) :: AV -> AV -> Bool #

(/=) :: AV -> AV -> Bool #

Show AV Source # 

Methods

showsPrec :: Int -> AV -> ShowS #

show :: AV -> String #

showList :: [AV] -> ShowS #

data CV Source #

(pointer to a) code value.

Instances

Eq CV Source # 

Methods

(==) :: CV -> CV -> Bool #

(/=) :: CV -> CV -> Bool #

Show CV Source # 

Methods

showsPrec :: Int -> CV -> ShowS #

show :: CV -> String #

showList :: [CV] -> ShowS #

data Interpreter Source #

(pointer to a) Perl interpreter instance.

type Callback = Ptr SV -> CInt -> IO (Ptr SV) Source #

type of a callback from Perl into Haskell.

Calling context

numContext :: (Eq p, Num p) => Context -> p Source #

Convert a Context to an integral value that can be passed to the C API.

Used by the various "call_..." and "eval_..." Perl functions (which then pass it on to whatever code is being called).

Underlying C types

type IV = Int64 Source #

Underlying C integer type used by Perl. ("IV" = "Integer value".)

type NV = Double Source #

Underlying C floating-point type used by Perl. ("NV" = "Numeric value".)