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

Cannot put (.) or (!) type operators into an export list
Thanks to recent work in GHC HEAD, it is now possible to define type operators named `(.)` and `(!)`: ```hs type (f . g) x = f (g x) type x ! f = f x ``` However, I was surprised to discover that it's not possible to put them in an export list! That is to say, this program doesn't parse: ``` {-# LANGUAGE TypeOperators #-} module Bug (type (.), type (!)) where type (f . g) x = f (g x) type x ! f = f x ``` ``` $ ~/Software/ghc4/inplace/bin/ghc-stage2 --interactive Bug.hs GHCi, version 8.7.20190219: https://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/rgscott/.ghci Bug.hs:2:19: error: parse error on input ‘.’ | 2 | module Bug (type (.), type (!)) where | ^ ``` This problem appears to be specific to the `(.)` and `(!)` type operators, since any other type operator will work in its place: ```hs {-# LANGUAGE TypeOperators #-} module Works (type (&)) where type (f & g) x = f (g x) ``` <details><summary>Trac metadata</summary> | Trac field | Value | | ---------------------- | ----------------- | | Version | 8.7 | | Type | Bug | | TypeOfFailure | OtherFailure | | Priority | normal | | Resolution | Unresolved | | Component | Compiler (Parser) | | Test case | | | Differential revisions | | | BlockedBy | | | Related | | | Blocking | | | CC | int-index | | Operating system | | | Architecture | | </details> <!-- {"blocked_by":[],"summary":"Cannot put (.) or (!) into an export list","status":"New","operating_system":"","component":"Compiler (Parser)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.7","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["int-index"],"type":"Bug","description":"Thanks to recent work in GHC HEAD, it is now possible to define type operators named `(.)` and `(!)`:\r\n\r\n{{{#!hs\r\ntype (f . g) x = f (g x)\r\ntype x ! f = f x\r\n}}}\r\n\r\nHowever, I was surprised to discover that it's not possible to put them in an export list! That is to say, this program doesn't parse:\r\n\r\n{{{\r\n{-# LANGUAGE TypeOperators #-}\r\nmodule Bug (type (.), type (!)) where\r\n\r\ntype (f . g) x = f (g x)\r\ntype x ! f = f x\r\n}}}\r\n{{{\r\n$ ~/Software/ghc4/inplace/bin/ghc-stage2 --interactive Bug.hs\r\nGHCi, version 8.7.20190219: https://www.haskell.org/ghc/ :? for help\r\nLoaded GHCi configuration from /home/rgscott/.ghci\r\n\r\nBug.hs:2:19: error: parse error on input ‘.’\r\n |\r\n2 | module Bug (type (.), type (!)) where\r\n | ^\r\n}}}\r\n\r\nThis problem appears to be specific to the `(.)` and `(!)` type operators, since any other type operator will work in its place:\r\n\r\n{{{#!hs\r\n{-# LANGUAGE TypeOperators #-}\r\nmodule Works (type (&)) where\r\n\r\ntype (f & g) x = f (g x)\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->
issue