Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
johnynek committed Nov 22, 2024
1 parent 78560b3 commit 50f0cf7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions core/src/main/scala/org/bykn/bosatsu/Package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -531,10 +531,9 @@ object Package {
pack.program._2(n)

def filterLets(fn: Identifier => Boolean): Typed[A] = {
val lets = pack.program._1.lets
val prog1: Program[TypeEnv[Kind.Arg], TypedExpr[A], Any] =
pack.program._1.copy(lets = lets.filter { case (b, _, _) => fn(b) })
pack.copy(program = (prog1, pack.program._2))
val (prog, importMap) = pack.program
val prog1 = prog.copy(lets = prog.lets.filter { case (b, _, _) => fn(b) })
pack.copy(program = (prog1, importMap))
}
}

Expand Down
1 change: 1 addition & 0 deletions core/src/main/scala/org/bykn/bosatsu/PackageMap.scala
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ object PackageMap {

def treeShake[A](p: Typed[A], roots: Set[(PackageName, Identifier)]): Typed[A] = {
type Ident = (PackageName, Identifier)

def dependency(a: Ident): Iterable[Ident] =
p.toMap.get(a._1) match {
case Some(pack) =>
Expand Down

0 comments on commit 50f0cf7

Please sign in to comment.