summaryrefslogtreecommitdiff
path: root/testsuite/tests/arrows/should_compile/arrowrec1.hs
blob: 57b6de783c363f79acb1abfcdbfb0bebae193e9f (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