summaryrefslogtreecommitdiff
path: root/compiler/GHC/Builtin/Names.hs
diff options
context:
space:
mode:
authorHaskellMouse <rinat.stryungis@serokell.io>2020-06-19 21:51:59 +0300
committerHaskellMouse <rinat.stryungis@serokell.io>2020-10-13 13:05:49 +0300
commit8f4f5794eb3504bf2ca093dc5895742395fdbde9 (patch)
tree827d862d79d1ff20f4206e225aecb2ca7c1e882a /compiler/GHC/Builtin/Names.hs
parent0a5f29185921cf2af908988ab3608602bcb40290 (diff)
downloadhaskell-8f4f5794eb3504bf2ca093dc5895742395fdbde9.tar.gz
Unification of Nat and Naturals
This commit removes the separate kind 'Nat' and enables promotion of type 'Natural' for using as type literal. It partially solves #10776 Now the following code will be successfully typechecked: data C = MkC Natural type CC = MkC 1 Before this change we had to create the separate type for promotion data C = MkC Natural data CP = MkCP Nat type CC = MkCP 1 But CP is uninhabited in terms. For backward compatibility type synonym `Nat` has been made: type Nat = Natural The user's documentation and tests have been updated. The haddock submodule also have been updated.
Diffstat (limited to 'compiler/GHC/Builtin/Names.hs')
-rw-r--r--compiler/GHC/Builtin/Names.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/GHC/Builtin/Names.hs b/compiler/GHC/Builtin/Names.hs
index baae7a1019..881753f6f2 100644
--- a/compiler/GHC/Builtin/Names.hs
+++ b/compiler/GHC/Builtin/Names.hs
@@ -1872,7 +1872,7 @@ uIntTyConKey = mkPreludeTyConUnique 162
uWordTyConKey = mkPreludeTyConUnique 163
-- Type-level naturals
-typeNatKindConNameKey, typeSymbolKindConNameKey,
+typeSymbolKindConNameKey,
typeNatAddTyFamNameKey, typeNatMulTyFamNameKey, typeNatExpTyFamNameKey,
typeNatLeqTyFamNameKey, typeNatSubTyFamNameKey
, typeSymbolCmpTyFamNameKey, typeNatCmpTyFamNameKey
@@ -1880,7 +1880,6 @@ typeNatKindConNameKey, typeSymbolKindConNameKey,
, typeNatModTyFamNameKey
, typeNatLogTyFamNameKey
:: Unique
-typeNatKindConNameKey = mkPreludeTyConUnique 164
typeSymbolKindConNameKey = mkPreludeTyConUnique 165
typeNatAddTyFamNameKey = mkPreludeTyConUnique 166
typeNatMulTyFamNameKey = mkPreludeTyConUnique 167