forsyde / forsyde-atom

A shallow-embedded DSL for modeling cyber-physical systems
https://forsyde.github.io/forsyde-atom/
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

Skeleton layer atoms as polymorphic type class #15

Closed ugeorge closed 8 years ago

ugeorge commented 8 years ago

Based on the factorization theorem, all skeletons can be expressed as a reduce . map pattern, regardless of the categorical type they are applied on. Thus this type class should be instantiated by all the "structured types" associated with the Skeleton layer, and should implement the atoms with the functionality above.