Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Conversion of Flow types to Tetra types This only handles the subset of flow that occurs after lowering.
Documentation
convertType :: Type Name -> ConvertM (Type Name) Source #
Convert types from Flow to Tetra.
The majority of type conversions are just replacing one name with another,
so these are performed in convertName
.
Others require removing arguments or adding regions are performed here, before name conversion:
* Rate foralls are removed
* Series k a
becomes Ptr# rTop a
* RateNat k
becomes Nat#
* Ref a
becomes Ref# rTop a
* a->b->c
becomes a -> b -> S (Read rT + Write rT + Alloc rT) c