
#8011: -ddump-minimal-imports creates incorrect imports for associated types -----------------------------+---------------------------------------------- Reporter: dsf | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.6.3 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- If you have a module URL.hs: {{{ {-# LANGUAGE TypeFamilies #-} module URL (ToURL(toURL, nullURL, errorURL), URLT) where class ToURL a where type URLT a toURL :: a -> URLT a nullURL :: a errorURL :: a -> URLT a }}} And a module that uses it Tmp.hs: {{{ {-# LANGUAGE FlexibleContexts #-} module Tmp ( clean ) where import Data.Char (isAlphaNum) import Data.List (dropWhile) import URL clean :: (ToURL url, Show (URLT url)) => url -> String clean = filter isAlphaNum . show . toURL }}} when you run {{{ghc -ddump-minimal-imports Tmp.hs}}} the resulting {{{Tmp.imports}}} will contain the line {{{ import URL ( ToURL(URLT, toURL) ) }}} but it should contain {{{ import URL ( ToURL(toURL), URLT ) }}} This affects both associated type and associated type synonym declarations. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/8011 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler