summaryrefslogtreecommitdiff
path: root/testsuite/tests/arrows/should_compile/arrowif1.hs
blob: 404b1f164c7676e8e9441b541110b7f27c806d20 (plain)
1
2
3
4
5
6
7
8
9
10
11
{-# LANGUAGE Arrows #-}

module ShouldCompile where

import Control.Arrow

f :: ArrowChoice a => a (Int,Int,Int) Int
f = proc (x,y,z) -> if x < y then returnA -< x+y else returnA -< x+z

g :: ArrowChoice a => Int -> a (Int,Int) Int
g x = proc (y,z) -> if x < y then returnA -< x+y else returnA -< x+z