#799: runtime error when using par/seq in a monad
------------------------------------+---------------------------------------
  Reporter:  [EMAIL PROTECTED]  |          Owner:         
      Type:  bug                    |         Status:  new    
  Priority:  normal                 |      Milestone:         
 Component:  Runtime System         |        Version:  6.5    
  Severity:  normal                 |     Resolution:         
  Keywords:                         |             Os:  Unknown
Difficulty:  Unknown                |   Architecture:  Unknown
------------------------------------+---------------------------------------
Old description:

> The following version of parfib dies with the following message, but the
> version after the error message works:
>
> parfib 0 = return 1
> parfib 1 = return 1
> parfib n = do
>               n1 <- parfib (n - 1)
>               n2 <- parfib (n - 2)
>               n3 <- (n1 `par` (n2 `seq` (return (n1 + n2 + 1))))
>               return n3
>
> sh-2.04$ ./Main +RTS -N4 -sstderr
> c:\msys\1.0\ghc6.5\bin\Main.exe +RTS -N4 -sstderr
> Main.exe: internal error: evacuate: strange closure type 8208
>     (GHC version 6.5.20060619 for i386_unknown_mingw32)
>     Please report this as a GHC bug:
> http://www.haskell.org/ghc/reportabug
>
> This application has requested the Runtime to terminate it in an unusual
> way.
> Please contact the application's support team for more information.
>
> This version of parfib works
>
> parfib 0 = return 1
> parfib 1 = return 1
> parfib n = do
>               n1 <- parfib (n - 1)
>               n2 <- parfib (n - 2)
>               return (n1 `par` (n2 `seq` (n1 + n2 + 1)))

New description:

 The following version of parfib dies with the following message, but the
 version after the error message works:

 {{{
 parfib 0 = return 1
 parfib 1 = return 1
 parfib n = do
               n1 <- parfib (n - 1)
               n2 <- parfib (n - 2)
               n3 <- (n1 `par` (n2 `seq` (return (n1 + n2 + 1))))
               return n3
 }}}

 {{{
 sh-2.04$ ./Main +RTS -N4 -sstderr
 c:\msys\1.0\ghc6.5\bin\Main.exe +RTS -N4 -sstderr
 Main.exe: internal error: evacuate: strange closure type 8208
     (GHC version 6.5.20060619 for i386_unknown_mingw32)
     Please report this as a GHC bug:
 http://www.haskell.org/ghc/reportabug
 }}}

 This application has requested the Runtime to terminate it in an unusual
 way.
 Please contact the application's support team for more information.

 This version of parfib works

 {{{
 parfib 0 = return 1
 parfib 1 = return 1
 parfib n = do
               n1 <- parfib (n - 1)
               n2 <- parfib (n - 2)
               return (n1 `par` (n2 `seq` (n1 + n2 + 1)))
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/799>
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

Reply via email to