
#10990: Checking whether a default declaration is an instance of a defaultable typeclass is broken -------------------------------------+------------------------------------- Reporter: kanetw | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Compiler (Type | Version: 7.10.2 checker) | Resolution: | 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 kanetw): Sure. {{{ % ./inplace/bin/ghc-stage2 --interactive -dtrace-level1 -ddump-tc-trace
default (Maybe Int) ... Adding error: <interactive>:1:1: error: No instance for (Num (Maybe Int)) arising from a 'default' declaration When checking the types in a default declaration ... }}}.
I might do a fix for this after I finish #10971. It's not a huge problem, but if we don't check for default declaration validity (which might be useful with a possible #10972 implementation) we should adjust the code/document it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10990#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler