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

Can't Quote Instance Associated Types in Template Haskell
Give this a whirl: ``` {-# LANGUAGE TypeFamilies,TemplateHaskell #-} module Bug where class C a where type T a $([d| instance C (Maybe a) where type T (Maybe a) = Char |]) ``` ``` $ ghc -c Bug.hs Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package ffi-1.0 ... linking ... done. Loading package array-0.3.0.0 ... linking ... done. Loading package containers-0.3.0.0 ... linking ... done. Loading package pretty-1.0.1.1 ... linking ... done. Loading package template-haskell ... linking ... done. Bug.hs:7:6: Type indexes must match class instance head Found `Maybe a[aMy]' but expected `Maybe a[aMx]' In the associated type instance for `T' In the instance declaration for `C (Maybe a[aMx])' [glastonbury:~/Projects/Haskell/Truth/Core]$ ``` <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":"Can't Quote Instance Associated Types in Template Haskell","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":"Give this a whirl:\r\n{{{\r\n{-# LANGUAGE TypeFamilies,TemplateHaskell #-}\r\nmodule Bug where\r\n\r\n class C a where\r\n type T a\r\n\r\n $([d| \r\n instance C (Maybe a) where\r\n type T (Maybe a) = Char\r\n |])\r\n}}}\r\n\r\n{{{\r\n$ ghc -c Bug.hs \r\nLoading package ghc-prim ... linking ... done.\r\nLoading package integer-gmp ... linking ... done.\r\nLoading package base ... linking ... done.\r\nLoading package ffi-1.0 ... linking ... done.\r\nLoading package array-0.3.0.0 ... linking ... done.\r\nLoading package containers-0.3.0.0 ... linking ... done.\r\nLoading package pretty-1.0.1.1 ... linking ... done.\r\nLoading package template-haskell ... linking ... done.\r\n\r\nBug.hs:7:6:\r\n Type indexes must match class instance head\r\n Found `Maybe a[aMy]' but expected `Maybe a[aMx]'\r\n In the associated type instance for `T'\r\n In the instance declaration for `C (Maybe a[aMx])'\r\n[glastonbury:~/Projects/Haskell/Truth/Core]$ \r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->
issue