[GHC] #9225: Missing syntax error for package qualified import with version number

#9225: Missing syntax error for package qualified import with version number -------------------------+------------------------------------------------- Reporter: | Owner: ezyang ezyang | Status: new Type: bug | Milestone: Priority: | Version: 7.8.2 normal | Operating System: Unknown/Multiple Component: | Type of failure: Incorrect warning at Compiler (Parser) | compile-time Keywords: | Test Case: Architecture: | Blocking: Unknown/Multiple | Difficulty: | Unknown | Blocked By: | Related Tickets: | -------------------------+------------------------------------------------- Consider the following test file: {{{ {-# LANGUAGE PackageImports #-} module Foo where import "containers-0.5.0.0" Data.Map }}} where we have {{{ ezyang@sabre:~$ ghc-pkg list | grep containers containers-0.5.0.0 unordered-containers-0.2.3.0 }}} GHC will fail to compile this, but in an unusual way: {{{ ezyang@sabre:~$ ghc test.hs [1 of 1] Compiling Foo ( test.hs, test.o ) test.hs:3:1: Failed to load interface for `Data.Map' It is not a module in the current program, or in any known package. }}} That's misleading: the real reason the import failed is because this is a package qualified import (not package ID qualified imports). For my purposes, it would be useful to also support package ID imports, but in the meantime, it would be a good idea to run Cabal's syntax check on the package name, which requires every hyphenated component to contain an alphabetic character. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9225 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9225: Missing syntax error for package qualified import with version number -------------------------------------+------------------------------------- Reporter: ezyang | Owner: ezyang Type: bug | Status: patch Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.8.2 (Parser) | Keywords: Resolution: | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: Incorrect | Test Case: warning at compile-time | Blocking: Blocked By: | Differential Revisions: Phab:D755 Related Tickets: | -------------------------------------+------------------------------------- Changes (by thomie): * status: new => patch * differential: => Phab:D755 * milestone: => 7.12.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9225#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9225: Missing syntax error for package qualified import with version number
-------------------------------------+-------------------------------------
Reporter: ezyang | Owner: ezyang
Type: bug | Status: patch
Priority: normal | Milestone: 7.12.1
Component: Compiler | Version: 7.8.2
(Parser) | Keywords:
Resolution: | Architecture:
Operating System: Unknown/Multiple | Unknown/Multiple
Type of failure: Incorrect | Test Case:
warning at compile-time | Blocking:
Blocked By: | Differential Revisions: Phab:D755
Related Tickets: |
-------------------------------------+-------------------------------------
Comment (by Thomas Miedema

#9225: Missing syntax error for package qualified import with version number -------------------------------------+------------------------------------- Reporter: ezyang | Owner: ezyang Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.8.2 (Parser) | Keywords: Resolution: fixed | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: Incorrect | Test Case: warning at compile-time | parser/should_fail/T9225 Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D755 -------------------------------------+------------------------------------- Changes (by thomie): * status: patch => closed * testcase: => parser/should_fail/T9225 * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9225#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9225: Missing syntax error for package qualified import with version number -------------------------------------+------------------------------------- Reporter: ezyang | Owner: ezyang Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.8.2 (Parser) | Keywords: Resolution: fixed | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: Incorrect | Test Case: warning at compile-time | parser/should_fail/T9225 Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D755 -------------------------------------+------------------------------------- Changes (by asr): * cc: asr (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9225#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9225: Missing syntax error for package qualified import with version number -------------------------------------+------------------------------------- Reporter: ezyang | Owner: ezyang Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.8.2 (Parser) | Keywords: Resolution: fixed | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: Incorrect | Test Case: warning at compile-time | parser/should_fail/T9225 Blocked By: | Blocking: Related Tickets: 8057 | Differential Revisions: Phab:D755 -------------------------------------+------------------------------------- Changes (by Lemming): * related: => 8057 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9225#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9225: Missing syntax error for package qualified import with version number -------------------------------------+------------------------------------- Reporter: ezyang | Owner: ezyang Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.8.2 (Parser) | Keywords: Resolution: fixed | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: Incorrect | Test Case: warning at compile-time | parser/should_fail/T9225 Blocked By: | Blocking: Related Tickets: #8057 | Differential Revisions: Phab:D755 -------------------------------------+------------------------------------- Changes (by Lemming): * related: 8057 => #8057 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9225#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC