Skip to content

Commit

Permalink
Fix #7084: Mimer internal error (#7087)
Browse files Browse the repository at this point in the history
fix #7084: get correct type for projections in parameterised modules
  • Loading branch information
UlfNorell committed Feb 5, 2024
1 parent a445e3b commit 2925d77
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/full/Agda/Mimer/Mimer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ applyProj recordArgs comp' qname = do
cost <- asks (costProj . searchCosts)
let newTerm = applyE (compTerm comp') [Proj ProjSystem qname]
reportDoc "mimer.temp" 10 $ "applyProj: newTerm =" <+> pretty newTerm
projType <- typeOfConst qname
projType <- defType <$> getConstInfo qname
projTypeWithArgs <- piApplyM projType recordArgs
newType <- piApplyM projTypeWithArgs (compTerm comp')
reportSDoc "mimer.temp" 10 $ do
Expand Down
8 changes: 8 additions & 0 deletions test/interaction/Issue7084.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

module _ (X : Set) where

record R : Set₁ where
field t : X

auto : R X
auto r = {!!}
2 changes: 2 additions & 0 deletions test/interaction/Issue7084.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
top_command (cmd_load currentFile [])
goal_command 0 cmd_autoOne ""
8 changes: 8 additions & 0 deletions test/interaction/Issue7084.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(agda2-status-action "")
(agda2-info-action "*Type-checking*" "" nil)
(agda2-highlight-clear)
(agda2-status-action "")
(agda2-info-action "*All Goals*" "?0 : X " nil)
((last . 1) . (agda2-goals-action '(0)))
(agda2-give-action 0 "R.t r")
((last . 1) . (agda2-goals-action '()))

0 comments on commit 2925d77

Please sign in to comment.