I have a question about how numeric classes and type checking works. I have two
functions that I think should behave the same but don't.
-- I want to split n things up using a given list of fractions
-- for example allocate' 100 [1/3,1/3,1/3]
-- [33,33,33]
allocate' n fs = vs
where vs = map
The important thing is the type of floor:
floor :: (Integral b, RealFrac a) = a - b
That is, if you have a real, fractional type, and you apply floor to
it, you'll get some integral type.
If you look at allocate', you'll see
allocate' :: (RealFrac in, Integral out) = in - [in] - [out]
When you
On Fri, Feb 29, 2008 at 7:09 PM, Lloyd Smith [EMAIL PROTECTED] wrote:
I mixed up my types when finding the allocated and unallocated,
but I am not sure why it produces an error when unallocated and
allocated are never used? Shouldn't the two functions be compiled
down to the same thing?
On Fri, 29 Feb 2008, Neil Mitchell wrote:
Hi Steve,
Would you consider adding auto-complete feature on Hoogle in the forth
coming release?
http://wiki.script.aculo.us/scriptaculous/show/Ajax.Autocompleter
I am slightly hoping that I'll be able to remove the Search button
entirely, and
Hi Henning,
For the WWW version of Hoogle this means that data must be transmitted
constantly and I think that rises a privacy problem. I don't want that my
typing behaviour can be observed and analysed somewhere. Such technique
would also require JavaScript which is disabled in browsers
On Thu, 2008-02-28 at 07:10 -0500, Kristofer Buffington wrote:
Hi
I installed ghc 6.8 from source and I've been installing packages from
hackage. I'm not sure when the problem started, but I've been getting
this error trying to install any cabal package.. accept apparently,
Cabal itself.
Interesting to know people are looking for \where\. As a fairly new
Haskeller, I bumped into frequent indentation issues (if-then-else,
case, where, let, do, etc) and sometimes not sure where to place
\where\ properly. Maybe beginners are having problem with syntax
more than other things and they
Hi
Interesting to know people are looking for \where\. As a fairly new
Haskeller, I bumped into frequent indentation issues (if-then-else,
case, where, let, do, etc) and sometimes not sure where to place
\where\ properly. Maybe beginners are having problem with syntax
more than other
On Thu, Feb 28, 2008 at 07:10:03AM -0500, Kristofer Buffington wrote:
I installed ghc 6.8 from source and I've been installing packages from
hackage. I'm not sure when the problem started, but I've been getting
this error trying to install any cabal package.. accept apparently,
Cabal itself.
On 2008-02-29, Neil Mitchell [EMAIL PROTECTED] wrote:
Hi
Interesting to know people are looking for \where\. As a fairly new
Haskeller, I bumped into frequent indentation issues (if-then-else,
case, where, let, do, etc) and sometimes not sure where to place
\where\ properly. Maybe
1)
http://research.sun.com/spotlight/2007/2007-08-13_transactional_memory.html
2)
http://www.jamesward.org/wordpress/2007/11/29/can-sun-monetize-java-with-transactional-memory/
3)http://research.sun.com/scalable/pubs/index.html
http://research.sun.com/scalable/
On 2/29/08, Benjamin L.
jay:
Don Stewart [EMAIL PROTECTED]:
jay:
Don Stewart [EMAIL PROTECTED]:
jay:
I also have constants that are too large to compile. I am resigned to
loading them from data files--other solutions seem even worse.
...
Data.Binary eases the irritation somewhat.
Did you try
I generally find that I'm wrapping sockets in the same functions a lot
and now I'm looking writings code which works with both Sockets and
SSL connections. So I wrote a module, presumptuously called
Network.Connection, although I'm not actually going to try and take
that name (even in Hackage)
jay:
Don Stewart [EMAIL PROTECTED]:
jay:
Don Stewart [EMAIL PROTECTED]:
jay:
Don Stewart [EMAIL PROTECTED]:
jay:
I also have constants that are too large to compile. I am resigned to
loading them from data files--other solutions seem even worse.
...
Data.Binary eases
Hello everyone,
While fooling about with generalized tries a night or two ago, I found myself
once again interacting with fixed points of shape functors and the like, and
so decided it was time to finish cabalizing David Menendez' excellent
category theory inspired modules.[1]
So, it is my
Hi,
so let's say I want to generate a list of N random floats. The elegant
way of doing it would be to create an infinite lazy list of floats and
take the first N, but for N = 1,000,000 or more, this overflows the
stack. The reason is apparently that the take function is not
tail-recursive,
On Sat, Mar 1, 2008 at 6:50 AM, Milos Hasan [EMAIL PROTECTED] wrote:
Hi,
so let's say I want to generate a list of N random floats. The elegant
way of doing it would be to create an infinite lazy list of floats and
take the first N, but for N = 1,000,000 or more, this overflows the
Milos Hasan wrote:
so let's say I want to generate a list of N random floats. The elegant
way of doing it would be to create an infinite lazy list of floats and
take the first N, but for N = 1,000,000 or more, this overflows the
stack. The reason is apparently that the take function is not
18 matches
Mail list logo