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

module ShouldCompile where

import Control.Arrow
import Data.Char

f :: ArrowLoop a => a Char Int
f = proc x -> do
        a <- returnA -< ord x
        rec     b <- returnA -< ord c - ord x
                c <- returnA -< chr a
        returnA -< b + ord c