[GHC] #10337: One-shot module loops have hard to understand messages

#10337: One-shot module loops have hard to understand messages -------------------------------------+------------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 (Type checker) | Operating System: Unknown/Multiple Keywords: | Type of failure: None/Unknown Architecture: | Blocked By: Unknown/Multiple | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Consider these two modules: {{{ -- A.hs module A where -- B.hs module B where import A }}} `ghc --make B.hs` will compile this fine. Now edit `A.hs` to be circular: {{{ -- A.hs module A where import B }}} and attempt to one-shot compile it with `ghc -c A.hs`. You will now get an uninformative error message: {{{ A.hs:1:1: Circular imports: module `A' depends on itself }}} You can get a more informative message with `--make`: {{{ Module imports form a cycle: module `A' (A.hs) imports `B' (./B.hs) which imports `A' (A.hs) }}} We should either suggest users try again with `--make`, or try harder to give a useful message in one-shot mode. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10337 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10337: One-shot module loops have hard to understand messages -------------------------------------+------------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.11 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by osa1): * cc: osa1 (added) Comment: +1 this is very annoying. This happens when working on GHC too. For example, add {{{import StgSyn}}} in {{{TrieMap}}} and you get this completely unhelpful error message. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10337#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10337: One-shot module loops have hard to understand messages -------------------------------------+------------------------------------- Reporter: ezyang | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.11 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by osa1): Actually, I think there's something else going wrong about this in GHC HEAD: {{{ ➜ circular ghc-stage1 --version The Glorious Glasgow Haskell Compilation System, version 8.1.20160108 ➜ circular cat A.hs module A where -- import B ➜ circular cat B.hs module B where import A ➜ circular ghc-stage1 --make B.hs [1 of 2] Compiling A ( A.hs, A.o ) [2 of 2] Compiling B ( B.hs, B.o ) ➜ circular cat A.hs module A where import B ➜ circular ghc-stage1 -c A.hs ➜ circular }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10337#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC