Skip to content

Commit

Permalink
Adding ValueModuleSpec (#61)
Browse files Browse the repository at this point in the history
* adding ValueModuleSpec
  • Loading branch information
michelchan authored Mar 9, 2022
1 parent ae6186a commit f0a018d
Show file tree
Hide file tree
Showing 2 changed files with 695 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ object ValueModule {
Definition(Chunk.empty, valueType, value)
}
}

final case class InputParameter[+Annotations](
name: Name,
tpe: Type[Annotations],
Expand Down Expand Up @@ -337,6 +338,7 @@ object ValueModule {
case _ @ValueCase.LiteralCase(_) => Set.empty
case c @ ValueCase.PatternMatchCase(_, _) => c.cases.flatMap(_._2).toSet ++ c.branchOutOn
case c @ ValueCase.RecordCase(_) => c.fields.flatMap(_._2).toSet
case c @ ValueCase.ReferenceCase(_) => Set(c.name)
case c @ ValueCase.TupleCase(_) => c.elements.flatten.toSet
case _ @ValueCase.UnitCase => Set.empty
case c @ ValueCase.UpdateRecordCase(_, _) => c.fieldsToUpdate.flatMap(_._2).toSet ++ c.valueToUpdate
Expand Down
Loading

0 comments on commit f0a018d

Please sign in to comment.