Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tfausak/flow
:droplet: Write more understandable Haskell.
https://github.com/tfausak/flow
haskell
Last synced: 3 months ago
JSON representation
:droplet: Write more understandable Haskell.
- Host: GitHub
- URL: https://github.com/tfausak/flow
- Owner: tfausak
- License: mit
- Created: 2015-04-01T22:12:06.000Z (almost 10 years ago)
- Default Branch: main
- Last Pushed: 2024-10-02T02:00:33.000Z (4 months ago)
- Last Synced: 2024-10-12T22:19:47.316Z (4 months ago)
- Topics: haskell
- Language: Haskell
- Homepage: https://hackage.haskell.org/package/flow
- Size: 126 KB
- Stars: 200
- Watchers: 7
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# [Flow][]
[![CI](https://github.com/tfausak/flow/actions/workflows/ci.yml/badge.svg)](https://github.com/tfausak/flow/actions/workflows/ci.yml)
[![Hackage](https://badgen.net/hackage/v/flow)](https://hackage.haskell.org/package/flow)Write more understandable Haskell.
Flow is a package that provides functions and operators for writing more
understandable Haskell. It is an alternative to some common idioms like
[`($)`][] for function application and [`(.)`][] for function composition.- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Cheat sheet](#cheat-sheet)## Requirements
Flow requires a Haskell compiler. It is tested with recent versions of GHC, but
older or different compilers should be acceptable. For installation with Cabal,
Flow requires at least Cabal 2.2.## Installation
To add Flow as a dependency to your package, add it to your Cabal file.
```
build-depends: flow ==2.0.*
```## Usage
Flow is designed to be imported unqualified. It does not export anything that
conflicts with [the base package][].``` hs
import Flow
```### Cheat sheet
Flow | Base
--------------- | -------------x |> f
| `x & f`f <| x
| `f $ x`
`apply x f` | `f x`
`f .> g` | `f >>> g`
`g <. f` | `g . f`
`compose f g x` | `g (f x)`
`x !> f` | -
`f hlint -h hlint-flow.yaml
```or
``` sh
> hlint --git -h hlint-flow.yaml
```to check all Haskell source tracked by git.
For more information about Flow, please read [the Haddock documentation][].
[HLint]: https://github.com/ndmitchell/hlint
[Flow]: http://taylor.fausak.me/flow/
[`($)`]: http://hackage.haskell.org/package/base-4.8.0.0/docs/Prelude.html#v:-36-
[`(.)`]: http://hackage.haskell.org/package/base-4.8.0.0/docs/Prelude.html#v:.
[the base package]: http://hackage.haskell.org/package/base
[the haddock documentation]: https://hackage.haskell.org/package/flow/docs/Flow.html