#8091: retry# lacks strictness information -------------------------------------+------------------------------------- Reporter: parcs | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): #13916 leads me to believe this is strictness signature is too strong. Consider this program, {{{#!hs loop :: [TMVar a] -> STM a -> STM a loop [] m = m loop (x:xs) m = loop xs (m `orElse` takeTMVar x) doIt :: [TMVar Int] -> STM Int doIt xs = atomically $ loop xs retry }}} GHC will currently give `loop` a strictness signature of `<S,1*U><C(S),1*C1(U(U,U))>`. So this means that if we give `retry#` a divergent result demand GHC incorrectly assume that `loop xs retry` will itself diverge, which is clearly not true. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8091#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler