summaryrefslogtreecommitdiff
path: root/testsuite/tests/arrows/should_compile/arrowpat.hs
blob: dda06cfedf223152b6b63f64e97644deb24f2b1f (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 Trac #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