Open kindaro opened 6 months ago
Makes sense. I did not think this stuff would be in a module of its own.
However, Hoogle cannot find these functions by type. I go by the link https://hoogle.haskell.org/?hoogle=Iso%27%20String%20text and there is nothing. Hoogle can find them by name though: the link https://hoogle.haskell.org/?hoogle=packed gives all the right hits from lens
. What am I doing wrong?
I don't think Stackage knows about type aliases
Hoogle is a bit quirky. If you search for :: Iso' String text
(note the double colons), then packed
does appear in the search results, albeit not as the first result. If you refine the search further to :: Iso' String Text
, then it's the first result.
... it's indeed quirky, as the expansion :: Iso String String Text Text
doesn't result in packed
. I.e. you need to know what to search for find anything. Hoogle treats type
s as opaque, and in type-alias heavy library it's not great (even with optics
where full expansion still "makes sense", Hoogle doesn't find anything).
Take a look at this definition:
I thought I shall find it in
lens
. I do not see why it should not be there:lens
already depends ontext
.Reversing
that defines an instance forText
.Yet I could not find anything like this.