unipatterns alternatives and similar packages
Based on the "Language" category.
Alternatively, view unipatterns alternatives based on common mentions on social networks and blogs.
-
elm-compiler
Compiler for Elm, a functional language for reliable webapps. -
stylish-haskell
Haskell code prettifier [Moved to: https://github.com/haskell/stylish-haskell] -
haskell-src-exts
Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer -
haskell-tools-ast-fromghc
Developer tools for Haskell -
nirum
Nirum: IDL compiler and RPC/distributed object framework for microservices -
language-python
A parser for Python 2.x and 3.x written in Haskell -
liquid-fixpoint
Horn Clause Constraint Solving for Liquid Types -
elm-export
Create Elm types and JSON decoders from Haskell source. -
tal
An implementation of Typed Assembly Language (Morrisett, Walker, Crary, Glew) -
camfort
Light-weight verification and transformation tools for Fortran -
language-c-quote
C/CUDA/OpenCL/Objective-C quasiquoting library. -
aterm-utils
Utility functions for working with aterms as generated by Minitermite -
language-ecmascript
Haskell library: ECMAScript parser, pretty-printer and additional tools -
ministg
Ministg is an interpreter for a high-level, small-step, operational semantics for the STG machine. -
purescript-tsd-gen
TypeScript Declaration File (.d.ts) generator for PureScript
Static code analysis for 29 languages.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of unipatterns or a related project?
README
unipatterns
Thanks to @isovector for the idea
This library provides helpers for using unipatterns safely; what's a unipattern you ask?
Have you ever wanted to match on a really large expression in-line but don't want to bother pulling out a whole case-statement?
Scrap your case statements with unipattern matches!
For example 'maybeMatch' will detect failed pattern matches and will inject the result into 'Maybe'
>>> maybeMatch (\[a] -> show a) [1, 2, 3]
Nothing
>>> maybeMatch (\[a] -> show a) [1]
Just "1"
Most other operations provide different failure modes; for instance returning the original argument, returning 'empty', or using a provided failure handler.
It turns out this is pretty handy when using scrap-your-boilerplate operations:
everywhere (mkT (match (\"hidden" -> "found")))
This searches through a generic structure and will map any @"hidden"@ values into @"found"@; and will leave everything else alone.
You can also use this with humble fmap, inside monadic binds, etc. Anywhere that you really only care about one particular pattern, and want some trivial behaviour for the others. The following changes all Lefts into Rights, but leaves the Rights alone.
>>> match (\(Left n, x) -> (Right (show n), x)) <$> [(Right "a", 1), (Left 10, 2)]
[(Right "a",1),(Right "10",2)]
Does this library really need to exist? Probably not, but there are times when it's handy to have.