| | 2 | |
| | 3 | === General === |
| | 4 | |
| | 5 | Almost all of the code concerning closure conversion is in the module `ClosureConv` in the directory `vectorise/`. This module exports the function `closureConvert`, which is invoked as part of the core-to-core passes right after the desugarer if the option `fclosure-conv` is provided. |
| | 6 | |
| | 7 | === Actual conversion === |
| | 8 | |
| | 9 | There is a [wiki:DataParallel/ClosureConversion/ClassLess separate description] of the conversion scheme. This abstract description uses the convention that the existance of an `Id`, `TyCon`, or `dataCon` name followed by `_CC` indicates whether we have a closure converted variant of the corresponding declaration. In the concrete implementation this information is maintained in `UniqFM`s. |
| | 10 | |
| | 11 | === Cross-module information === |
| | 12 | |