[Haskell-cafe] weird type signature in Arrow Notation

bob zhang bobzhang1988 at gmail.com
Tue Aug 2 23:08:33 CEST 2011

hi, all
testB :: (ArrowChoice t1, Num a1, Num a) => (a -> a1 -> t2) -> t1 a t3
-> t1 a1 t3 -> t1 (a, a1) t
testB f g h = proc (x,y) -> do
if (f x y)then g -< x + 1 else h -< y + 2

it's very strange that the type of _f_ is (a->a1->t2) which I thought
should be a -> a1 -> Bool,

btw, is there any way to get the output of preprocessing using -XArrow

Thanks a lot
best, bob

More information about the Haskell-Cafe mailing list