So I have a very basic haskell file that looks like this :
main = thing
thing = print "hi"
When I run the ghc-mod command to get info on the main function like this : 'ghc-mod info file.hs main', I get the proper result :
main :: IO () -- Defined at file.hs:1:1
But then if I try 'ghc-mod info file.hs thing', it doesn't output anything at all, not even a blank line or error. I have version 5.2.0.0 of ghc-mod, and version 7.8.3 of GHC. How can I get ghc-mod info to work?
Apparently, ghc-mod
needs you to put a module Something where
at the beginning of your source file in order to work correctly.