Use properFraction:
http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v%3AproperFraction
Hi,
In other weak-type language, `round i == i` would work. But in
haskell, what should I do? Thanks.
--
竹å¯å²å¦¨æµæ°´è¿
å±±é«åªé»éäºé£
properFraction l of
(_, 0) - l
_ - 0 -- always goes here.
On Tue, Sep 29, 2009 at 2:18 PM, Jimmy Hartzell j...@shareyourgifts.net
wrote:
Use properFraction:
http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v%3AproperFraction
Hi,
 In other weak-type language, `round i
Did you test the properFraction-based code in isolation? If code is
broken, it's important to figure out which part of it is broken. Also,
this function is not divided into constituent parts, but is a long unruly
mess. Dividing it into parts would make it much much more readable, and
you would
On Tue, Sep 29, 2009 at 3:07 PM, Jimmy Hartzell j...@shareyourgifts.net
wrote:
Did you test the properFraction-based code in isolation? If code is
broken, it's important to figure out which part of it is broken. Also,
this function is not divided into constituent parts, but is a long
unruly
visibly accessible.
Jimmy Hartzell
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
I am a bit puzzled here.
This seems to mean something like
If you take readable code using an operator you can
make it less readable, and when you do that you create
another problem as well, and an even less readable hack
can fix that.
I know an old lady who swallowed a fly...
be willing to help undertake
a project to patch ghc to support it?
Alternatively, you can try to talk me out of liking the proposal so much,
but that is much less likely to work.
Jimmy Hartzell
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
On Sep 22, 2009, at 8:01 PM, Jimmy Hartzell wrote:
I am in love with this proposal:
http://www.haskell.org/haskellwiki/Accessible_layout_proposal
I hadn't read it before. Now that I have, I really do not like
it. Syntactic sugar causes cancer of the semicolon as Alan
Perlis once said
Daniel Fischer wrote:
Or, what I do:
concat
[ (
, str
, )
]
This is a lot better, true, but it still takes a lot of typing, and the
first element is now special-cased, preventing easy copy-and-paste
(although, admittedly, much less opportunity for mistake). On a more
Richard O'Keefe wrote:
After all, someone might have started with
(
( ++
str ++
)
)
and ended up with
(
( ++
str ++
) -- (oops, no ++!)
lineEnd -- forgot I needed this
)
I asked for the trailing
Am Mittwoch 23 September 2009 04:06:11 schrieb Jimmy Hartzell:
Daniel Fischer wrote:
Or, what I do:
concat
[ (
, str
, )
]
You're right: my objections to this seem mostly to be matters of taste --
as I think about it, I find fewer and fewer practical reasons
11 matches
Mail list logo