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

Regex.Rure

Synopsis

Higher-level functions

hsMatches Source #

Arguments

:: RureFlags 
-> ByteString

Regex

-> ByteString

Haystack (unicode)

-> Either String [RureMatch] 

hsIsMatch Source #

Arguments

:: RureFlags 
-> ByteString

Regex

-> ByteString

Haystack (unicode)

-> Either String Bool 

hsSetIsMatch Source #

Arguments

:: RureFlags 
-> [ByteString]

Needles (regex)

-> ByteString

Haystack

-> Either String Bool 

hsFind Source #

Arguments

:: RureFlags 
-> ByteString

Regex

-> ByteString

Haystack

-> Either String (Maybe RureMatch) 

hsSetMatches :: RureFlags -> [ByteString] -> ByteString -> Either String [Bool] Source #

Functions in IO.

compile :: RureFlags -> ByteString -> IO (Either String RurePtr) Source #

compileSet :: RureFlags -> [ByteString] -> IO (Either String RureSetPtr) Source #

isMatch Source #

Arguments

:: RurePtr 
-> ByteString

Unicode

-> CSize

Start

-> IO Bool 

setIsMatch Source #

Arguments

:: RureSetPtr 
-> ByteString

Unicode

-> CSize

Start

-> IO Bool 

setMatches :: RureSetPtr -> ByteString -> CSize -> IO [Bool] Source #

find Source #

Arguments

:: RurePtr 
-> ByteString

Unicode

-> CSize

Start

-> IO (Maybe RureMatch) 

matches :: RureIterPtr -> ByteString -> IO [RureMatch] 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

Pointer types

type RurePtr = ForeignPtr Rure Source #

type RureIterPtr = ForeignPtr RureIter Source #

type RureSetPtr = ForeignPtr RureSet Source #

Options/flags

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