EvEff:基于证据翻译的高效效果处理程序
基于证据翻译的高效效果处理程序[1]。 该接口和设计在《宁夏的谢克和达安·莱恩,Haskell 2020》中的“ ”中进行了详细描述。
安装:
首先安装
构建> stack build
加载示例: > stack ghci eveff:lib
..
ghci> runEff helloWorld
"hello world"
定义和使用Reader效果的示例:
{-# LANGUAGE TypeOperators, FlexibleContexts, Rank2Types #-}
import Control.Ev.Eff
-- A @Reader@ effect definition with one operation @ask@ of type @()@ to @a@.
data Reader a e ans = Reader {