Skip to content

Commit

Permalink
Treat nested names the same as elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
dunhamsteve committed Sep 11, 2023
1 parent 6f3cde8 commit 64bc185
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/TTImp/Elab/Case.idr
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,10 @@ checkCase rig elabinfo nest env fc opts scr scrty_in alts exp
= case getFn x of
IVar _ n =>
do defs <- get Ctxt
[(n', (_, ty))] <- do nested <- maybe (pure []) (\n => lookupTyName n (gamma defs))
(join $ Builtin.fst <$> List.lookup n nest.names)
(nested ++) <$> lookupTyName n (gamma defs)
let n' = case lookup n (names nest) of
Just (Just n', _) => n'
_ => n
[(_, (_, ty))] <- lookupTyName n' (gamma defs)
| _ => guessScrType xs
Just (tyn, tyty) <- getRetTy defs !(nf defs [] ty)
| _ => guessScrType xs
Expand Down

0 comments on commit 64bc185

Please sign in to comment.