Skip to content

Commit

Permalink
[ re #342 ] Proper compilation of projections from tuple records
Browse files Browse the repository at this point in the history
  • Loading branch information
jespercockx committed Jul 26, 2024
1 parent b0a185d commit 185dcca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Agda2Hs/Compile/Term.hs
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ compileProj q tty t ty args =
ifM (isJust <$> isUnboxProjection q) (eApp <$> compileTerm tty t <*> compileArgs ty args) $
-- class projection: we check the instance and drop it
ifM (isClassFunction q) (compileClassFun q tty t ty args) $

-- NOTE(flupe): maybe we want Dom Type for the record arg
ifJustM (isTupleProjection q) (\b -> compileTupleProjection q b tty t ty args) $
do
-- NOTE(flupe): maybe we want Dom Type for the record arg
name <- compileQName q
arg <- compileTerm tty t
compileApp (Hs.Var () name `eApp` [arg]) ty args
Expand Down

0 comments on commit 185dcca

Please sign in to comment.