[Haskell-cafe] Names for pretty-printing combinators

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Wed May 25 14:53:28 CEST 2011


(Changing the subject as it's going off-topic from the original email :p)

On 25 May 2011 22:45, Simon Meier <iridcode at gmail.com> wrote:
> 2011/5/25 Ivan Lazar Miljenovic <ivan.miljenovic at gmail.com>:
>>
>> Also, by clashes with Applicative, are you referring to empty and <$>
>> ?  I'm not sure if a better name than "empty" can be found; as for
>> <$>, maybe using pretty's notation of $$ and $+$ rather than <$> and
>> <$$> ?
>
> What about 'emptyDoc'?

It's a bit more of a mouthful, and getting a bit close to Hungarian
Notation, isn't it? :p  Also, empty is already used a fair amount in
other libraries as it stands (admittedly, most of those are in modules
that are typically imported qualified...).

> Moreover, if you are changing the names of
> combinators, then moving them away from Applicative and Arrow would be
> a good idea; i.e., don't use <+>, as it already used by ArrowPlus.

*sigh* We really need to get a list of used operators somewhere so
that libraries can stake a claim :p

> Moreover, if you can make a Monoid instance such that `mappend` equals
> <>, you would also make the library compatible to a future
> introduction of (<>) = mappend.

I was thinking about that actually...

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com



More information about the Haskell-Cafe mailing list