Popularity
3.8
Declining
Activity
0.0
Stable
5
4
0
Monthly Downloads: 12
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.
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
Promo
coderabbit.ai
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'