summaryrefslogtreecommitdiff
path: root/compiler/prelude
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2013-05-15 09:51:25 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2013-05-15 14:16:08 +0100
commita18ea4f20b73e1b3ef5cda2389c713152eb9576e (patch)
tree28b36fdd9dd37ae80c503a3b5cc0ecb1ec550cf0 /compiler/prelude
parenta91e230466412aa9519df3c0d376bd682fb1db6b (diff)
downloadhaskell-a18ea4f20b73e1b3ef5cda2389c713152eb9576e.tar.gz
Make 'undefined' have the magical type 'forall (a:OpenKind).a'
This fixes Trac #7888, where the user wanted to use 'undefined' in a context that needed ((forall a. a->a) -> Int). We allow OpenKind unification variables to be instantiate with polytypes (or unboxed types), hence the change. 'error' has always been like this; this change simply extends the special treatment to 'undefined'. It's still magical; you can't define your own wrapper for 'error' and get the same behaviour. Really just a convenience hack.
Diffstat (limited to 'compiler/prelude')
-rw-r--r--compiler/prelude/PrelNames.lhs5
1 files changed, 0 insertions, 5 deletions
diff --git a/compiler/prelude/PrelNames.lhs b/compiler/prelude/PrelNames.lhs
index 19acf488e0..09835fb34e 100644
--- a/compiler/prelude/PrelNames.lhs
+++ b/compiler/prelude/PrelNames.lhs
@@ -798,10 +798,6 @@ stringTyConName = tcQual gHC_BASE (fsLit "String") stringTyConKey
inlineIdName :: Name
inlineIdName = varQual gHC_MAGIC (fsLit "inline") inlineIdKey
--- The 'undefined' function. Used by supercompilation.
-undefinedName :: Name
-undefinedName = varQual gHC_ERR (fsLit "undefined") undefinedKey
-
-- Base classes (Eq, Ord, Functor)
fmapName, eqClassName, eqName, ordClassName, geName, functorClassName :: Name
eqClassName = clsQual gHC_CLASSES (fsLit "Eq") eqClassKey
@@ -1689,7 +1685,6 @@ checkDotnetResNameIdKey = mkPreludeMiscIdUnique 154
undefinedKey :: Unique
undefinedKey = mkPreludeMiscIdUnique 155
-
\end{code}
Certain class operations from Prelude classes. They get their own