Community
Modules 3

Data.Tuple.Solo

Solo fills the tuple gap with a singleton tuple.

Solo does not support the usual parenthesized tuple syntax.

Solo

  • has the expected laziness properties

  • can be pattern-matched

  • ships with instances for several standard type classes, including all those supported by H98-standard tuples

  • requires no language extensions, except for hierarchical modules

Note: on GHC-9.0 getSolo is not a record selector.

Solo :: a -> Solo a

The old name of the MkSolo constructor, kept as a pattern synonym so that code written before the constructor was renamed keeps working.

getSolo :: Solo a -> a

Extract the value a one-tuple holds. It is a standalone function rather than a record selector because Solo is wired in.

Build record and source files

Community contribution. The service has not verified this documentation.

Target: Linux on x86-64. Some inferred types and resolved links are not available.

Generator: aihc-haddock-aa6debbd-web-3

Metadata snapshot: 0bd336a8d95b438e09e94d7aa5bdace5e54df87c8b105cf37a3c5cf1264782d2

Open the dependency plan · Download the documentation model

Import a package

Enter a package name and an exact version from Hackage. The site contains imported versions only.