summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-06-20 14:43:57 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-06-28 19:02:41 -0400
commit251471e7706ea3029b4a0c086035c16e7b67a081 (patch)
tree2a561e2a2efa544b7535c12ed71b62c536ba3fa1 /libraries
parenteecab8f9847ebf576fbe2f6a2b9564c25a0230e0 (diff)
downloadhaskell-251471e7706ea3029b4a0c086035c16e7b67a081.tar.gz
Cleanup BuiltInSyntax vs UserSyntax
There was some confusion about whether FUN/TYPE/One/Many should be BuiltInSyntax or UserSyntax. The answer is certainly UserSyntax as BuiltInSyntax is for things which are directly constructed by the parser rather than going through normal renaming channels. I fixed all the obviously wrong places I could find and added a test for the original bug which was caused by this (#21752) Fixes #21752 #20695 #18302
Diffstat (limited to 'libraries')
-rw-r--r--libraries/base/Data/Typeable/Internal.hs2
-rw-r--r--libraries/base/GHC/Exception.hs1
-rwxr-xr-xlibraries/base/GHC/Exts.hs4
-rw-r--r--libraries/base/Unsafe/Coerce.hs2
4 files changed, 0 insertions, 9 deletions
diff --git a/libraries/base/Data/Typeable/Internal.hs b/libraries/base/Data/Typeable/Internal.hs
index 2d2f735351..69530c911d 100644
--- a/libraries/base/Data/Typeable/Internal.hs
+++ b/libraries/base/Data/Typeable/Internal.hs
@@ -86,10 +86,8 @@ module Data.Typeable.Internal (
trLiftedRep
) where
-import GHC.Prim ( FUN )
import GHC.Base
import qualified GHC.Arr as A
-import GHC.Types ( TYPE, Multiplicity (Many) )
import Data.Type.Equality
import GHC.List ( splitAt, foldl', elem )
import GHC.Word
diff --git a/libraries/base/GHC/Exception.hs b/libraries/base/GHC/Exception.hs
index 1a3b039416..66982b0043 100644
--- a/libraries/base/GHC/Exception.hs
+++ b/libraries/base/GHC/Exception.hs
@@ -38,7 +38,6 @@ import GHC.Base
import GHC.Show
import GHC.Stack.Types
import GHC.OldList
-import GHC.Prim
import GHC.IO.Unsafe
import {-# SOURCE #-} GHC.Stack.CCS
import GHC.Exception.Type
diff --git a/libraries/base/GHC/Exts.hs b/libraries/base/GHC/Exts.hs
index 662bea8964..f5b2498542 100755
--- a/libraries/base/GHC/Exts.hs
+++ b/libraries/base/GHC/Exts.hs
@@ -25,10 +25,6 @@
module GHC.Exts
(
- -- * Primitive types
-
- FUN, TYPE, -- See https://gitlab.haskell.org/ghc/ghc/issues/18302
-
-- ** Pointer types
Ptr(..), FunPtr(..),
diff --git a/libraries/base/Unsafe/Coerce.hs b/libraries/base/Unsafe/Coerce.hs
index fd45217fef..76c010a0bf 100644
--- a/libraries/base/Unsafe/Coerce.hs
+++ b/libraries/base/Unsafe/Coerce.hs
@@ -22,8 +22,6 @@ module Unsafe.Coerce
import GHC.Arr (amap) -- For amap/unsafeCoerce rule
import GHC.Base
-import GHC.Types
-
{- Note [Implementing unsafeCoerce]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The implementation of unsafeCoerce is surprisingly subtle.