yes, that what I meant, though the standard  >>=  does need to be used
carefully on a restricted universe of types to ensure you can get a deep
embedding


On Tue, Jun 17, 2014 at 5:33 PM, John Lato <[email protected]> wrote:

> Did you mean pure/return as the monadic equivalent?  I've frequently
> encountered embeddings where it's possible to have a valid <*> and >>= but
> not pure (or fmap).
>
> On Jun 17, 2014 1:46 PM, "Carter Schonwald" <[email protected]>
> wrote:
> >
> > ok, so one example of this design, albeit implemented in a funky way
> (compiler passes written in coq), was
> > Adam Megacz's Garrows project http://www.megacz.com/berkeley/garrows/
> >
> > a more concrete example of a haskell lib that enjoys a deep embedding
> and doesn't let you inject arbitrary (f:: a-> b )
> > would be Accelerate hackage.haskell.org/package/accelerate (the
> expression language there could be made into an "arr free Arrow" but not an
> Arrow that  has arr)
> >
> > basically not having arr or the monadic equiv bind, gives you a way to
> write libs where you can get a program as a first order AST  when you "run
> it" and be able to analyze/compile it in user land at runtime
> >
> >
> >
> > On Tue, Jun 17, 2014 at 4:37 PM, Jan Stolarek <[email protected]>
> wrote:
> >>
> >> > assuming that any haskell function can be embedded in an
> >> > arrow instance (...) prevents a lot of interesting deep embedding
> uses of the Arrow
> >> > abstraction
> >> Could you point me to some specific examples? I'm new to arrows and
> definitely far from groking
> >> all the arcana of their usage.
> >>
> >> Janek
> >
> >
> >
> > _______________________________________________
> > ghc-devs mailing list
> > [email protected]
> > http://www.haskell.org/mailman/listinfo/ghc-devs
> >
>
>
_______________________________________________
ghc-devs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to