hs-boot files permit default methods in type class (but don't typecheck them)
The documentation claims you are not allowed to do so but the compiler does not reject it.
ezyang@sabre:~$ cat A.hs-boot
module A where
class C a where
f :: a -> a
f x = x
ezyang@sabre:~$ ghc-head -c A.hs-boot -fforce-recomp
ezyang@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)
Trac metadata
Trac field | Value |
---|---|
Version | 8.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Type checker) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |