| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
DDC.Core.Flow.Convert.Type
Description
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
convertName :: Name -> ConvertM Name Source