[GHC] #11298: Implicit call stack empty in instance declarations
GHC
ghc-devs at haskell.org
Sun Dec 27 06:34:46 UTC 2015
#11298: Implicit call stack empty in instance declarations
-------------------------------------+-------------------------------------
Reporter: pikajude | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.11
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: Incorrect result
Unknown/Multiple | at runtime
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Given the following code:
{{{#!hs
{-# LANGUAGE ImplicitParams #-}
import GHC.Stack
class Foo a where
foo :: a -> String
main = putStrLn $ foo ()
}}}
In GHC 7.11.20151216, the following instances result in no output:
{{{#!hs
instance Foo () where
foo () = prettyCallStack ?loc
}}}
{{{#!hs
fooHelper = prettyCallStack ?loc
instance Foo () where
foo () = fooHelper
}}}
Though this one does:
{{{#!hs
fooHelper () = prettyCallStack ?loc
instance Foo () where
foo = fooHelper
}}}
The aforementioned instances all yield output with GHC 7.10.3 (after
replacing `prettyCallStack` with `showCallStack`).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11298>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list