how to find `toStrict :: Text -> Text` using hayoo / hoogle

224 views Asked by At

I was trying to find the toStrict function of type Data.Text.Lazy.Text -> Data.Text.Text, but I didn't know a) what it was called, and b) exactly what the Lazy module name was.

Searching Hayoo for Text -> Text brings up lots of results. Is there a way to search on a signature like *Lazy*Text -> Text?

Searching for Data.Text.Lazy.Text -> Text doesn't produce any results.

How should I go about finding a function of type (lazy) Text -> (strict) Text using hayoo, hoogle or ...?

3

There are 3 answers

0
Jani Hartikainen On

I don't think Hayoo nor Hoogle support that syntax. The best bet would be to search for the relevant module(s) instead, and go through the list of functions it provides.

0
Tom Ellis On

If you type "strict text" into Hayoo the first result is fromStrict and the second result is toStrict.

2
Michael Snoyman On

The search seems to work correctly on FP Haskell Center. Perhaps the Hoogle database you tried previously didn't have the text documentation available.