summaryrefslogtreecommitdiff
path: root/compiler/codeGen/ClosureInfo.lhs
diff options
context:
space:
mode:
authorIavor S. Diatchki <iavor.diatchki@gmail.com>2011-12-18 17:21:13 -0800
committerIavor S. Diatchki <iavor.diatchki@gmail.com>2011-12-18 17:24:45 -0800
commit7c2af5cb6454ef219e2b35bc24d80624be07d2de (patch)
tree10e7c33455b58b35d1fc2d8d61b6c714c216dcb8 /compiler/codeGen/ClosureInfo.lhs
parent826b75a9a4fc6e978a4cfa09d896a927c56cfb75 (diff)
downloadhaskell-7c2af5cb6454ef219e2b35bc24d80624be07d2de.tar.gz
Extend GHC's type with a representation for type level literals.
Currently, we support only numeric literals but---hopefully---these modifications should make it fairly easy to add other ones, if necessary.
Diffstat (limited to 'compiler/codeGen/ClosureInfo.lhs')
-rw-r--r--compiler/codeGen/ClosureInfo.lhs7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/codeGen/ClosureInfo.lhs b/compiler/codeGen/ClosureInfo.lhs
index ac047edb89..682d76096b 100644
--- a/compiler/codeGen/ClosureInfo.lhs
+++ b/compiler/codeGen/ClosureInfo.lhs
@@ -1099,8 +1099,15 @@ getTyDescription ty
FunTy _ res -> '-' : '>' : fun_result res
TyConApp tycon _ -> getOccString tycon
ForAllTy _ ty -> getTyDescription ty
+ LiteralTy n -> getTyLitDescription n
}
where
fun_result (FunTy _ res) = '>' : fun_result res
fun_result other = getTyDescription other
+
+
+getTyLitDescription :: TyLit -> String
+getTyLitDescription l =
+ case l of
+ NumberTyLit n -> show n
\end{code}