Internal error, using pattern synonym as instance head
{-# LANGUAGE PatternSynonyms, DataKinds #-}
pattern A = True
class F a
instance F A
when loaded in ghci it results in an internal error
% g internal.hs
GHCi, version 7.11.20151216: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( internal.hs, interpreted )
internal.hs:5:12: error:
• GHC internal error: ‘A’ is not in scope during type checking, but it passed the renamer
tcl_env of environment: []
• In the first argument of ‘F’, namely ‘A’
In the instance declaration for ‘F A’
Failed, modules loaded: none.
Prelude>