covenant
Safe HaskellNone
LanguageHaskell2010

Covenant.Util

Description

Various helpers that don't fit anywhere else.

Since: 1.0.0

Synopsis

Documentation

pattern NilV :: forall a v. Vector v a => v a Source #

A pattern matching helper for vectors (of all types), corresponding to [] for lists. This pattern is bidirectional, which means it can be used just like a data constructor.

Since: 1.0.0

pattern ConsV :: forall a v. Vector v a => a -> v a -> v a Source #

A pattern matching helper for vectors (of all types), corresponding to x : xs-style matches. This is a read-only pattern, which means you can match with it, but not construct; this is done because cons for vectors is inefficient and should thus be used consciously, using appropriate functions.

Together with NilV, ConsV provides an exhaustive match.

Since: 1.0.0