Looks like an asGetter to me.
The other abstractions I find myself reaching for are folds. Something like:
asFold :: (x -> a -> (State s m) x) -> (State s m) x -> (x -> (State s m) b) ->
Producer a (State s m) () -> Model s a b
Which I hack through with:
mvcFold :: Managed (Controller a) -> L.Fold a b -> IO b
mvcFold c (L.Fold step begin done) = do
x <- runMVC begin (asPipe $ (Pipes.chain (\k -> S.modify (flip step k)))) ((,) <$> pure mempty <*> c)
return $ done x
And this is a typical usage - hooking up a controller for testing and thus avoid having to rewrite it as a producer.
And, for completion, is there a useful asParser interpretation? I haven't tried, but it would be nice to have an ability to draw and peek within the model.