caseof alternatives and similar packages
Based on the "Development" category.
Alternatively, view caseof alternatives based on common mentions on social networks and blogs.
-
criterion
A powerful but simple library for measuring the performance of Haskell code. -
stgi
A user-centric visual STG implementation to help understand GHC/Haskell's execution model. -
haskell-lsp
Haskell library for the Microsoft Language Server Protocol -
cabal-install-parsers
Scripts and instructions for using CI services (e.g. Travis CI or Appveyor) with multiple GHC configurations -
structured-haskell-mode
Structured editing minor mode for Haskell in Emacs -
inline-c
Write Haskell source files including C code inline. No FFI required. -
inline-java
Haskell/Java interop via inline Java code in Haskell modules. -
gi-atk
Generate Haskell bindings for GObject-Introspection capable libraries -
lambdabot-core
A friendly IRC bot and apprentice coder, written in Haskell. -
scion
OLD, DEPRECATED: Use this instead https://github.com/haskell/haskell-ide-engine
Less time debugging, more time building
Do you think we are missing an alternative of caseof or a related project?
Popular Comparisons
README
caseof
A simple way to query constructors, like cases but slightly more concise.
Aimed at sum types with many constructors:
data Wiggle = Woo Int Char | Wibble Int deriving Show
There is a case predicate:
> $(isCaseOf 'Woo) (Woo 5 'a')
True
There is a Maybe
-based matcher:
> $(maybeCaseOf 'Woo) (Woo 1 'a')
Just (1,'a')
There is a "map" over a constructor:
> $(mapCaseOf 'Left) succ (Left 3)
Left 4
There is a combinator which calls your function with n arguments, or passes the whole value to an "else" clause.
> $(caseOf 'Woo) (\x y -> show x ++ show y) (const "") (Wibble 5)
""
Use in your project
In your stack.yaml, put:
extra-deps:
- git: https://github.com/chrisdone/caseof.git
commit: 9a7f6bb
Lens prisms
For me, the lens
approach (aside from being a big dependency) has
these downsides: a complicated set of types and a requirement to
derive prisms for the types, which enter the namespace. The downside
for caseof
is the TH requirement, but it is dead simple. You just
read this README in 20 seconds.