I second the recommendation to look at Haste. It's what I would pick for a
project like this today.
In the big picture, Haste and GHCJS are fairly similar. But when it comes
to the ugly details of the runtime system, GHCJS adopts the perspective
that it's basically an emulator, where
.
On Tue, Jul 9, 2013 at 11:46 AM, Aleksey Khudyakov
alexey.sklad...@gmail.com wrote:
On 08.07.2013 23:54, Chris Smith wrote:
So I've been thinking about something, and I'm curious whether anyone
(in particular, people involved with GHC) think this is a worthwhile
idea.
I'd like to implement
Oh, never mind. In this case, I guess I don't need an extension at all!
On Tue, Jul 9, 2013 at 1:47 PM, Chris Smith cdsm...@gmail.com wrote:
Oh, yes. That looks great! Also seems to work with OverloadedStrings
in the natural way in GHC 7.6, although that isn't documented.
Now if only
to add 'import Prelude' to the top of their
code. Am I missing something?
On Tue, Jul 9, 2013 at 1:51 PM, Chris Smith cdsm...@gmail.com wrote:
Oh, never mind. In this case, I guess I don't need an extension at all!
On Tue, Jul 9, 2013 at 1:47 PM, Chris Smith cdsm...@gmail.com wrote:
Oh, yes
for the suggestion!
On Jul 9, 2013 4:20 PM, Aleksey Khudyakov alexey.sklad...@gmail.com
wrote:
On 10.07.2013 01:13, Chris Smith wrote:
Ugh... I take back the never mind. So if I replace Prelude with an
alternate definition, but don't use RebindableSyntax, and then hide
the base package, GHC still
So I've been thinking about something, and I'm curious whether anyone
(in particular, people involved with GHC) think this is a worthwhile
idea.
I'd like to implement an extension to GHC to offer a different
behavior for literals with polymorphic types. The current behavior is
something like:
, Jul 8, 2013 at 12:54 PM, Chris Smith cdsm...@gmail.com wrote:
So I've been thinking about something, and I'm curious whether anyone
(in particular, people involved with GHC) think this is a worthwhile
idea.
I'd like to implement an extension to GHC to offer a different
behavior for literals
I just fixed a fairly serious performance problem with postgresql-libpq's
binding to PQescapeStringConn; in was exhibiting a non-linear slowdown
when more strings are escaped and retained.
https://github.com/lpsmith/postgresql-libpq/commit/adf32ff26cdeca0a12fa59653b49c87198acc9ae
If you are
commands
from being issued in a single request, which would subtly change the
interface postgresql-simple exports.
Best,
Leon
On Mon, Jul 8, 2013 at 10:00 PM, Joey Adams joeyadams3.14...@gmail.comwrote:
On Mon, Jul 8, 2013 at 9:03 PM, Leon Smith leon.p.sm...@gmail.com wrote:
I just fixed a fairly
Hi all,
The other day, I wrote the following program in /tmp/test.hs
--8---cut here---start-8---
main = error An Error message
--8---cut here---end---8---
Then I ran the following:
,
| gds@lithium:/tmp$ runghc
I've been working on a new Haskell interface to the linux kernel's inotify
system, which allows applications to subscribe to and be notified of
filesystem events. An application first issues a system call that returns
a file descriptor that notification events can be read from, and then
issues
On Fri, May 10, 2013 at 9:00 AM, Andres Löh and...@well-typed.com wrote:
This twist is very simple to deal with if you have real existential
types,
with the relevant part of the interface looking approximately like
init :: exists a. IO (Inotify a)
addWatch :: Inotify a - FilePath - IO
On Fri, May 10, 2013 at 9:04 AM, MigMit miguelim...@yandex.ru wrote:
With that kind of interface you don't actually need existential types. Or
phantom types. You can just keep Inotify inside the Watch, like this:
Right, that is an alternative solution, but phantom types are a relatively
On Fri, May 10, 2013 at 5:49 PM, Alexander Solla alex.so...@gmail.comwrote:
I'm not sure if it would work for your case, but have you considered using
DataKinds instead of phantom types? At least, it seems like it would be
cheap to try out.
):
in this case the type system ensures that no references to the inotify
descriptor can exist after the callback returns.
Best,
Leon
On Fri, May 10, 2013 at 6:52 PM, Alexander Solla alex.so...@gmail.comwrote:
On Fri, May 10, 2013 at 3:31 PM, Leon Smith leon.p.sm...@gmail.comwrote:
On Fri, May 10
of the internet.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Apr 28, 2013 6:42 PM, Alexander Solla alex.so...@gmail.com wrote:
I think that much has to do with the historical division in computer
science. We have mathematics on the right hand, and electrical engineering
on the wrong one.
I've been called many things, but electrical engineer is a new
Oops, forgot to reply all.
-- Forwarded message --
From: Chris Smith cdsm...@gmail.com
Date: Apr 27, 2013 12:04 PM
Subject: Re: [Haskell-cafe] Markdown extension for Haddock as a GSoC project
To: Bryan O'Sullivan b...@serpentine.com
Cc:
I don't agree with this at all. Far more
in mailing list threads.)
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi
I think I've mastered much of functional programming with Haskell, or at
least I can write programs which process as desired.
However the existence of the let statement evades me apart from a quick
way to define a function. Then there is the in and where parts. Its
been suggested its to do
Mateusz Kowalczyk fuuze...@fuuzetsu.co.uk wrote:
I know that this year's projects aren't up
yet
Just to clarify, there isn't an official list of projects for you to choose
from. The project that you purpose is entirely up to you. There is a list
of recommendations at
It finally occurred to me how to get most of what I want, at least from a
functional perspective.Here's a sample GADT, with four categories of
constructor:
data Foo :: Bool - Bool - Bool - Bool - * where
A :: Foo True b c d
B :: Foo True b c d
C :: Foo a True c d
D :: Foo a
I've been toying with some type-level programming ideas I just can't quite
make work, and it seems what I really want is a certain kind of type
unification.
Basically, I'd like to introduce two new kind operators:
kind Set as -- a finite set of ground type terms of kind as
kind Range as =
On Sun, Dec 30, 2012 at 8:51 AM, David Thomas davidleotho...@gmail.comwrote:
Jon's suggestion sounds great.
The bike shed should be green.
There were plenty of proposals that would work fine. `case of` was great.
`\ of` was great. It's less obvious to me that stand-alone `of` is never
It would definitely be nice to be able to work with a partial Category
class, where for example the objects could be constrained to belong to a
class. One could then restrict a Category to a type level representation
of the natural numbers or any other desired set. Kind polymorphism should
make
Ketil Malde ke...@malde.org wrote:
The point of the point is that neither of these are translations of
literary works, there is no precedence for considering them as such, and
that reading somebody's work (whether literary or source code) before
writing one's own does not imply that the
On Thu, Dec 6, 2012 at 5:23 PM, Brandon Allbery allber...@gmail.com wro\
Both should be cdevs, not files, so they do not go through the normal
filesystem I/O pathway in the kernel and should support select()/poll().
(ls -l, the first character should be c instead of - indicating
the resounding success of the first Programming Languages
Mentoring Workshop at POPL 2012, we proudly announce the 2nd SIGPLAN
Programming Languages Mentoring Workshop (PLMW), co-located with POPL
2013 and organised by Nate Foster, Philippa Gardner, Alan Schmitt,
Gareth Smith, Peter Thieman and Tobias Wrigstad
= do
n' - fdReadBuf fd ptr n
if n /= n'
then fdReadAll fd (ptr `plusPtr` n') (n - n')
else return ()
main = do
(x,y) - twoRandomWord64s
S.hPutStrLn IO.stdout (S.append (showHex x) (showHex y))
On Wed, Nov 28, 2012 at 6:05 PM, Leon Smith leon.p.sm...@gmail.com wrote
I have some code that reads (infrequently) small amounts of data from
/dev/urandom, and because this is pretty infrequent, I simply open the
handle and close it every time I need some random bytes.
The problem is that I recently discovered that, thanks to buffering within
GHC, I was actually
random numbers or use the new Intel RDRAND
instruction (when available) would that interest you?
Also, what you are doing is identical to the entropy package on
hackage, which probably suffers from the same bug/performance issue.
Cheers,
Thomas
On Wed, Nov 28, 2012 at 11:38 AM, Leon Smith
...@snarc.org wrote:
On 11/28/2012 09:31 PM, Leon Smith wrote:
Quite possibly, entropy does seem to be a pretty lightweight
dependency...
Though doesn't recent kernels use rdrand to seed /dev/urandom if it's
available? So /dev/urandom is the most portable source of random numbers
on unix systems
Mentoring Workshop at POPL 2012, we proudly announce the 2nd SIGPLAN
Programming Languages Mentoring Workshop (PLMW), co-located with POPL
2013 and organised by Nate Foster, Philippa Gardner, Alan Schmitt,
Gareth Smith, Peter Thieman and Tobias Wrigstad.
The purpose of this mentoring workshop
Michael Snoyman mich...@snoyman.com wrote:
That said, it would be great to come up with ways to mitigate the
downsides of unbounded polymorphism that you bring up. One idea I've
seen mentioned before is to modify these extension so that they target
a specific instance of IsString/IsList, e.g.:
On Sun, Sep 2, 2012 at 9:40 AM, timothyho...@seznam.cz wrote:
The thing is, that one ALWAYS wants to create a union of types, and not
merely an ad-hock list of data declarations. So why does it take more code
to do the right thing(tm) than to do the wrong thing(r)?
You've said this a few
...@freegeek.orgwrote:
On 8/17/12 11:28 AM, Leon Smith wrote:
And the
difference between reactionary and proactive approaches I think is a
potential justification for the hard and soft upper bounds; perhaps
we
should instead call them reactionary and proactive upper bounds
instead.
I disagree
I see good arguments on both sides of the upper bounds debate, though at
the current time I think the best solution is to omit upper bounds (and I
have done so for most/all of my packages on hackage).But I cannot agree
with this enough:
On Thu, Aug 16, 2012 at 4:45 AM, Joachim Breitner
I am tentatively in agreement that upper bounds are causing more
problems than they are solving. However, I want to suggest that
perhaps the more fundamental issue is that Cabal asks the wrong person
to answer questions about API stability. As a package author, when I
release a new version, I
Twan van Laarhoven twa...@gmail.com wrote:
Would adding a single convenience function be low or high risk? You say it
is low risk, but it still risks breaking a build if a user has defined a
function with the same name.
Yes, it's generally low-risk, but there is *some* risk. Of course, it
On Tue, Jul 31, 2012 at 7:37 AM, Bertram Felgenhauer
bertram.felgenha...@googlemail.com wrote:
Note that MVar# itself cannot be unpacked -- the StgMVar record will
always be a separate heap object.
One could imagine a couple of techniques to unpack the MVar# itself, and
was curious if GHC
I admit I don't know exactly how MVars are implemented, but given that
they can be aliased and have indefinite extent, I would think that they
look something vaguely like a cdatatype ** var, basically a pointer to an
MVar (which is itself a pointer, modulo some other things such as a thread
Let me clarify a bit.
I am familiar with the source of Control.Concurrent.MVar, and I do see {-#
UNPACK #-}'ed MVars around, for example in GHC's IO manager. What I
should have asked is, what does an MVar# look like? This cannot be
inferred from Haskell source; though I suppose I could
Whoops, my earlier answer forgot to copy mailing lists... I would love to
see \of, but I really don't think this is important enough to make case
sometimes introduce layout and other times not. If it's going to obfuscate
the lexical syntax like that, I'd rather just stick with \x-case x of.
On
theValueRef isn't a pointer to theValue that you can use to somehow change
theValue (which is immutable).
theValueRef is a reference to a box that contains a totally separate,
mutable value.
When you use newIORef to create theValueRef, it's *copying* theValue into
the box. When you mutate
It turns out I'm filling in for a cancelled speaker at a local open
source user group, and doing a two-part talk, first on Haskell and
then Snap. For the Haskell part, I'd like a list of current places
the language is used in industry. I recall a few from Reddit stories
and messages here and
Hi folks
I need a little help.
I had a hiccup upgrading my Ubuntu system, and eventually did a fresh
install.
Its mostly fixed to my old favourite ways but I cannot remember what's
needed to install the stuff that the import IO statement uses!
--
Andrew
Oops, forgot to reply-all again...
-- Forwarded message --
From: Chris Smith cdsm...@gmail.com
Date: Fri, May 4, 2012 at 8:46 AM
Subject: Re: [Haskell-cafe] Problem with forall type in type declaration
To: Magicloud Magiclouds magicloud.magiclo...@gmail.com
On Fri, May 4, 2012
Nope - because at compile time, there's no way to know whether
createB's argument is a Safe or an Unsafe. That information only
exists at run time. Consider the following functions.
f :: Int - A
f x = if x 0 then Unsafe x else Safe x
g :: IO B
g = do x - getLine
return $ createB $ f
Out of curiousity, was this a plurality election (vote for one), or an
approval election (vote for many)?
On Tue, May 1, 2012 at 12:11 AM, Kazu Yamamoto k...@iij.ad.jp wrote:
Hello,
A twitter election on favorite programming language was held in Japan
and it appeared that Heskell is No. 10
Paolo,
This new pipes-core release looks very nice, and I'm happy to see
exception and finalizer safety while still retaining the general
structure of the original pipes package. One thing that Gabriel and
Michael have been talking about, though, that seems to be missing
here, is a way for a
Hmm, tough to answer without more to go on. I think if I were in your
shoes I'd ask myself where I'm most happy outside of programming. A lot of
good entry level open source work involves combining programming with other
skills.
Are you an artist? Have a talent for strong design and striking
Jerzy Karczmarczuk jerzy.karczmarc...@unicaen.fr wrote:
Le 26/03/2012 02:41, Chris Smith a écrit :
Of course there are rings for which it's possible to represent the
elements as lists. Nevertheless, there is definitely not one that
defines (+) = zipWith (+), as did the one I was responding
simpler than the code in the
question, and that defining a Num instance is possible, but a bad idea
because there's not a canonical way to define a ring on lists. The
rest of this seems to have devolved into quite a lot of bickering and
one-ups-manship, so I'll back out now.
--
Chris Smith
that obeys the
laws, so it's better to write no instance at all.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Jerzy Karczmarczuk jerzy.karczmarc...@unicaen.fr wrote:
Le 26/03/2012 01:51, Chris Smith a écrit :
instance (Num a) = Num [a] where
xs + ys = zipWith (+) xs ys
You can do this in the sense that it's legal Haskell... but it is a bad idea
[...]
It MIGHT be a ring
If you are willing to depend on a recent version of base where Num is no
longer a subclass of Eq and Show, it is also fine to do this:
instance Num a = Num (r - a) where
(f + g) x = f x + g x
fromInteger = const . fromInteger
and so on.
___
.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
than I do.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
about if you're willing to depend on a recent version
of base. Effectively, this means requiring a recent GHC, since I'm
pretty sure base is not independently installable.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
, but just because
re-implementing the whole front end of a compiler for even a limited
but useful subset of Haskell is a ludicrously ambitious and risky
project for GSoC.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
implementations than even six or seven at a student
project level.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
we should ideally call them just
effects. But since so many other languages use functions to
describe effectful actions, the term has stuck. So pretty much when
someone talks about side effects, even in Haskell, they means stateful
interaction with the world.
--
Chris Smith
, lazy evaluation
(which can be seen as a controlled benign mutation) is enough to
recover the optimal asymptotics.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
code without ensure.
It will then be interesting to see how that compares to Gabriel's
approach, which at this point we've heard a bit about but I haven't
seen.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org
)
Or, you may want to use a Maybe type for the return... which would
mean there *is* a Nothing value you can return:
tmp:: [(Int, Int)] - Int - Maybe (Int, Int)
tmp (x:xs) y
| y == 1 = Just x
| y 1 = tmp xs (y-1)
tmp [] y = Nothing
Does that help?
--
Chris Smith
Oh, and just to point this out, the function you're writing already
exists in Data.List. It's called (!!). Well, except that it's zero
indexed, so your function is more like:
tmp xs y = xs !! (y-1)
___
Haskell-Cafe mailing list
= case drop (y-1) xs of
[] - (0,0)
Just (x:_) - x
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
want the unawait to occur.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
can be exhausted, but when it is, idP will
await input, which will immediately terminate the (idP p) pipe,
producing the result from q, and ignoring p entirely.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org
).
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
, looks like idP is still the identity.
Of course, the real reason (aside from the fact that you can check and
see) is that forP isn't definable at all in Gabriel's pipes package.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
My first impression on this is that it seems a little vague, but
possibly promising.
I'd make it clearer that you plan to contribute to the existing UHC
stuff. A first glance left me with the impression that you wanted to
re-implement a JavaScript back end, which would of course be a
non-starter
On Dec 31, 2011 8:19 AM, Yves Parès limestrael+hask...@gmail.com wrote:
-- The plain Maybe type
data Maybe a = Just a | Nothing
-- The MaybeMonad
newtype MaybeMonad a = MM ( () - Maybe a )
That's what using Maybe as a monad semantically means, doesn't it?
I'd have to say no. That Maybe
.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
at is that we don't have a formal model of what an
IO action means. Nevertheless, we know because f is a function, that
when it is applied twice to the same argument, the values we get back
(which are IO actions, NOT integers) are the same.
--
Chris Smith
be to define the notion of
doing an action more precisely.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
, the sort of thing meant by the C programming
language by that word. Uncomputable is a very poor word for that idea.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
function on
non-bottom values. Not perfect, but close.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
NOT isolate in the type system. But that's for another time.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
or not is a
matter of your taste); it's directly relevant to day to day programming
in Haskell.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
as trivial as inlining by the compiler (see the ugly NOINLINE
annotations often used with unsafePerformIO tricks for initialization
code for an example).
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
the effect it
describes haven't been performed. It's exactly that distinction -- the
refusal to conflate evaluation with performing effects -- that is
referred to when Haskell is called a pure language.
--
Chris Smith
___
Haskell-Cafe mailing list
about the RTS implementation, which is of course plenty
effectful and involves lots of destructive updates. It's about the
language semantics.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
anything except those
expressions that deal explicitly with that type. THAT is why it's so
crucial that values of IO types are just ordinary values, not some kind
of magic thing with special evaluation rules tailored to them.
--
Chris Smith
___
Haskell
for that.
I've never been able to get wx to build, but gtk works fine. Others
(mostly those using macs) report the opposite.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Sun, 2011-11-06 at 17:25 -0500, Heller Time wrote:
unless the machine running the program using time-recurrence was traveling
across timezones (and the system was updating that fact)
Note that this is *not* an unusual situation at all these days. DST was
already mentioned, but also note
I've built a little program to compute the plus function remotely by
using Cloud Haskell:
http://pastebin.com/RK4AcWFM
but i faced an unfortunate complication, what i would like to do is to
send a function to another host, no matter if the function is locally
declared or at the top level.
In
On 1 Ott, 12:03, Erik de Castro Lopo mle...@mega-nerd.com wrote:
I was at the Haskell Symposium where this paper was presented. This
limitation is a known limitation and cannot currently be worked around
other than my moving whatever is required to the top level.
Erik
--
do you know if
On Sat, 2011-10-01 at 02:16 -0700, Fred Smith wrote:
In seems to me that in cloud haskell library the function's closures
can be computed only with top-level ones, is it possible to compute
the closure at runtime of any function and to send it to another host?
The current rule is a bit overly
On Tue, 2011-09-27 at 00:29 -0700, Donn Cave wrote:
It doesn't appear to me to be a technicality about the representation -
the value we're talking about excluding is not just represented as
greater than 0.3, it is greater than 0.3 when applied in computations.
Sure, the exact value is greater
On Tue, 2011-09-27 at 09:23 -0700, Donn Cave wrote:
I think it's more than reasonable to expect
[0.1,0.2..0.5] == [0.1,0.2,0.3,0.4,0.5]
and that would make everyone happy, wouldn't it?
But what's the justification for that? It *only* makes sense because
you used short decimal literals.
isn't in the list. You don't need
approximate behavior for those types, and if you really mean
takeWhile (= 20) [1,3..], then you should probably write that, rather
than a list range notation that doesn't mean the same thing.
--
Chris Smith
___
Haskell
On Tue, 2011-09-27 at 12:36 -0400, Steve Schafer wrote:
[0.1,0.2..0.5] isn't the problem. The problem is coming up with
something that not only works for [0.1,0.2..0.5], but also works for
[0.1,0.2..1234567890.5].
A good rule of thumb: For every proposal that purports to eliminate
having to
On Mon, 2011-09-26 at 18:53 +0200, Lennart Augustsson wrote:
If you do [0.1, 0.2 .. 0.3] it should leave out 0.3. This is floating
point numbers and if you don't understand them, then don't use them.
The current behaviour of .. for floating point is totally broken, IMO.
I'm curious, do you
On Mon, 2011-09-26 at 18:52 +0300, Yitzchak Gale wrote:
Chris Smith wrote:
class Ord a = Range a where...
Before adding a completely new Range class, I would suggest
considering Paul Johnson's Ranged-sets package:
Well, my goal was to try to find a minimal and simple answer that
doesn't
?
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Would it be an accurate summary of this thread that people are asking
for (not including quibbles about naming and a few types):
class Ord a = Enum a where
succ :: a - a
pred :: a - a
fromEnum :: a - Int(eger)
toEnum :: Int(eger) - a
-- No instance for Float/Double
class Ord a =
to add the new methods to RealFloat (breaking
on the bizarre off chance that someone has written a nonstandard
RealFloat instance), or add a new IEEE type class.
--
Chris Smith
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
On Fri, 2011-09-23 at 11:02 +1200, Richard O'Keefe wrote:
I do think that '..' syntax for Float and Double could be useful,
but the actual definition is such that, well, words fail me.
[1.0..3.5] = [1.0,2.0,3.0,4.0] Why did anyone ever think
_that_ was a good idea?
In case you meant
1 - 100 of 351 matches
Mail list logo