Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

ghc-mod takes a very long time checking a module with a module annotation #936

Open
expipiplus1 opened this issue May 13, 2018 · 2 comments

Comments

@expipiplus1
Copy link
Contributor

expipiplus1 commented May 13, 2018

It's not too bad on the below testcase, but in a larger file (90 lines) ghc-mod takes longer than my patience to terminate.

$ ghc-mod --version
ghc-mod version 5.9.0.0 compiled by GHC 8.2.2

ghc-mod revision: f638c0f925459f13cc94644109fb971aaf297947

Testcase

ok.hs

main :: IO ()
main = pure ()

bad.hs

{-# ANN module "" #-}
main :: IO ()
main = pure ()
$ time ghc-mod check ok.hs --verbose 7
info: Found no other project type, falling back to plain GHC project
VOMIT: Using the following mapped files:
VOMIT: Initializing GHC session with following options: "-i/home/j/bugs" "-i/home/j/bugs" "-global-package-db" "-user-package-db" "-Wall" "-O0" "-fno-warn-missing-home-modules"
DEBUG: initSession: Session not initialized, creating new one
VOMIT: Using the following targets: "/home/j/bugs/ok.hs"
DEBUG: loadTargets: Loading: ok.hs
DEBUG: loadTargets: filterModSums: False
DEBUG: loadTargets: Loading done
 check ok.hs --verbose 7  0.09s user 0.01s system 100% cpu 0.106 total
$ time ghc-mod check bad.hs --verbose 7
info: Found no other project type, falling back to plain GHC project
VOMIT: Using the following mapped files:
VOMIT: Initializing GHC session with following options: "-i/home/j/bugs" "-i/home/j/bugs" "-global-package-db" "-user-package-db" "-Wall" "-O0" "-fno-warn-missing-home-modules"
DEBUG: initSession: Session not initialized, creating new one
VOMIT: Using the following targets: "/home/j/bugs/bad.hs"
DEBUG: loadTargets: Loading: bad.hs
DEBUG: loadTargets: filterModSums: False
 check bad.hs --verbose 7  3.68s user 0.04s system 99% cpu 3.722 total
@DanielG
Copy link
Owner

DanielG commented May 31, 2018

Can you link me to some documentation for this annotation, I'm not familiar with it at all.

@expipiplus1
Copy link
Contributor Author

expipiplus1 commented Jun 1, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants