[GHC] #16068: Unsaturated type synonyms as arguments work in 8.6.3 but not HEAD

#16068: Unsaturated type synonyms as arguments work in 8.6.3 but not HEAD -------------------------------------+------------------------------------- Reporter: | Owner: (none) quasicomputational | Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.7 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Input, derived from code seen in the wild in hpack 0.31.1: {{{ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleContexts #-} module Main where type WithCommonOptions cSources cxxSources jsSources a = a data Traverse m cSources cSources_ cxxSources cxxSources_ jsSources jsSources_ = Traverse { traverseCSources :: cSources -> m cSources_ , traverseCxxSources :: cxxSources -> m cxxSources_ , traverseJsSources :: jsSources -> m jsSources_ } type Traversal_ t = forall m cSources cSources_ cxxSources cxxSources_ jsSources jsSources_ a. Monad m => Traverse m cSources cSources_ cxxSources cxxSources_ jsSources jsSources_ -> t cSources cxxSources jsSources a -> m (t cSources_ cxxSources_ jsSources_ a) traverseWithCommonOptions :: Traversal_ WithCommonOptions traverseWithCommonOptions = undefined main = return () }}} Using a GHC compiled from revision 074eae255793de6a94e8172015e7022c80a5cd15, I get this error: {{{ Main.hs:19:30: error: • The type synonym ‘WithCommonOptions’ should have 4 arguments, but has been given none • In the type signature: traverseWithCommonOptions :: Traversal_ WithCommonOptions | 19 | traverseWithCommonOptions :: Traversal_ WithCommonOptions | }}} GHC 8.6.3 accepts the module without complaint. I'm actually surprised that the previous code worked and I wouldn't complain if this is closed as working as intended. However, there's no mention of this change in the migration guide for 8.8 yet, so I'm not certain it's intentional. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16068 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16068: Unsaturated type synonyms as arguments work in 8.6.3 but not HEAD -------------------------------------+------------------------------------- Reporter: | Owner: (none) quasicomputational | Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.7 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 simonpj): Yes -- you should really need `LiberalTypeSynonyms` to accept this; and it's a bug in 8.6 that it doesn't check for that. Perhaps it'd be worth adding to the 8.8 migration guide (Ben)? There are a number of other tickets on `LiberalTypeSynonyms` that Ryan is working on: eg #16059, #16013 I think. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16068#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16068: Unsaturated type synonyms as arguments work in 8.6.3 but not HEAD -------------------------------------+------------------------------------- Reporter: | Owner: (none) quasicomputational | Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.7 Resolution: invalid | 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 quasicomputational): * status: new => closed * resolution: => invalid Comment: OK, thanks - I'd suspected as much. I'll add a note to the migration guide myself, since it seems straightforward enough. It looks like #15954 is the ticket that led to the change directly, for posterity. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16068#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC