You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a wishlist item I've been thinking about: I wish Trav was a monad transformer built up out of smaller simpler monad transformers.
Trav s a is meant to be extensible via the userState component s and the handleDecl function from MonadTrav, but this isn't always enough.
For example if I want to handle some events by running some kind of imperative operation (e.g. some kind of Union-Find algorithm or maybe feeding facts to an external solver like Z3) that's not easy to do right now.
Instead of baking in user state into the monad, Trav should be a monad transformer: TravT m a and Trav s a = TravT (State s) a (I'm not sure how user state interacts with Trav's exception mechanism).
In fact, ideally the MonadSymtab and MonadName, and MonadCError parts of Trav should all be broken out into separate transformers that layer on the functionality one by one (so that if I want to have some kind of extended symbol information, for example, I could add my own MonadSymtab instance in a custom stack). The default TravT should be a newtype around a particular instantiation of a stack of simpler transformers..
The text was updated successfully, but these errors were encountered:
Here's a wishlist item I've been thinking about: I wish
Trav
was a monad transformer built up out of smaller simpler monad transformers.Trav s a
is meant to be extensible via theuserState
components
and thehandleDecl
function fromMonadTrav
, but this isn't always enough.For example if I want to handle some events by running some kind of imperative operation (e.g. some kind of Union-Find algorithm or maybe feeding facts to an external solver like Z3) that's not easy to do right now.
Instead of baking in user state into the monad,
Trav
should be a monad transformer:TravT m a
andTrav s a = TravT (State s) a
(I'm not sure how user state interacts with Trav's exception mechanism).In fact, ideally the
MonadSymtab
andMonadName
, andMonadCError
parts ofTrav
should all be broken out into separate transformers that layer on the functionality one by one (so that if I want to have some kind of extended symbol information, for example, I could add my ownMonadSymtab
instance in a custom stack). The defaultTravT
should be a newtype around a particular instantiation of a stack of simpler transformers..The text was updated successfully, but these errors were encountered: