Skip to content

Cannot export operator newtype

{-# 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
Trac metadata
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
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information