
#9161: Pattern synonyms interact badly with data kinds -------------------------------------------------+------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: lowest | Milestone: Component: Compiler | Version: Keywords: renamer, pattern synonyms, | 7.8.2 data kinds | Operating System: Architecture: Unknown/Multiple | Linux Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: -------------------------------------------------+------------------------- If we define a pattern `A` and use it as a type: {{{ {-# LANGUAGE PatternSynonyms, DataKinds #-} pattern A = () b :: A b = undefined }}} we get the following error: {{{ Prelude> :load tmp.XDGqzccOAV.hs [1 of 1] Compiling Main ( /tmp/tmp.XDGqzccOAV.hs, interpreted ) /tmp/tmp.XDGqzccOAV.hs:5:9: GHC internal error: ‘A’ is not in scope during type checking, but it passed the renamer tcl_env of environment: [] In the type signature for ‘blah’: blah :: A Failed, modules loaded: none. }}} Also occurs with different arities of `A` (the arity of the pattern and type can differ) and defining it as an operator (enabling the `TypeOperators` pragma). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9161 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler