Context Navigation

Ticket #117
(closed enhancement: fixed)

mapInputT

Reported by:

guest

Owned by:

Priority:

major

Milestone:

Version:

Keywords:

Cc:

tora@…

Description

I have a need for a mapInputT :: (m a -> n b) -> InputT m a -> InputT n b function, which should provide an idiomatic way to (e.g.) layer haskeline over some haskellDB usage (which is IO specific - transaction :: IO a -> IO a ).

This should be analagous to mapReaderT, mapStateT etc.

It should be short, but tricky to write. If I can come up with an implementation I'll attach it here.

Change History

Having just dug through the source code, I think the use of (Settings m) in the definition of InputT will restrict this to: mapInputT :: (m a -> m b) -> InputT m a -> InputT m b , or some variation thereof.