Question

Using Hlint via the command prompt works for me, but I have problem trying to perform the GHCi integration.

http://community.haskell.org/~ndm/darcs/hlint/hlint.htm says that "the script is at hlint.ghci [link], and a copy is installed locally in the data directory. To use, add the contents to your GHCi startup file.".

C:\Users\X\AppData\Roaming\cabal\hlint-1.8.23 contains this hlint.ghci file.

Now I want to find the GHCi startup file. I am using Windows 7 and according to http://www.haskell.org/ghc/docs/latest/html/users_guide/ghci-dot-files.html the ghci.conf file should be in a folder like .../appdata/ghc. But my ghc folder (C:\Users\X\AppData\Roaming\ghc) only contains a ghci_history file.

So I copied the hlint.ghci file to my ghc folder and renamed it to ghci.conf. Starting now WinGHCi it crashes, if I start GHCi it says:

interactive>:10:91: lexical error in string/character literal at character '\n'

interactive>:4:105: lexical error in string/character literal at character '\n'

What am I doing wrong? Has the problem something to do with the missing GHCi startup file?

Was it helpful?

Solution

The problem was a bug with the hlint.ghci file shipped with HLint version 1.8.23 and below. HLint 1.8.24 is now available which fixes the problem, or use the online copy of hlint.ghci with an older version of HLint.

This bug was tracked by http://code.google.com/p/ndmitchell/issues/detail?id=531 and I originally said I "will probably fix it later today".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top