[GHC] #10862: No way to exclude current directory from search path

#10862: No way to exclude current directory from search path -------------------------------------+------------------------------------- Reporter: literon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- Having Main.hs in the current directory, executing ghc --make Main -i still compiles the module, even though -i should in theory "reset the search path back to nothing". But it seems nothing ~ the default (current dir). I would propose to either change the behavior, or add a new flag, in order to be able to better control the build environment. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10862 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10862: No way to exclude current directory from search path -------------------------------------+------------------------------------- Reporter: literon | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Driver | Version: 7.8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * component: Compiler => Driver Comment: `-i` does reset the searchpath. {{{ $ ghci -i GHCi, version 7.10.2: http://www.haskell.org/ghc/ :? for help Prelude> :show paths current working directory: /tmp/test module import search paths: none }}} But the searchpath isn't consulted for filenames you give as arguments on the command line. So if you have the following setup: A.hs: {{{ module A where import B }}} B.hs: {{{ module B where }}} * `ghc A.hs` will work, because the default searchpath is ".", so B.hs can be found. * `ghc -i A.hs B.hs` will work, because B.hs is given on the command line. * `ghc -i A.hs` will fail with `Could not find module ‘B’`. That seems to work as expected. But you are giving a module name on the command line. Is that relevant? Do you think something different should happen when you say `ghc -i Main` vs `ghc -i Main.hs`? I'm trying to figure out what the bug is. Please help. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10862#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10862: No way to exclude current directory from search path -------------------------------------+------------------------------------- Reporter: literon | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Driver | Version: 7.8.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * status: new => infoneeded Comment: literon: I'm waiting for your response. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10862#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10862: No way to exclude current directory from search path -------------------------------------+------------------------------------- Reporter: literon | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Driver | Version: 7.8.3 Resolution: worksforme | 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 thomie): * status: infoneeded => closed * resolution: => worksforme Comment: No response from submitter. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10862#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC