[stack] Type for row based languages
"hallucious" <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
I think that functions on rows can be given types using type constraints - even the weird ones like bi@. A type can be given to the composition of functions f g h that is equivalent whether f g or g h are taken first. Let f : ( A -> B ) where P Let g : ( C -> D ) where Q In a type system that does not have ad-hoc polymorphism, then f g : ( A -> D ) where P and Q and B = C For example: bi@ : ( A B (B -> C d) -> E C d d) where A C = E B And in a type system that does have it, then f g : ( A -> D ) where P and Q and B < C I wrote more details about such a system at http://www.nothingontelly.com/RowTypes.txt Is there pre-existing work on this? Have I made a mistake? Missed something? Is there a book I should have read?