repa-stream-4.1.0.1: Stream functions not present in the vector library.

Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Repa.Option

Contents

Description

Data types used during low-level fusion optimisations.

These types are synonyms for Maybe (a, b), which are strict in the components. They can be used to ensure that we do not suspend the computation that produces these components in fused code.

Synopsis

Single component

data Option a Source

A strict Maybe type.

Constructors

Some !a 
None 

Instances

Show a => Show (Option a) 

fromOption :: Option a -> Maybe a Source

Convert an Option to a Maybe.

toOption :: Maybe a -> Option a Source

Convert a Maybe to an Option.

Two components

data Option2 a b Source

A strict Maybe type, with two parameters.

Constructors

Some2 !a !b 
None2 

Instances

(Show a, Show b) => Show (Option2 a b) 

fromOption2 :: Option2 a b -> Maybe (a, b) Source

Convert an Option2 to a Maybe.

toOption2 :: Maybe (a, b) -> Option2 a b Source

Convert a Maybe to an Option2.

Three components

data Option3 a b c Source

A strict Maybe type with three parameters.

Constructors

Some3 !a !b !c 
None3 

Instances

(Show a, Show b, Show c) => Show (Option3 a b c) 

fromOption3 :: Option3 a b c -> Maybe (a, b, c) Source

Convert an Option2 to a Maybe.

toOption3 :: Maybe (a, b, c) -> Option3 a b c Source

Convert a Maybe to an Option3.