> Simon L Peyton Jones wrote:
> > [...] Let me advertise Olivier Danvy's very cunning idea to implement
> > printf in Haskell/ML.
> >
> > http://www.brics.dk/RS/98/5/index.html
>
A revised version is available in
http://www.brics.dk/RS/98/12/index.html
It is the extended version of
Sven Panne wrote:
> Simon L Peyton Jones wrote:
> > [...] Let me advertise Olivier Danvy's very cunning idea to implement
> > printf in Haskell/ML.
> >
> > http://www.brics.dk/RS/98/5/index.html
>
> Very cunning, indeed. But it has as small efficiency problem because
> of the use of (++).
On 22-Jul-1998, S. Alexander Jacobson <[EMAIL PROTECTED]> wrote:
| On Wed, 22 Jul 1998, Simon L Peyton Jones wrote:
|
| > Let me advertise Olivier Danvy's very cunning idea to implement
| > printf in Haskell/ML.
| >
| > http://www.brics.dk/RS/98/5/index.html
|
| Printf isn't really what I w
| I would be more inclined to use <<. The reason is typing efficiency.
| '&' is awkward to be typing frequently immediately after '"'.
I do not type that fast ;-).
| You are acutally using (.) below. Is there a way to do that (via
| Fran like lifting?)?
I'm afraid no.
| > > instance Stringab
Simon L Peyton Jones wrote:
> [...] Let me advertise Olivier Danvy's very cunning idea to implement
> printf in Haskell/ML.
>
> http://www.brics.dk/RS/98/5/index.html
Very cunning, indeed. But it has as small efficiency problem because
of the use of (++). This can be easily cured by usin
This might be a reasonable solution for the the "concatenation" operator
you want:
[This does not solve the numeric ambiguity - I think that is impossible.]
infixl 1 <<
class Stringable a where
(<<) :: String -> a -> String
instance Stringable a => Stringable [a] where
s << [] = s
s << (x
On Wed, 22 Jul 1998, Ralf Hinze wrote:
> What about `&' for catenation?
I would be more inclined to use <<. The reason is typing efficiency.
'&' is awkward to be typing frequently immediately after '"'.
You are acutally using (.) below. Is there a way to do that (via
Fran like lifting?)?
> >
> I would like to avoid using show all the time for printing strings e.g.
>
> > val = "the sum of 2 and 2 is "++(show $ 2 + 2)++" whenever."
>
> I would prefer to type something like:
>
> > val = "the sum of 2 and 2 is "./(2+2)./" whenever."
> > -- i can' find a better haskell compatible opera
On Wed, 22 Jul 1998, Simon L Peyton Jones wrote:
> Let me advertise Olivier Danvy's very cunning idea to implement
> printf in Haskell/ML.
>
> http://www.brics.dk/RS/98/5/index.html
Printf isn't really what I want, but I am happy to take a look.
I am really looking for a my scripting like
> I would like to avoid using show all the time for printing strings e.g.
>
> > val = "the sum of 2 and 2 is "++(show $ 2 + 2)++" whenever."
>
> I would prefer to type something like:
>
> > val = "the sum of 2 and 2 is "./(2+2)./" whenever."
> > -- i can' find a better haskell compatible opera
Alex Jacobson:
> > > > (./) :: (Stringable a,Stringable b)=> a->b->String
> > > > x./y = (toString x)++(toString y)
> > Wouldn't it be a great deal less tortuous to define:
> >
> > > x .++ y = show x ++ y
> >
> > > x ++. y = x ++ show y
> >
> > and then to use (++), (.++), or (++.), as approp
S. Alexander Jacobson writes:
> So I tried creating my own Stringable class:
> > class Stringable a where
> > toString::a -> String
> > (./) :: (Stringable a,Stringable b)=> a->b->String
> > x./y = (toString x)++(toString y)
Wouldn't it be a great deal less tortuous to define:
> x .++ y = sho
On Tue, 21 Jul 1998, Alex Ferguson wrote:
> > So I tried creating my own Stringable class:
> > > class Stringable a where
> > > toString::a -> String
>
> > > (./) :: (Stringable a,Stringable b)=> a->b->String
> > > x./y = (toString x)++(toString y)
>
> Wouldn't it be a great deal less tortuous
I would like to avoid using show all the time for printing strings e.g.
> val = "the sum of 2 and 2 is "++(show $ 2 + 2)++" whenever."
I would prefer to type something like:
> val = "the sum of 2 and 2 is "./(2+2)./" whenever."
> -- i can' find a better haskell compatible operator
I can't sim
14 matches
Mail list logo