@@ -84,7 +84,7 @@ findHole n env t = fh' env Top t where
84 | Just (p, env', tm) <- fh' env path f = Just (AppL s p a, env', tm)
84 | Just (p, env', tm) <- fh' env path f = Just (AppL s p a, env', tm)
85 fh' env path (Bind x b sc)
85 fh' env path (Bind x b sc)
86 | Just (bp, env', tm) <- fhB env path b = Just (InBind x bp sc, env', tm)
86 | Just (bp, env', tm) <- fhB env path b = Just (InBind x bp sc, env', tm)
87− | Just (p, env', tm) <- fh' ((x,Rig0,b):env) path sc = Just (InScope x b p, env', tm)
87+ | Just (p, env', tm) <- fh' ((x,RigW,b):env) path sc = Just (InScope x b p, env', tm)
88 fh' _ _ _ = Nothing
88 fh' _ _ _ = Nothing
90 fhB env path (Let t v)
90 fhB env path (Let t v)
@@ -297,10 +297,10 @@ goal h pt@(PT path env sub ups)
297 g env (Bind n b@(Guess _ _) sc)
297 g env (Bind n b@(Guess _ _) sc)
298 | same h n = return $ GD env b
298 | same h n = return $ GD env b
299 | otherwise
299 | otherwise
300− = gb env b `mplus` g ((n, Rig0, b):env) sc
300+ = gb env b `mplus` g ((n, RigW, b):env) sc
301 g env (Bind n b sc) | hole b && same h n = return $ GD env b
301 g env (Bind n b sc) | hole b && same h n = return $ GD env b
302 | otherwise
302 | otherwise
303− = g ((n, Rig0, b):env) sc `mplus` gb env b
303+ = g ((n, RigW, b):env) sc `mplus` gb env b
304 g env (App Complete f a) = fail "Can't find hole"
304 g env (App Complete f a) = fail "Can't find hole"
305 g env (App _ f a) = g env a `mplus` g env f
305 g env (App _ f a) = g env a `mplus` g env f
306 g env t = fail "Can't find hole"
306 g env t = fail "Can't find hole"
@@ -338,12 +338,12 @@ atHole h f c e pt -- @(PT path env sub)
338 = do -- binder first
338 = do -- binder first
339 (b', u) <- ulift2 f c env Guess t v
339 (b', u) <- ulift2 f c env Guess t v
340 if u then return (Bind n b' sc, True)
340 if u then return (Bind n b' sc, True)
341− else do (sc', u) <- atH f c ((n, Rig0, b) : env) sc
341+ else do (sc', u) <- atH f c ((n, RigW, b) : env) sc
342 return (Bind n b' sc', u)
342 return (Bind n b' sc', u)
343 atH f c env binder@(Bind n b sc)
343 atH f c env binder@(Bind n b sc)
344 | hole b && same h n = updated (f c env binder)
344 | hole b && same h n = updated (f c env binder)
345 | otherwise -- scope first
345 | otherwise -- scope first
346− = do (sc', u) <- atH f c ((n, Rig0, b) : env) sc
346+ = do (sc', u) <- atH f c ((n, RigW, b) : env) sc
347 if u then return (Bind n b sc', True)
347 if u then return (Bind n b sc', True)
348 else do (b', u) <- atHb f c env b
348 else do (b', u) <- atHb f c env b
349 return (Bind n b' sc', u)
349 return (Bind n b' sc', u)