ssm-lang / Scoria

This is an embedding of the Sparse Synchronous Model, in Haskell!
BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

Time refactor #88

Closed Rewbert closed 2 years ago

Rewbert commented 2 years ago

Refactored time into a new representation so that we can pass them around as expressions, references and parameters. It is essentially not treated as a special type anymore.

Previously, SSMTime was just a newtype around an SSMExp, so I changed it so that the internal representation uses just SSMExp and then just have Time be part of the frontend. The Time in Exp Time is an abstract type, and its representation is never exposed to users. We actually never construct values of it either, Exp uses a phantom type.