From: Anders Mörtberg Date: Tue, 5 Jul 2016 14:06:27 +0000 (+0200) Subject: fix name of local splits X-Git-Url: https://git.ak3n.com/?a=commitdiff_plain;h=f3f2589012b63b74d7a11f3ecd55e07de0f660c9;p=cubicaltt.git fix name of local splits --- diff --git a/Resolver.hs b/Resolver.hs index 839af5f..0823c23 100644 --- a/Resolver.hs +++ b/Resolver.hs @@ -194,11 +194,11 @@ resolveExp e = case e of Split t brs -> do t' <- resolveExp t brs' <- mapM resolveBranch brs - loc <- getLoc (case brs of - OBranch (AIdent (l,_)) _ _:_ -> l - PBranch (AIdent (l,_)) _ _ _:_ -> l - _ -> (0,0)) - return $ CTT.Split "" loc t' brs' -- Do we ever use the name? + l@(Loc n (i,j)) <- getLoc (case brs of + OBranch (AIdent (l,_)) _ _:_ -> l + PBranch (AIdent (l,_)) _ _ _:_ -> l + _ -> (0,0)) + return $ CTT.Split (n ++ "_L" ++ show i ++ "_C" ++ show j) l t' brs' Let decls e -> do (rdecls,names) <- resolveDecls decls mkWheres rdecls <$> local (insertIdents names) (resolveExp e)