Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira committed Oct 26, 2023
1 parent bc38000 commit 2ee8134
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/Juvix/Compiler/Internal/Extra/Clonable.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ instance Clonable Application where
Application
{ _appLeft = l',
_appRight = r',
..
_appImplicit
}

instance (Clonable a) => Clonable (WithLoc a) where
Expand Down Expand Up @@ -185,7 +185,7 @@ instance Clonable SimpleBinder where
return
SimpleBinder
{ _sbinderType = ty',
..
_sbinderVar
}

instance Clonable SimpleLambda where
Expand Down Expand Up @@ -250,11 +250,18 @@ instance Clonable FunctionDef where
underBinder fun $ \fun' -> do
body' <- freshNameIds _funDefBody
defaultSig' <- freshNameIds _funDefArgsInfo

return
FunctionDef
{ _funDefName = fun' ^. funDefName,
_funDefType = ty',
_funDefBody = body',
_funDefArgsInfo = defaultSig',
..
-- clones do not need to preserve examples
_funDefExamples = [],
_funDefTerminating,
_funDefInstance,
_funDefCoercion,
_funDefBuiltin,
_funDefPragmas
}

0 comments on commit 2ee8134

Please sign in to comment.