zenacy-html-2.0.2: A standard compliant HTML parsing library

Safe HaskellSafe
LanguageHaskell2010

Zenacy.HTML.Internal.Core

Description

Defines core functions that augment the prelude.

Synopsis

Documentation

updateSTRef :: STRef s a -> (a -> a) -> ST s () Source #

Updates an STRef by applying a function to its value.

rref :: STRef s a -> ST s a Source #

Abbreviation for reading an STRef.

wref :: STRef s a -> a -> ST s () Source #

Abbreviation for writing an STRef.

uref :: STRef s a -> (a -> a) -> ST s () Source #

Abbreviation for updating an STRef.

findSucc :: (a -> Bool) -> [a] -> Maybe a Source #

Finds the element in a list that is the succeessor of the element matching a predicate.

insertBefore :: (a -> Bool) -> a -> [a] -> [a] Source #

Inserts an element in a list before the element satisfied by a predicate.

removeFirst :: (a -> Bool) -> [a] -> [a] Source #

Removes the first item from a list that satisfies a predicate.

textExtract :: Text -> Text -> Text -> Maybe Text Source #

Extracts a range of text bewteen two delimiters.

textBlank :: Int -> Text Source #

Returns a blank text of the specified length.

textReadDec :: Text -> Maybe Int Source #

Converts a decimal string to a integer.