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

Allow free variables in reifyInstances
When I say ``` {-# LANGUAGE TemplateHaskell #-} module Bug where import Language.Haskell.TH $( do insts <- reifyInstances ''Eq [ListT `AppT` VarT (mkName "a")] runIO $ putStrLn $ pprint insts return [] ) ``` I get ``` Bug.hs:7:4: Not in scope: type variable ‘a’ In the argument of reifyInstances: GHC.Classes.Eq [a] ``` But, I wanted the declaration for `instance Eq a => Eq [a]`. The error message isn't wrong, exactly -- `a` really isn't in scope -- but I think we can do better by just treating variables as fresh. <details><summary>Trac metadata</summary> | Trac field | Value | | ---------------------- | ---------------- | | Version | 7.8.2 | | Type | FeatureRequest | | TypeOfFailure | OtherFailure | | Priority | normal | | Resolution | Unresolved | | Component | Template Haskell | | Test case | | | Differential revisions | | | BlockedBy | | | Related | | | Blocking | | | CC | | | Operating system | | | Architecture | | </details> <!-- {"blocked_by":[],"summary":"Allow free variables in reifyInstances","status":"New","operating_system":"","component":"Template Haskell","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"OwnedBy","contents":"goldfire"},"version":"7.8.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"When I say\r\n\r\n{{{\r\n{-# LANGUAGE TemplateHaskell #-}\r\n\r\nmodule Bug where\r\n\r\nimport Language.Haskell.TH\r\n\r\n$( do insts <- reifyInstances ''Eq [ListT `AppT` VarT (mkName \"a\")]\r\n runIO $ putStrLn $ pprint insts\r\n return [] )\r\n}}}\r\n\r\nI get\r\n\r\n{{{\r\nBug.hs:7:4:\r\n Not in scope: type variable ‘a’\r\n In the argument of reifyInstances: GHC.Classes.Eq [a]\r\n}}}\r\n\r\nBut, I wanted the declaration for `instance Eq a => Eq [a]`. The error message isn't wrong, exactly -- `a` really isn't in scope -- but I think we can do better by just treating variables as fresh.","type_of_failure":"OtherFailure","blocking":[]} -->
issue