[GHC] #13069: hs-boot files permit default methods in type class

GHC ghc-devs at haskell.org
Thu Jan 5 10:12:00 UTC 2017


#13069: hs-boot files permit default methods in type class
-------------------------------------+-------------------------------------
           Reporter:  ezyang         |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.1
  (Type checker)                     |
           Keywords:  backpack hs-   |  Operating System:  Unknown/Multiple
  boot                               |
       Architecture:                 |   Type of failure:  GHC accepts
  Unknown/Multiple                   |  invalid program
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 The documentation claims you are not allowed to do so but the compiler
 does not reject it.

 {{{
 ezyang at sabre:~$ cat A.hs-boot
 module A where
 class C a where
     f :: a -> a
     f x = x
 ezyang at sabre:~$ ghc-head -c A.hs-boot -fforce-recomp
 ezyang at sabre:~$ ghc-head --version
 The Glorious Glasgow Haskell Compilation System, version 8.1.20161218
 }}}

 The same problem applies to hsig files (which combust more spectacularly)

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


More information about the ghc-tickets mailing list