Ticket #5662: Ticket 5662.hs

File Ticket 5662.hs, 423 bytes (added by Duschvorhang, 2 years ago)
Line 
1{-# LANGUAGE Arrows, FlexibleContexts #-}
2
3module Main where
4
5import Control.Arrow
6import Control.Arrow.Operations
7import Control.Arrow.Transformer.State
8
9goodArrow :: ArrowState Int arr => arr Bool Int
10goodArrow = arr (const 1)
11
12badArrow :: Arrow arr => arr Bool Int
13badArrow = proc b -> do
14  (result, final_state) <- (|runState (goodArrow -< b)|) 2
15  returnA -< final_state
16
17main = print $ badArrow True