streamly-0.7.2: Beautiful Streaming, Concurrent and Reactive Composition

Copyright(c) 2019 Composewell Technologies
(c) 2013 Gabriel Gonzalez
LicenseBSD3
Maintainerstreamly@composewell.com
Stabilityexperimental
PortabilityGHC
Safe HaskellSafe
LanguageHaskell2010

Streamly.Internal.Data.Strict

Description

| Strict data types to be used as accumulator for strict left folds and scans. For more comprehensive strict data types see https://hackage.haskell.org/package/strict-base-types . The names have been suffixed by a prime so that programmers can easily distinguish the strict versions from the lazy ones.

One major advantage of strict data structures as accumulators in folds and scans is that it helps the compiler optimize the code much better by unboxing. In a big tight loop the difference could be huge.

Synopsis

Documentation

data Tuple' a b Source #

Constructors

Tuple' !a !b 
Instances
(Show a, Show b) => Show (Tuple' a b) Source # 
Instance details

Defined in Streamly.Internal.Data.Strict

Methods

showsPrec :: Int -> Tuple' a b -> ShowS #

show :: Tuple' a b -> String #

showList :: [Tuple' a b] -> ShowS #

data Tuple3' a b c Source #

Constructors

Tuple3' !a !b !c 
Instances
(Show a, Show b, Show c) => Show (Tuple3' a b c) Source # 
Instance details

Defined in Streamly.Internal.Data.Strict

Methods

showsPrec :: Int -> Tuple3' a b c -> ShowS #

show :: Tuple3' a b c -> String #

showList :: [Tuple3' a b c] -> ShowS #

data Tuple4' a b c d Source #

Constructors

Tuple4' !a !b !c !d 
Instances
(Show a, Show b, Show c, Show d) => Show (Tuple4' a b c d) Source # 
Instance details

Defined in Streamly.Internal.Data.Strict

Methods

showsPrec :: Int -> Tuple4' a b c d -> ShowS #

show :: Tuple4' a b c d -> String #

showList :: [Tuple4' a b c d] -> ShowS #

data Maybe' a Source #

A strict Maybe

Constructors

Just' !a 
Nothing' 
Instances
Show a => Show (Maybe' a) Source # 
Instance details

Defined in Streamly.Internal.Data.Strict

Methods

showsPrec :: Int -> Maybe' a -> ShowS #

show :: Maybe' a -> String #

showList :: [Maybe' a] -> ShowS #

toMaybe :: Maybe' a -> Maybe a Source #

Convert strict Maybe' to lazy Maybe

data Either' a b Source #

A strict Either

Constructors

Left' !a 
Right' !b 
Instances
(Show a, Show b) => Show (Either' a b) Source # 
Instance details

Defined in Streamly.Internal.Data.Strict

Methods

showsPrec :: Int -> Either' a b -> ShowS #

show :: Either' a b -> String #

showList :: [Either' a b] -> ShowS #