GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T18:30:26Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/11432Cannot export operator newtype2019-07-07T18:30:26ZOleg GrenrusCannot export operator newtype```hs
{-# LANGUAGE TypeOperators #-}
module Main (main, (-.->)(..)) where
main :: IO ()
main = return ()
newtype (f -.-> g) a = Fn { apFn :: f a -> g a }
```
Fails to compile with
```
[1 of 1] Compiling Main ( fn.hs, inte...```hs
{-# LANGUAGE TypeOperators #-}
module Main (main, (-.->)(..)) where
main :: IO ()
main = return ()
newtype (f -.-> g) a = Fn { apFn :: f a -> g a }
```
Fails to compile with
```
[1 of 1] Compiling Main ( fn.hs, interpreted )
fn.hs:2:20: error: Not in scope: ‘-.->’
fn.hs:2:20: error:
The export item ‘(-.->)(..)’
attempts to export constructors or class methods that are not visible here
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.0.1-rc1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Cannot export operator newtype","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.0.1-rc1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{#!hs\r\n{-# LANGUAGE TypeOperators #-}\r\nmodule Main (main, (-.->)(..)) where\r\n\r\nmain :: IO ()\r\nmain = return ()\r\n\r\nnewtype (f -.-> g) a = Fn { apFn :: f a -> g a }\r\n}}}\r\n\r\nFails to compile with\r\n\r\n{{{\r\n[1 of 1] Compiling Main ( fn.hs, interpreted )\r\n\r\nfn.hs:2:20: error: Not in scope: ‘-.->’\r\n\r\nfn.hs:2:20: error:\r\n The export item ‘(-.->)(..)’\r\n attempts to export constructors or class methods that are not visible here\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->8.0.1skvadrikskvadrik