We've already covered this once in using the REPL, but here's another quick way of asking for a type that's useful when you're using the text editor + ghcid setup.
If you don't know the type of some expression, leave an underscore (this is called a "hole") and the display in ghcid will tell you what type goes there.
loadConfig :: _
loadConfig = Data.Ini.readIniFile "config.ini"
• Found type wildcard ‘_’
standing for ‘IO (Either String Data.Ini.Ini)’
It's pretty magical that you can just type :: _ after an expression to make the type pop up in ghcid.
We've already covered this once in using the REPL, but here's another quick way of asking for a type that's useful when you're using the text editor + ghcid setup.
If you don't know the type of some expression, leave an underscore (this is called a "hole") and the display in ghcid will tell you what type goes there.
It's pretty magical that you can just type
:: _after an expression to make the type pop up in ghcid.