summaryrefslogtreecommitdiff
path: root/testsuite/tests/arrows/should_compile/arrowpat.hs
blob: 7e117f9c86c6ed3c03415d367a472ddc0dd30ea4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{-# LANGUAGE Arrows #-}
{-# OPTIONS -fno-warn-redundant-constraints #-}

-- Test for #1662

module Arrow where

import Control.Arrow

expr' :: Arrow a => a Int Int
expr' = error "urk"

term :: Arrow a => a () Int
term = error "urk"

expr1 :: Arrow a => a () Int
expr1 = proc () -> do
          x <- term -< ()
          expr' -< x

expr2 :: Arrow a => a () Int
expr2 = proc y -> do
          x <- term -< y
          expr' -< x