[Haskell-cafe] Idiom Brackets for GHC (first full proposal)
Roman Cheplyaka
roma at ro-che.info
Thu Feb 26 23:28:12 UTC 2015
I'm starting to like this. Except the weird difference between spaces on
different levels that you point out, i.e.
[| const True False |]
vs
[| (const True) False |]
On 26/02/15 23:04, Oliver Charles wrote:
> Hi all,
>
> A few days ago I made a post here to gauge interest in adding idiom
> brackets to GHC. Response was a bit more mixed than I was hoping, but no
> one seemed to drastically against the idea, so I've moved forward with a
> more detailed proposal.
>
> You can find the full proposal here:
>
> https://ocharles.org.uk/IdiomBrackets.html
>
> A particular difference in my proposal from existing solutions comes
> from my desire to lift almost *all* expressions - with the original
> syntax - into idiom brackets. This means normal function application and
> tuples, but also case expressions, let bindings, record construction,
> record update, infix notation, and so on.
>
> At first I was skeptical about this, but I am finding uses for this more
> and more. I really like how it lets me use the interesting data (that
> is, whatever is "under" the applicative functor) where it's most
> relevant - rather than having to build a function and thread that value
> back through. Examples of this can be seen in my proposal.
>
> To prove its use, I've been working with this Template Haskell
> expression:
>
> https://ocharles.org.uk/IdiomExp.hs
>
> It *almost* does exactly what I want, the only problem is I can't get
> Template Haskell to give me a difference between
>
> $(i [| const True False |])
>
> and
>
> $(i [| (const True) False |])
>
> which I was planning to be significant.
>
> The proposal has mostly grown into my own personal notebook, so I'm
> happy to clarify anything that is vague/contradictory/confusing.
>
> Look forward to hearing your thoughts!
>
> -- Ollie
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
More information about the Haskell-Cafe
mailing list