arrowrec1.hs 245 Bytes
Newer Older
1
{-# OPTIONS -farrows #-}
ross's avatar
ross committed
2
3
4
5
6
7
8
9
10
11
12
13

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