( binding: Binding, module: SourceModule, seen: Set<Node> )
| 240 | |
| 241 | // a Type is immutable, so it differs only by the functions it holds |
| 242 | private isSameType( |
| 243 | binding: Binding, |
| 244 | module: SourceModule, |
| 245 | seen: Set<Node> |
| 246 | ): boolean { |
| 247 | const value = this.interpreter.valueOfBinding(binding, module) |
| 248 | return ( |
| 249 | isFoldable(value) && |
| 250 | keyOf(value)[1].every(hole => { |
| 251 | const standIn = |
| 252 | hasDomain(hole, "object") ? |
| 253 | this.interpreter.standIns.get(hole) |
| 254 | : undefined |
| 255 | return ( |
| 256 | standIn?.closure && |
| 257 | !standIn.closure.env && |
| 258 | this.reads(standIn.closure.node, standIn.module, seen) |
| 259 | ) |
| 260 | }) |
| 261 | ) |
| 262 | } |
| 263 | |
| 264 | private locate( |
| 265 | binding: Binding, |
no test coverage detected