Closed ttuegel closed 5 years ago
Looking at the Hoogle output file from Haddock, https://hackage.haskell.org/package/containers-0.6.0.1/docs/containers.txt, it lacks :<|
so consequently Hoogle can't ever see it. I reported it upstream at https://github.com/haskell/haddock/issues/946
Seems to be fixed upstream now. And hoogle gives results. Perhaps close ticket?
@flip111 not sure what you mean - I can't see it fixed upstream and don't see results in Hoogle...
https://github.com/haskell/haddock/issues/946 lists https://github.com/haskell/haddock/pull/947 as fix i believe
When i click the link https://hoogle.haskell.org/?hoogle=%3A%3C%7C in comment https://github.com/ndmitchell/hoogle/issues/261#issue-365164093 i see 4 search results
type (:<|) f x = A f x
Uses
opaleye Opaleye.Internal.TypeFamilies
data a :<|> b
Uses
servant Servant.API Servant.API.Alternative
Union of two APIs, first takes precedence in case of overlap. Example:
>>> :{
type MyApi = "books" :> Get '[JSON] [Book] -- GET /books
:<|> "books" :> ReqBody '[JSON] Book :> Post '[JSON] () -- POST /books
:}
(:<|>) :: a -> b -> (:<|>) a b
Uses
servant Servant.API Servant.API.Alternative, servant-js Servant.JS.Internal
data (:<|>) a b
Uses
servant-js Servant.JS.Internal
Union of two APIs, first takes precedence in case of overlap. Example:
>>> :{
type MyApi = "books" :> Get '[JSON] [Book] -- GET /books
:<|> "books" :> ReqBody '[JSON] Book :> Post '[JSON] () -- POST /books
:}
Ah sorry i see what you mean,
Data.Sequence.Seq
is not one of the results. However upstream fix is there, no ?
Yeah, I guess it's just waiting for containers to regenerate their docs, perhaps on a new release. I guess however the fundamental issue is fixed, so it is now a containers problem. Thanks for noticing!
I think that this might still be broken on Hoogle's side.
To reproduce:
Compile a package with these contents:
package.yaml
name: hoogle-test
dependencies:
- base
library:
source-dirs: .
MyModule.hs
{-# LANGUAGE PatternSynonyms #-}
module MyModule
( pattern MyPattern
) where
pattern MyPattern :: () pattern MyPattern = ()
- Observe that the pattern synonym is present in the generated documentation file `hoogle-test.txt`
-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/
@package hoogle-test @version 0.0.0
module MyModule pattern MyPattern :: ()
- Observe that Hoogle can find `MyModule`
$ hoogle MyModule module MyModule
- Observe that Hoogle can not find `MyPattern`
$ hoogle MyPattern No results found
oh, and a .warn
file is generated with this content hoogle-test:9:failed to parse: pattern MyPattern :: ()
Hoogle doesn't seem to find the pattern synonyms bundled with
Data.Sequence.Seq
: https://hoogle.haskell.org/?hoogle=%3A%3C%7C