Partial
The decoder has consumed the available input and needs more to
continue. Provide
Just if more input is available and
Nothing otherwise, and you will get a new
Decoder.
Supply this continuation with more input so that the parser can
resume. To indicate that no more input is available, pass an empty
string to the continuation.
Note: if you get a
Partial result, do not call its
continuation more than once.
Supply this continuation with more input so that the parser can
resume. To indicate that no more input is available, use an
empty string.
ConstraintKind synonym for marking partial functions
A constraint synonym which denotes that the function is partial, and
will (on GHC 8.* and up) produce a stack trace on failure. You may
mark your own non-total functions as Partial, if necessary, and this
will ensure that they produce useful stack traces.
A constraint which documents that a function is partial, and on GHC
8.0 and above produces a stack trace on failure. For example:
myHead :: Partial => [a] -> a
myHead [] = error "bad"
myHead (x:xs) = x
When using
Partial with GHC 7.8 or below you need to enable the
language feature
ConstraintKinds, e.g.
{-# LANGUAGE
ConstraintKinds #-} at the top of the file.
Lazy
ByteString partial functions. Import as:
import qualified RIO.ByteString.Lazy.Partial as BL'
Strict
ByteString partial functions. Import as:
import qualified RIO.ByteString.Partial as B'
Unicode
Char partial functions. Import as:
import qualified RIO.Char.Partial as C'
Strict
HashMap partial functions. Import as:
import qualified RIO.HashMap.Partial as HM'
List partial functions. Import as:
import qualified RIO.List.Partial as L'
Strict
Map partial functions. Import as:
import qualified RIO.Map.Partial as Map'
NonEmpty list partial functions. Import as:
import qualified RIO.NonEmpty.Partial as NE'
Partial functions. Import as:
import qualified RIO.Partial as RIO'
Set partial functions. Import as:
import qualified RIO.Set.Partial as Set'
Lazy
Text partial functions. Import as:
import qualified RIO.Text.Lazy.Partial as TL'
Strict
Text partial functions. Import as:
import qualified RIO.Text.Partial as T'
Boxed
Vector partial functions. Import as:
import qualified RIO.Vector.Boxed.Partial as VB'
Generic
Vector interface partial functions. Import as:
import qualified RIO.Vector.Partial as V'
Storable
Vector partial functions. Import as:
import qualified RIO.Vector.Storable.Partial as VS'
Unboxed
Vector partial functions. Import as:
import qualified RIO.Vector.Unboxed.Partial as VU'
Partial functions vocabulary
This module provides common partial functions for operating on
ShortText.
The use of these functions is discouraged as they tend to be
error-prone.
The decoder has consumed the available input and needs more to
continue. Provide
Just if more input is available and
Nothing otherwise, and you will get a new
IDecode.
whether to produce a full document or partial