
#11417: Missing context in Generics example -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Core | Version: 7.10.3 Libraries | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Documentation Unknown/Multiple | bug Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The Haddocks for `GHC.Generics` give an example of a default implementation using Generics: {{{#!hs class Encode a where encode :: a -> [Bool] default encode :: (Generic a) => a -> [Bool] encode x = encode' (from x) }}} The default signature is missing some context. It should read {{{#!hs default encode :: (Generic a, Encode' (Rep a)) => a -> [Bool] }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11417 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler