@@ -942,6 +942,9 @@ aiFn inpat expat ist fc f as
942942 find n (g : gs) acc = find n gs (g : acc)
943943
944944-- replace non-linear occurrences with _
945+-- ASSUMPTION: This is called before adding 'alternatives' because otherwise
946+-- it is hard to get right!
947+
945948stripLinear :: IState -> PTerm -> PTerm
946949stripLinear i tm = evalState (sl tm) [] where
947950 sl :: PTerm -> State [Name] PTerm
@@ -949,7 +952,7 @@ stripLinear i tm = evalState (sl tm) [] where
949952 | (_:_) <- lookupTy Nothing f (tt_ctxt i)
950953 = return $ PRef fc f
951954 | otherwise = do ns <- get
952− trace (show (f, ns)) $ if (f `elem` ns)
955+ if (f `elem` ns)
953956 then return Placeholder
954957 else do put (f : ns)
955958 return (PRef fc f)