[GHC] #16248: ImplicitParams does not imply FlexibleContexts or FlexibleInstances

GHC ghc-devs at haskell.org
Mon Jan 28 08:59:21 UTC 2019


#16248: ImplicitParams does not imply FlexibleContexts or FlexibleInstances
-------------------------------------+-------------------------------------
           Reporter:  NeilMitchell   |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Documentation  |           Version:  8.6.3
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Given:

 {{{#!hs
 {-# LANGUAGE ImplicitParams       #-}
 {-# LANGUAGE FlexibleInstances    #-}

 module Test where

 data X a = X
 type XI = X Int

 class Foo a where
   foo :: (?p :: Int) => a -> Int

 instance Foo XI where foo = undefined
 }}}

 This code compiles. However, the documentation at
 https://downloads.haskell.org/~ghc/master/users-guide/glasgow_exts.html
 #language-options says that ImplicitParams implies FlexibleInstances, so
 we should be able to remove the FlexibleInstances extension. However,
 doing so makes it stop compiling.

 My guess is that ImplicitParams doesn't really imply either of the type
 class extensions, and that the documentation is buggy.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16248>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list