[GHC] #11432: Cannot export operator newtype

GHC ghc-devs at haskell.org
Fri Jan 15 11:07:25 UTC 2016


#11432: Cannot export operator newtype
-------------------------------------+-------------------------------------
           Reporter:  phadej         |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1-rc1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 {{{#!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
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11432>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list