[Haskell-cafe] HANSEI in Haskell?
Chung-chieh Shan
ccshan at cs.rutgers.edu
Tue Mar 1 01:02:52 CET 2011
Daryoush Mehrtash <dmehrtash at gmail.com> wrote in article <AANLkTim0LTOviud2fyzU7NAsraQMuCKa=QYfroXn87kx at mail.gmail.com> in gmane.comp.lang.haskell.cafe:
> I see the problem now. But I am confused as to why there are no Bool class
> (like Num, Fractional...) in Haskell. If I had such a class then the
> problem is solved, (by making the "pm a" an instance of it) right? Or are
> there still more issues that I am not seeing?
Sorry, I gave a bad example. Here are two more general symptoms of
direct style: being able to write something like
f (if flip 0.3 then LT else EQ)
where f is an existing function that takes an Ordering argument, and
even being able to write something like
and (map flip [0.3, 0.5])
where and :: [Bool] -> Bool
map :: (a -> b) -> [a] -> [b]
are existing functions.
--
Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig
1st graffitiist: QUESTION AUTHORITY! 2nd graffitiist: Why?
More information about the Haskell-Cafe
mailing list