@@ -669,8 +669,6 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
669669 (erun fc (build i winfo ERHS opts fname rhs))
670670 errAt "right hand side of " fname (Just clhsty)
671671 (erun fc $ psolve lhs_tm)
672− hs <- get_holes
673− mapM_ (elabCaseHole is) hs
674672 tt <- get_term
675673 aux <- getAux
676674 let (tm, ds) = runState (collectDeferred (Just fname)
@@ -788,27 +786,6 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
788786 (b : bf, af)
789787 sepBlocks' ns [] = ([], [])
790788
791−
792− -- if a hole is just an argument/result of a case block, treat it as
793− -- the unit type. Hack to help elaborate case in do blocks.
794− elabCaseHole aux h = do
795− focus h
796− g <- goal
797− case g of
798− TType _ -> when (any (isArg h) aux) $ do apply (Var unitTy) []; solve
799− _ -> return ()
800−
801− -- Is the name a pattern argument in the declaration
802− isArg :: Name -> PDecl -> Bool
803− isArg n (PClauses _ _ _ cs) = any isArg' cs
804− where
805− isArg' (PClause _ _ (PApp _ _ args) _ _ _)
806− = any (\x -> case x of
807− PRef _ _ n' -> n == n'
808− _ -> False) (map getTm args)
809− isArg' _ = False
810− isArg _ _ = False
811−
812789 -- term is not within "with" block
813790 isOutsideWith :: PTerm -> Bool
814791 isOutsideWith (PApp _ (PRef _ _ (SN (WithN _ _))) _) = False