From 8c78d056b6175ae3b8b500bcffe3041901d1deac Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Tue, 20 May 2008 22:07:35 +0000 Subject: [PATCH] Improved display of unknown types (for debugging, really) --- common/ShowCode.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/ShowCode.hs b/common/ShowCode.hs index a77032c..5888f53 100644 --- a/common/ShowCode.hs +++ b/common/ShowCode.hs @@ -237,7 +237,7 @@ instance ShowOccam A.Type where showOccamM A.Time = tell ["TIME"] showOccamM (A.UnknownVarType en) = do tell ["(inferred type for: "] - either showName (const $ return ()) en + either showName (tell . (:[]) . show) en tell [")"] showOccamM (A.UnknownNumLitType m _ n) = tell ["(inferred numeric type: ",show m," ",show n,")"] @@ -283,7 +283,7 @@ instance ShowRain A.Type where showRainM (A.List t) = tell ["["] >> showRainM t >> tell ["]"] showRainM (A.UnknownVarType en) = do tell ["(inferred type for: "] - either showName (const $ return ()) en + either showName (tell . (:[]) . show) en tell [")"] showRainM (A.UnknownNumLitType m _ n) = tell ["(inferred numeric type: ",show m," ",show n,")"]