#3454: ghci freezes on failed pattern match in recursive list comprehension
-----------------------------+----------------------------------------------
Reporter:  Syzygies          |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  6.10.4            |       Severity:  normal          
Keywords:                    |       Testcase:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
-----------------------------+----------------------------------------------
 The following freezes ghci (top shows no resources consumed):

 {{{
 Prelude> let xs = [1..5] : [ xt | (_:xt) <- xs ] in take 7 xs
 [[1,2,3,4,5],[2,3,4,5],[3,4,5],[4,5],[5],[]
 }}}

 This is not the same issue as
 [http://hackage.haskell.org/trac/ghc/ticket/3053] (closed, invalid) as
 there are no elements to filter. (This may be a well-known black hole, but
 not to me; I was hoping a similar list would just terminate, trying to
 avoid the Nothing case boilerplate in an unfoldl.)

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3454>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to