From: Anders Date: Fri, 27 Mar 2015 16:52:09 +0000 (+0100) Subject: Fix isNeutral X-Git-Url: https://git.ak3n.com/?a=commitdiff_plain;h=948dd41e6f626f2a3f4169a2238264a05488870a;p=cubicaltt.git Fix isNeutral --- diff --git a/CTT.hs b/CTT.hs index caebb10..b0b37a6 100644 --- a/CTT.hs +++ b/CTT.hs @@ -177,7 +177,11 @@ isNeutral v = case v of _ -> False isNeutralSystem :: System Val -> Bool -isNeutralSystem = any isNeutral . Map.elems +isNeutralSystem = any isNeutralPath . Map.elems + +isNeutralPath :: Val -> Bool +isNeutralPath (VPath _ v) = isNeutral v +isNeutralPath _ = True isNeutralTrans :: Val -> Val -> Bool isNeutralTrans (VPath i a) u = foo i a u @@ -205,7 +209,6 @@ mkVar k = VVar ('X' : show k) unCon :: Val -> [Val] unCon (VCon _ vs) = vs --- unCon (KanUElem _ u) = unCon u unCon v = error $ "unCon: not a constructor: " ++ show v isCon :: Val -> Bool