BSD-3-Clause licensed by Frederick Pringle
Maintained by [email protected]
This version can be pinned in stack with:generic-case-0.1.1.1@sha256:e9fe2090fe87e1b35c6a79c17dcf3300c68c5c7416a8065be7d66c28984585d2,2114

Module documentation for 0.1.1.1

Haskell CI

Generic case analysis functions

“Case analysis” functions are those which take one function for each constructor of a sum type, examine a value of that type, and call the relevant function depending on which constructor was used to build that type. Examples include maybe, either and bool. generic-case gives you these functions for any type which implements Generic from generics-sop.

maybe :: forall a r. r -> (a -> r) -> Maybe a -> r
maybe = gcaseR @(Maybe a)

For more detailed documentation, see Generics.Case.

Changes

Changelog

All notable changes to generic-case will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Haskell Package Versioning Policy.

Unreleased

0.1.1.1 - 29.05.2025

Added

  • Updated Readme + Changelog

0.1.1.0 - 08.04.2025

Added

  • Implement gcaseR: functions before datatype in #6.

0.1.0.0 - 08.03.2025

Added

  • First version. Released on an unsuspecting world.