| 191 | | |
| | 196 | Here some examples, |
| | 197 | {{{ |
| | 198 | (Int -> Int)^ = Int :-> Int |
| | 199 | (forall a. [a] -> [a])^ = [a] :-> [a] |
| | 200 | ([Int -> Int] -> Int)^ = [Int :-> Int] :-> Int |
| | 201 | (Int# -> Int# -> Int#)^ = Int# -> Int# -> Int# |
| | 202 | ((Int -> Int) -> Int#)^ = (Int :-> Int) -> Int# |
| | 203 | (Int -> Int -> Int#)^ = Int :-> (Int -> Int#) |
| | 204 | }}} |
| | 205 | |
| | 206 | === Converting value bindings === |
| | 207 | |
| | 208 | ==== Bindings ==== |
| | 209 | |
| | 210 | ==== Toplevel ==== |
| | 211 | |
| | 212 | When converting a toplevel binding for `f :: t`, we generate `f_CC :: t^`. |
| | 213 | |
| | 214 | |
| | 215 | The alternatives `GlobalId` and `LocalId` of `Var.Var` get a new field `idCC :: StatusCC Id` whose values, for a declaration `f`, we determine as follows: |
| | 216 | * If `Id`'s declaration uses any features that we cannot (or currently, don't want to) convert, set `idCC` to `NoCC`. |
| | 217 | * If all type constructors involved in `f`'s type are marked `NoCC` or `AsIsCC`, we set `f`'s `idCC` field to `AsIsCC`. |
| | 218 | * Otherwise, convert `f` and set its `ifCC` field to `ConvCC f_CC`. |
| 196 | | |
| 197 | | |
| 198 | | |
| 199 | | === Converting value bindings === |
| 200 | | |
| 201 | | When converting a toplevel binding for `f :: t`, we generate `f_CC :: t^`. The alternatives `GlobalId` and `LocalId` of `Var.Var` get a new field `idCC :: StatusCC Id` whose values, for a declaration `f`, we determine as follows: |
| 202 | | * If `Id`'s declaration uses any features that we cannot (or currently, don't want to) convert, set `idCC` to `NoCC`. |
| 203 | | * If all type constructors involved in `f`'s type are marked `NoCC` or `AsIsCC`, we set `f`'s `idCC` field to `AsIsCC`. |
| 204 | | * Otherwise, convert `f` and set its `ifCC` field to `ConvCC f_CC`. |