Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,261
    • Issues 5,261
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 568
    • Merge requests 568
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #799
Closed
Open
Issue created Jun 22, 2006 by mafuchs@microsoft.com@trac-mafuchs

runtime error when using par/seq in a monad

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)))
Edited Mar 09, 2019 by Simon Marlow
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking