diff options
author | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2020-10-18 15:24:31 +0300 |
---|---|---|
committer | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2022-03-15 18:34:38 +0300 |
commit | ab618309069bb47645f33cd1b198ace46e27abb9 (patch) | |
tree | 0a388d085a19b16da85dc91cc958578c9a033399 /libraries | |
parent | 8ff32124c8cd37050f3dc7cbb32b8d41711ebcaf (diff) | |
download | haskell-ab618309069bb47645f33cd1b198ace46e27abb9.tar.gz |
Export (~) from Data.Type.Equality (#18862)wip/eqtycon-rn
* Users can define their own (~) type operator
* Haddock can display documentation for the built-in (~)
* New transitional warnings implemented:
-Wtype-equality-out-of-scope
-Wtype-equality-requires-operators
Updates the haddock submodule.
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/base/Data/String.hs | 1 | ||||
-rw-r--r-- | libraries/base/Data/Type/Equality.hs | 4 | ||||
-rw-r--r-- | libraries/base/Data/Type/Ord.hs | 1 | ||||
-rw-r--r-- | libraries/base/Prelude.hs | 3 | ||||
-rw-r--r-- | libraries/base/Text/Printf.hs | 2 | ||||
-rw-r--r-- | libraries/ghc-heap/GHC/Exts/Heap.hs | 2 | ||||
-rw-r--r-- | libraries/ghc-prim/GHC/Types.hs | 3 | ||||
-rw-r--r-- | libraries/template-haskell/Language/Haskell/TH/Syntax.hs | 2 |
8 files changed, 12 insertions, 6 deletions
diff --git a/libraries/base/Data/String.hs b/libraries/base/Data/String.hs index 02a720f8e9..bd5d3d0edd 100644 --- a/libraries/base/Data/String.hs +++ b/libraries/base/Data/String.hs @@ -5,6 +5,7 @@ {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE TypeOperators #-} ----------------------------------------------------------------------------- -- | diff --git a/libraries/base/Data/Type/Equality.hs b/libraries/base/Data/Type/Equality.hs index 56cdce77f0..3b11add5f0 100644 --- a/libraries/base/Data/Type/Equality.hs +++ b/libraries/base/Data/Type/Equality.hs @@ -31,7 +31,9 @@ module Data.Type.Equality ( -- * The equality types - (:~:)(..), type (~~), + type (~), + type (~~), + (:~:)(..), (:~~:)(..), -- * Working with equality diff --git a/libraries/base/Data/Type/Ord.hs b/libraries/base/Data/Type/Ord.hs index 7e9ef24c84..4faf106741 100644 --- a/libraries/base/Data/Type/Ord.hs +++ b/libraries/base/Data/Type/Ord.hs @@ -38,6 +38,7 @@ import GHC.Show(Show(..)) import GHC.TypeError import GHC.TypeLits.Internal import GHC.TypeNats.Internal +import GHC.Types (type (~)) import Data.Bool import Data.Char(Char) import Data.Eq diff --git a/libraries/base/Prelude.hs b/libraries/base/Prelude.hs index 66ea603e72..2e21888abc 100644 --- a/libraries/base/Prelude.hs +++ b/libraries/base/Prelude.hs @@ -1,5 +1,6 @@ {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE ExplicitNamespaces #-} ----------------------------------------------------------------------------- -- | @@ -159,6 +160,8 @@ module Prelude ( -- ** Exception handling in the I\/O monad IOError, ioError, userError, + -- ** The equality types + type (~) ) where import Control.Monad diff --git a/libraries/base/Text/Printf.hs b/libraries/base/Text/Printf.hs index 4fa9fd7720..397f916265 100644 --- a/libraries/base/Text/Printf.hs +++ b/libraries/base/Text/Printf.hs @@ -1,5 +1,5 @@ {-# LANGUAGE Safe #-} -{-# LANGUAGE GADTs #-} +{-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} ----------------------------------------------------------------------------- diff --git a/libraries/ghc-heap/GHC/Exts/Heap.hs b/libraries/ghc-heap/GHC/Exts/Heap.hs index a587739813..618419ee1f 100644 --- a/libraries/ghc-heap/GHC/Exts/Heap.hs +++ b/libraries/ghc-heap/GHC/Exts/Heap.hs @@ -1,7 +1,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnboxedTuples #-} - +{-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE TypeFamilies #-} diff --git a/libraries/ghc-prim/GHC/Types.hs b/libraries/ghc-prim/GHC/Types.hs index 145b5ff179..4c6a3c6a17 100644 --- a/libraries/ghc-prim/GHC/Types.hs +++ b/libraries/ghc-prim/GHC/Types.hs @@ -37,7 +37,7 @@ module GHC.Types ( Any, -- * Type equality - type (~~), Coercible, + type (~), type (~~), Coercible, -- * Representation polymorphism TYPE, Levity(..), RuntimeRep(..), @@ -254,7 +254,6 @@ newtype IO a = IO (State# RealWorld -> (# State# RealWorld, a #)) * * (~) and Coercible - NB: (~) is built-in syntax, and hence not explicitly exported * * ********************************************************************* -} diff --git a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs index 5823cfafa8..3d3f46d2c4 100644 --- a/libraries/template-haskell/Language/Haskell/TH/Syntax.hs +++ b/libraries/template-haskell/Language/Haskell/TH/Syntax.hs @@ -2,7 +2,7 @@ DeriveGeneric, FlexibleInstances, DefaultSignatures, RankNTypes, RoleAnnotations, ScopedTypeVariables, MagicHash, KindSignatures, PolyKinds, TypeApplications, DataKinds, - GADTs, UnboxedTuples, UnboxedSums, TypeInType, + GADTs, UnboxedTuples, UnboxedSums, TypeInType, TypeOperators, Trustworthy, DeriveFunctor #-} {-# OPTIONS_GHC -fno-warn-inline-rule-shadowing #-} |