Admin message

Due to a large amount of spam we do not allow new users to create repositories, they are "external" users. If you are a new user and want to create a repository, for example for forking GHC, open a new issue on ghc/ghc using the "get-verified" issue template

Template haskell rejects duplicate instances before they're spliced
Suppose I want to see (from within ghci) how to write an instance declaration in the TH AST. I try: ``` Prelude> runQ $ [d| instance Monad Maybe where |] <interactive>:1:13: Duplicate instance declarations: instance Monad Maybe -- Defined at <interactive>:1:13-23 instance Monad Maybe -- Defined in Data.Maybe In the Template Haskell quotation [d| instance Monad Maybe where |] In the expression: [d| instance Monad Maybe where |] In the definition of `it': it = [d| instance Monad Maybe where |] ``` This seems ridiculous; I'm not trying to create an instance, just to create a TH AST fragment. <details><summary>Trac metadata</summary> | Trac field | Value | | ---------------------- | ---------------- | | Version | 6.12.1 | | Type | Bug | | TypeOfFailure | OtherFailure | | Priority | normal | | Resolution | Unresolved | | Component | Template Haskell | | Test case | | | Differential revisions | | | BlockedBy | | | Related | | | Blocking | | | CC | | | Operating system | | | Architecture | | </details> <!-- {"blocked_by":[],"summary":"Template haskell rejects duplicate instances before they're spliced","status":"New","operating_system":"","component":"Template Haskell","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.12.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Suppose I want to see (from within ghci) how to write an instance declaration in the TH AST. I try:\r\n\r\n{{{\r\nPrelude> runQ $ [d| instance Monad Maybe where |] \r\n \r\n<interactive>:1:13: \r\n Duplicate instance declarations: \r\n instance Monad Maybe -- Defined at <interactive>:1:13-23 \r\n instance Monad Maybe -- Defined in Data.Maybe \r\n In the Template Haskell quotation \r\n [d| \r\n instance Monad Maybe where |] \r\n In the expression: \r\n [d| \r\n instance Monad Maybe where |] \r\n In the definition of `it': \r\n it = [d| \r\n instance Monad Maybe where |]\r\n}}}\r\n\r\nThis seems ridiculous; I'm not trying to create an instance, just to create a TH AST fragment.","type_of_failure":"OtherFailure","blocking":[]} -->
issue