Skip to content

Commit

Permalink
Add comments describing the purpose of nonInterceptCall
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcadman committed Oct 11, 2024
1 parent 21d43ae commit a50e1f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Juvix/Compiler/Nockma/Evaluator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ evalProfile inistack initerm =
ParsedStdlibCallCell o -> do
intercept' <- asks (^. evalInterceptStdlibCalls)
let nonInterceptCall = goOperatorCell (o ^. stdlibCallRaw)
-- Pass the raw call to goStdlibCall so that stdlib intercepts
-- can choose to use the raw call instead.
if
| intercept' -> goStdlibCall nonInterceptCall (o ^. stdlibCallCell)
| otherwise -> nonInterceptCall
Expand Down Expand Up @@ -263,6 +265,8 @@ evalProfile inistack initerm =
StdlibLengthBytes -> case args' of
TermAtom a -> TermAtom <$> goLengthBytes a
_ -> error "expected an atom"
-- Use the raw nock code for curry The nock stdlib curry function is
-- small. There's no benefit in implementing it separately in the evaluator.
StdlibCurry -> nonInterceptCall
where
goCat :: Atom a -> Atom a -> Sem r (Term a)
Expand Down

0 comments on commit a50e1f8

Please sign in to comment.