#4236: arrow bug
---------------------------+------------------------------------------------
Reporter: igloo | Owner: SamAnklesaria
Type: bug | Status: closed
Priority: normal | Milestone: 6.14.1
Component: Compiler | Version: 6.12.3
Resolution: fixed | Keywords:
Testcase: | Blockedby:
Difficulty: | Os: Unknown/Multiple
Blocking: | Architecture: Unknown/Multiple
Failure: None/Unknown |
---------------------------+------------------------------------------------
Changes (by ross):
* status: new => closed
* resolution: => fixed
Comment:
The bug was in the type checker: the above program should have been
rejected. It should have been the following, with the components of the
input of g re-arranged:
{{{
{-# LANGUAGE Arrows #-}
module Main where
import Control.Arrow
foo :: (b -> String) -> ((((b, Double), Float), Int) -> String) -> (b ->
String)
foo f g b = f b ++ " " ++ g (((b, 6.0), 1.0), 8)
bar :: (t -> String) -> ((t, Double, Float, Int) -> String) -> t -> String
bar f g = proc x -> do
(f -< x) `foo` \n m k -> g -< (x,n,m,k)
main = do
putStrLn $ foo show show 17
putStrLn $ bar show show 17
putStrLn $ foo show show 42
putStrLn $ bar show show 42
}}}
This version is now accepted and passes core lint. The originally
reported version is now rejected.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4236#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs