1{-# LANGUAGE Arrows #-}
2{-# LANGUAGE RankNTypes #-}
3{-# LANGUAGE UnicodeSyntax #-}
4module Test11018 where
5
6nonUnicode :: forall a . a -> IO Int
7nonUnicode _ = do
8  x <- readChar
9  return 4
10
11-- ^ An opaque ESD handle for recording data from the soundcard via ESD.
12data Recorder fr ch (r ∷ * -> *)
13    = Recorder {
14        reCloseH :: !(FinalizerHandle r)
15      }
16
17f :: Arrow a => a (Int,Int,Int) Int
18f = proc (x,y,z) -> returnA -< x+y
19
20f2 :: Arrow a => a (Int,Int,Int) Int
21f2 = proc (x,y,z) -> returnA >- x+y
22
23g :: ArrowApply a => Int -> a (a Int Int,Int) Int
24g y = proc (x,z) -> x -<< 2+y
25
26g2 :: ArrowApply a => Int -> a (a Int Int,Int) Int
27g2 y = proc (x,z) -> x >>- 2+y
28
29-- -------------------------------------
30
31unicode ∷ ∀ a . aIO Int
32unicode _ = do
33  xreadChar
34  return 4
35
36-- ^ An opaque ESD handle for recording data from the soundcard via ESD.
37data RecorderU fr ch (r ∷ ★ → ★)
38    = RecorderU {
39        reCloseHU ∷ !(FinalizerHandle r)
40      }
41
42fU :: Arrow aa (Int,Int,Int) Int
43fU = proc (x,y,z) -> returnAx+y
44
45f2U :: Arrow aa (Int,Int,Int) Int
46f2U = proc (x,y,z) -> returnAx+y
47
48gU :: ArrowApply aInt -> a (a Int Int,Int) Int
49gU y = proc (x,z) -> x2+y
50
51g2U :: ArrowApply aInt -> a (a Int Int,Int) Int
52g2U y = proc (x,z) -> x2+y
53