regex-rure-0.1.2.0: Bindings to Rust's regex library
Safe HaskellSafe-Inferred
LanguageHaskell2010

Regex.Rure.FFI

Description

See rure.h for documentation + how to use.

Synopsis

Types

Abstract types

Integer types

type UInt8 = CUChar Source #

type UInt32 = CUInt Source #

Types

data RureMatch Source #

Constructors

RureMatch 

Fields

Instances

Instances details
Show RureMatch Source # 
Instance details

Defined in Regex.Rure.FFI

Methods

showsPrec :: Int -> RureMatch -> ShowS

show :: RureMatch -> String

showList :: [RureMatch] -> ShowS

Eq RureMatch Source # 
Instance details

Defined in Regex.Rure.FFI

Methods

(==) :: RureMatch -> RureMatch -> Bool

(/=) :: RureMatch -> RureMatch -> Bool

data RureFlags Source #

Instances

Instances details
Semigroup RureFlags Source # 
Instance details

Defined in Regex.Rure.FFI

Methods

(<>) :: RureFlags -> RureFlags -> RureFlags

sconcat :: NonEmpty RureFlags -> RureFlags

stimes :: Integral b => b -> RureFlags -> RureFlags

Pointer types (c2hs)

type RurePtr = ForeignPtr Rure Source #

type RureErrorPtr = ForeignPtr RureError Source #

type RureIterPtr = ForeignPtr RureIter Source #

type RureSetPtr = ForeignPtr RureSet Source #

Functions

Allocation

rureOptionsFree :: FinalizerPtr () Source #

rureErrorFree :: FinalizerPtr () Source #

rureFree :: FinalizerPtr () Source #

rureIterFree :: FinalizerPtr () Source #

rureCapturesFree :: FinalizerPtr () Source #

rureSetFree :: FinalizerPtr () Source #

rureIterCaptureNamesFree :: FinalizerPtr () Source #

Options

Compilation

rureCompile :: Ptr UInt8 -> CSize -> RureFlags -> RureOptionsPtr -> RureErrorPtr -> IO (Ptr Rure) Source #

rureCompileMust :: CString -> IO (Ptr Rure) Source #

rureCompileSet :: Ptr (Ptr UInt8) -> Ptr CSize -> CSize -> RureFlags -> RureOptionsPtr -> RureErrorPtr -> IO (Ptr RureSet) Source #

Matching

rureIsMatch :: RurePtr -> Ptr UInt8 -> CSize -> CSize -> IO Bool Source #

rureFind :: RurePtr -> Ptr UInt8 -> CSize -> CSize -> Ptr RureMatch -> IO Bool Source #

rureIterNext :: RureIterPtr -> Ptr UInt8 -> CSize -> Ptr RureMatch -> IO Bool Source #

rureCapturesAt :: RureCapturesPtr -> CSize -> Ptr RureMatch -> IO Bool Source #

rureFindCaptures :: RurePtr -> Ptr UInt8 -> CSize -> CSize -> RureCapturesPtr -> IO Bool Source #

rureShortestMatch :: RurePtr -> Ptr UInt8 -> CSize -> CSize -> Ptr CSize -> IO Bool Source #

rureCaptureNameIndex :: RurePtr -> CString -> IO Int32 Source #

rureSetIsMatch :: RureSetPtr -> Ptr UInt8 -> CSize -> CSize -> IO Bool Source #

rureSetMatches :: RureSetPtr -> Ptr UInt8 -> CSize -> CSize -> Ptr CBool -> IO Bool Source #

rureSetLen :: RureSetPtr -> IO CSize Source #

Flags

String utilities

rureEscapeMust :: CString -> IO CString Source #

rureCstringFree :: CString -> IO () Source #