Skip to content
vic

tfausak/flow

:droplet: Write more understandable Haskell.

tfausak/flow.json
{
"createdAt": "2015-04-01T22:12:06Z",
"defaultBranch": "main",
"description": ":droplet: Write more understandable Haskell.",
"fullName": "tfausak/flow",
"homepage": "https://hackage.haskell.org/package/flow",
"language": "Haskell",
"name": "flow",
"pushedAt": "2025-11-25T19:34:57Z",
"stargazersCount": 203,
"topics": [
"haskell",
"operator"
],
"updatedAt": "2025-11-25T19:35:01Z",
"url": "https://github.com/tfausak/flow"
}

CI Hackage

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.

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.

To add Flow as a dependency to your package, add it to your Cabal file.

build-depends: flow ==2.0.*

Flow is designed to be imported unqualified. It does not export anything that conflicts with [the base package][].

import Flow
FlowBase
x |> fx & f
f <| xf $ x
apply x ff x
f .> gf >>> g
g <. fg . f
compose f g xg (f x)
x !> f-
f <! xf $! x
apply' x fseq x (f x)

If you want to uniformly use flow operators you can use [HLint] with the hlint-flow.yaml file. For easy use, it is best to extract the hlint-flow.yaml to your project directory and do

Terminal window
> hlint -h hlint-flow.yaml <source file>

or

Terminal window
> 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