Popularity
8.7
Growing
Activity
3.0
-
67
8
4

Monthly Downloads: 12
Programming language: Haskell
License: MIT License
Tags: Control     Effect    
Latest version: v1.0.0.1

eveff alternatives and similar packages

Based on the "Control" category.
Alternatively, view eveff alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of eveff or a related project?

Add another 'Control' Package

README

EvEff: Efficient effect handlers based on Evidence translation

Efficient effect handlers based on evidence translation [1]. The interface and design is described in detail in "Effect Handlers in Haskell, Evidently", Ningning Xie and Daan Leijen, Haskell 2020.

Installation:

  • First install stack
  • Build with > stack build
  • Load examples: > stack ghci eveff:lib .. ghci> runEff helloWorld "hello world"

An example of defining and using a Reader effect:

{-# LANGUAGE  TypeOperators, FlexibleContexts, Rank2Types #-}
import Control.Ev.Eff

-- A @[email protected] effect definition with one operation @[email protected] of type @()@ to @[email protected]
data Reader a e ans = Reader{ ask :: Op () a e ans }

greet :: (Reader String :? e) => Eff e String
greet = do s <- perform ask ()
           return ("hello " ++ s)

test :: String
test = runEff $
       handler (Reader{ ask = value "world" }) $  -- @:: Reader String () [email protected]
       do s <- greet                              -- executes in context @:: Eff (Reader String :* ()) [email protected]
          return s

Enjoy,
Daan Leijen and Ningning Xie, May 2020.

[1] "Effect Handlers, Evidently", Ningning Xie et al., ICFP 2020 (pdf).