Hello Paul,
> glad to see a new major release in the pipe. And glad to see the interface
> revisited, as I have never really appreciated the arrow one :)
Thanks!
> A few years ago we discussed the rational behind the Arrow interface, and
> you said it was required for some sort of static analysis / guaranties for
> the compiler. So I am curious, may I ask what happened to this approach ? Is
> there a trade-off to the new monad-based interface ?
Yes. The change to a monad-based interface came with two drawbacks.
- A lot of information has to be persisted between runs, including
Patterns. This means we could no longer have arbitrary predicates
(`predicate :: (Identifier -> Bool) -> Pattern`). To compensate, other
pattern constructors were added.
- Metacompilers are no longer possible. However, I think this might be
good thing since they were overly complicated. Things that used to
require metacompilers can now be implemented using the early metadata
access primitives.
> Also, in the "compilers" doc page, I see "titleContext :: Context a", but
> shouldn't that be "Context String" ?
That would also work, but `titleContext` is a `Context` that works for
every type since it only operates on the `Metadata` and not the value
of the body (of type `a`): `titleContext` can also work if you're
compiling a `ByteString` or an image or...
Cheers,
Jasper
On Tue, Dec 18, 2012 at 2:33 PM, <
paul....@gmail.com> wrote:
> Hello Jasper,
>
> glad to see a new major release in the pipe. And glad to see the interface
> revisited, as I have never really appreciated the arrow one :)
>
> A few years ago we discussed the rational behind the Arrow interface, and
> you said it was required for some sort of static analysis / guaranties for
> the compiler. So I am curious, may I ask what happened to this approach ? Is
> there a trade-off to the new monad-based interface ?
>
> Also, in the "compilers" doc page, I see "titleContext :: Context a", but
> shouldn't that be "Context String" ?
>
> regards,