Skip to content

Commit

Permalink
TODO: change defs as only inline immediate usages etc
Browse files Browse the repository at this point in the history
  • Loading branch information
brprice committed Aug 14, 2023
1 parent 7015b7c commit 09a995b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions primer/src/Primer/Eval/Redex.hs
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ data Redex
, def :: ASTDef
-- ^ What is its definition
}
| -- x ~> e where we are inside the scope of a let x = e in ...
InlineLet
| -- let x = e in x ~> e
InlineLet -- TODO/REVIEW: don't know if I want to change this def for push-down-lets, as only inline an immediate usage
{ var :: LVarName
-- ^ What variable are we inlining
, expr :: Expr
Expand All @@ -240,8 +240,8 @@ data Redex
, varID :: ID
-- ^ Where was the occurrence (used for details)
}
| -- x ~> letrec x:T=t in t:T where we are inside the scope of a letrec x : T = t in ...
InlineLetrec
| -- letrec x = t : T in x ~> letrec x = t : T in t : T
InlineLetrec -- TODO/REVIEW: don't know if I want to change this def for push-down-lets, as only inline an immediate usage
{ var :: LVarName
-- ^ What variable are we inlining
, expr :: Expr
Expand Down Expand Up @@ -428,6 +428,7 @@ data RedexType
-- ^ What is its definition (used for reduction)
, letID :: ID
-- ^ Where was the binding (used for details)
-- TODO/REVIEW: it seems a bit silly recording both these IDs, since they'll be right next to each other...
, varID :: ID
-- ^ Where was the occurrence (used for details)
}
Expand Down

0 comments on commit 09a995b

Please sign in to comment.