[GHC] #9254: Entered absent argument (again)
#9254: Entered absent argument (again) ------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.4 Component: Compiler | Version: 7.8.2 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- Consider this program: {{{ {-# LANGUAGE MagicHash, UnboxedTuples #-} module Main where import GHC.Exts f :: (() -> (# Int#, () #)) -> () {-# NOINLINE f #-} -- Strictness signature was (7.8.2) -- <C(S(LS)), 1*C1(U(A,1*U()))> -- I.e. calls k, but discards first component of result f k = case k () of (# _, r #) -> r g :: Int -> () g y = f (\n -> (# case y of I# y2 -> h (h (h (h (h (h (h y2)))))), n #)) -- RHS is big enough to force worker/wrapper {-# NOINLINE h #-} h :: Int# -> Int# h n = n +# 1# main = print (g 1) }}} You'll get {{{ bash$ ghc -O -o foo Foo.hs bash$ ./foo foo: Oops! Entered absent arg w_s4vl Int }}} Ugh! This is the bug underlying [https://github.com/bos/vector-binary- instances/issues/4 this bug report]. I know what is going on. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9254> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9254: Entered absent argument (again) -------------------------------------+------------------------------------ Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.4 Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"d6ee82b29598dcc1028773dd987b7a2fb17519b7/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="d6ee82b29598dcc1028773dd987b7a2fb17519b7" Fix demand analyser for unboxed types This is a tricky case exposed by Trac #9254. I'm surprised it hasn't shown up before, because it's happens when you use unsafePerformIO in the right way. Anyway, fixed now. See Note [Analysing with absent demand] in Demand.lhs }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9254#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9254: Entered absent argument (again) -------------------------------------+------------------------------------ Reporter: simonpj | Owner: Type: bug | Status: merge Priority: normal | Milestone: 7.8.4 Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by simonpj): * status: new => merge Comment: Merge to 7.8; either 7.8.3 if time or 7.8.4 if not. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9254#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#9254: Entered absent argument (again) -------------------------------------+------------------------------------ Reporter: simonpj | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.8.3 Component: Compiler | Version: 7.8.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed * milestone: 7.8.4 => 7.8.3 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9254#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC