• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

tfausak/flow: Write more understandable Haskell.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

tfausak/flow

开源软件地址(OpenSource Url):

https://github.com/tfausak/flow

开源编程语言(OpenSource Language):

Haskell 100.0%

开源软件介绍(OpenSource Introduction):

Flow

CI Hackage Stackage

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

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.

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 <! x f $! x
apply' x f seq x (f x)

Converting existing code

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

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

or

> hlint --git -h hlint-flow.yaml

to check all Haskell source tracked by git.

For more information about Flow, please read the Haddock documentation.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap