hoogle icon indicating copy to clipboard operation
hoogle copied to clipboard

Type signature displayed in Hoogle is inconsistent with type signature in source

Open tbagrel1 opened this issue 3 years ago • 2 comments
trafficstars

By mistake, I searched for Monad m => m m a -> m a (instead of Monad m => m (m a) -> m a), and still got results:

join :: Monad m => m m a -> m a xlsx-tabular Codec.Xlsx.Util.Tabular.Imports, control-monad-free Control.Monad.Free

But in both packages, join is actually reexported from Control.Monad, and has signature join :: Monad m => m (m a) -> m a

If I search for Monad m => m (m a) -> m a, then I don't see xlsx-tabular Codec.Xlsx.Util.Tabular.Imports and control-monad-free Control.Monad.Free listed, so something wrong might happen when these packages are parsed/indexed.

tbagrel1 avatar Aug 31 '22 08:08 tbagrel1

Also reproduces for me: 2022-08-31-110717_778x171_scrot

googleson78 avatar Aug 31 '22 08:08 googleson78

The problem is that the associated file that Haddock generates at https://hackage.haskell.org/package/xlsx-tabular-0.2.2.1/docs/xlsx-tabular.txt contains:

join :: Monad m => m m a -> m a

That's a bug in Haddock. Probably an old Haddock (the first package is 4 years old). But given bad input in, there's not much hope of Hoogle getting this right.

ndmitchell avatar Aug 31 '22 20:08 ndmitchell