summaryrefslogtreecommitdiff
path: root/testsuite/tests/qualifieddo/should_fail/qdofail005.hs
blob: 8fc08e1a24f90286a993ec0a34de10af3458431a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE Arrows #-}
{-# LANGUAGE QualifiedDo #-}

import Control.Arrow
import Prelude as P

main = runKleisli kleisliIO 1

-- Tests the error message when a qualified do
-- is used in a command.
kleisliIO = proc x -> P.do
    y <- arr id -< x+1
    Kleisli print -< 2*y
    let z = x+y
    t <- arr id -< x*z
    returnA -< t+z