Re-exporting GHC.Prim doesn't re-export FunTyCon or TYPE
GHC.Prim wholesale (with
module GHC.Prim), everything is properly re-exported, except
It shows up in
GHC.Exts which re-exports
GHC.Prim, like this. But as the reproducer below shows, it's not bound to
GHC.Exts also manually re-exports
TYPE, and since
(->) is special syntax anyway, it doesn't cause much of a problem for
GHC.Exts not to export
There is an impact in linear types, where
FunTyCon has been renamed
FUN and is no longer syntax. I just need to re-export it manually, but, still, it probably should be considered a bug.
Steps to reproduce
$ ghci > prim.browse Prelude> import GHC.Prim Prelude GHC.Prim> :browse GHC.Prim Prelude GHC.Prim> $ cat Ex.hs module Ex ( module GHC.Prim ) where import GHC.Prim $ ghci > ex.browse Prelude> :load Ex.hs *Ex> import GHC.Prim *Ex GHC.Prim> :browse Ex *Ex GHC.Prim> $ diff prim.browse ex.browse
1a2,3 > [1 of 1] Compiling Ex ( Ex.hs, interpreted ) > Ok, one module loaded. 9d10 < data (->) (a :: TYPE q) (b :: TYPE r) 96,97d96 < type role TYPE nominal < data TYPE (a :: GHC.Types.RuntimeRep)
The diff above should be reduced to
1a2,3 > [1 of 1] Compiling Ex ( Ex.hs, interpreted ) > Ok, one module loaded.
- GHC version used: The reproducer above has been made with 8.8.3, but I can also reproduce on my checkout of the linear types patch, which is based on a master from last week.