Popularity
3.9
Declining
Activity
0.0
Stable
5
4
0
Monthly Downloads: 14
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
generic-maybe alternatives and similar packages
Based on the "generic" category.
Alternatively, view generic-maybe alternatives based on common mentions on social networks and blogs.
WorkOS - The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Promo
workos.com
Do you think we are missing an alternative of generic-maybe or a related project?
Popular Comparisons
README
This module is a drop in replacement for 'Maybe'. It generalizes the functions to any types that share the same "sum of products" view of 'Maybe'.
To use the module for your type, enable GHC's DeriveGeneric extension and derive a Generic instance for your type.
{-# LANGUAGE DeriveGeneric #-}
import GHC.Generics
data Result a = Success a | Fail
deriving (Show, Generic)
After which you can use the functions, like your type was 'Maybe'
λ> fromMaybe 'a' Fail
'a'
λ> fromMaybe 'a' $ Success 'b'
'b'