ghc-exactprint-1.14.3.0: tests/examples/transform/ArrowGraft.hs.expected
{-# LANGUAGE Arrows #-}
{-# LANGUAGE LambdaCase #-}
module ArrowGraft where
import Control.Arrow
f :: Arrow k => k (Int, Int) Int
f = proc (a, b) -> do
returnA -< a
+ b
g :: ArrowChoice k => k (Bool, Int, Int) Int
g = proc (x, a, b) -> case x of
True -> returnA -< a
+ b
h :: ArrowChoice k => k (Bool, Int, Int) Int
h = proc (x, a, b) -> (\case
True -> returnA -< a
+ b) x