How can I use the hoogle command line flags when using hoogle inside ghci?
This obviously doesn't work:
ghci> :hoogle --count=5 Char -> Int
Could not read as type Int, "5 Char -> Int"
How can I use the hoogle command line flags when using hoogle inside ghci?
This obviously doesn't work:
ghci> :hoogle --count=5 Char -> Int
Could not read as type Int, "5 Char -> Int"
Copyright © 2021 Jogjafile Inc.
You need to change your ghci.conf in order to do this. Assuming you did the steps described on haskell.org, your ghci.conf contains a line like
However, that line says that
:hoogle x
will be translated tohoogle "x"
, which obviously won't work if you want to apply additional flags, such as--count=5
.You either need to remove the quotes around the argument, e.g.
and use
:hoogleP --count=5 "Char -> Int"
or split the argument by hand into count and search query:The last version can be used as
:hoogleC 5 Char -> Int
.