You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 3, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 3, 2024. It is now read-only.
Haddock doesn't properly handle stripped classes in .hs-boot files #680
moduleM3whereimportM1importM2instanceC1Intwhere
m1 b a =if m2 b then a else0
GHCi happily loads M3:
$ ghci M3.hs
GHCi, version 8.2.1: http://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/hvr/.ghci
[1 of 4] Compiling M2[boot] ( M2.hs-boot, interpreted )
[2 of 4] Compiling M1 ( M1.hs, interpreted )
[3 of 4] Compiling M2 ( M2.hs, interpreted )
[4 of 4] Compiling M3 ( M3.hs, interpreted )
Ok, 4 modules loaded.
However, haddock chokes:
$ haddock M3.hs
Haddock coverage:
0% ( 0 / 2) in 'M1'
Missing documentation for:
Module header
C1 (./M1.hs:5)
0% ( 0 / 3) in 'M2'
Missing documentation for:
Module header
C2 (./M2.hs:3)
C3 (./M2.hs:6)
M3.hs:7:15: error:
• Could not deduce (C2 b) arising from a use of ‘m2’
from the context: C3 b
bound by the type signature for:
m1 :: forall b. C3 b => b -> Int -> Int
at M3.hs:7:3-4
Possible fix:
add (C2 b) to the context of
the type signature for:
m1 :: forall b. C3 b => b -> Int -> Int
• In the expression: m2 b
In the expression: if m2 b then a else 0
In an equation for ‘m1’: m1 b a = if m2 b then a else 0
|
7 | m1 b a = if m2 b then a else 0
| ^^^^
Activity
mpickering commentedon Jul 13, 2023
I think this was just a bug in
--makemode to do with hs-boot files (which has subsequently been fixed).