-
Notifications
You must be signed in to change notification settings - Fork 73
Closed
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists
Description
I'm quickly noticing that the low-level C type of a Stream is unsatisfying. It would be really nice to be able to attach my own type information to a Stream, so I can avoid eg, confusing pressure (Stream Float) with temperature (Stream Float).
Using a newtype of Stream is unsatisfactory, because my new type would not be able to be used within expessions in the copilot DSL.
A phantom type seems like a natural approach, eg:
type Stream t = StreamP p t
And change copilot to use StreamP p everywhere it uses Stream currently. Then I could write eg:
emergency_shutdown_required :: StreamP Pressure Float -> StreamP Temperaure Float -> Stream Bool
Would you be open to a change along these lines?
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists