> Can anyone please help me.
> How can you divide two floats? (and return a float, even if they divide
> equally)
> Ie (something like...) div 2.4 1.2 ---> 2.0
The above doesn't work since div can only be applied to integral numbers:
div :: Integral a => a -> a -> a
What you n
> > Sun, 21 May 2000 17:26:13 +1000, Fergus Henderson <[EMAIL PROTECTED]> pisze:
> On a related note, Hugs and ghc both allow the following module
>
> module Bar(List(..)) where
> type List = []
>
> without complaint, but according to the Haskell report (5.2) the
> syntax `(..)' should only be u
>Hi,
>If I have the folowwing declaration:
>class Soup where
>...
>
>instance Soup String where
>...
>
>instance Soup t => Soup [t] where
>...
>
>This will lead to an error: "instance overlapping".
>
>Is there anyway to solve this?
Yes -- if you are using Hugs98 then you need to use the comman
Kevin Atkinson wrote:
>Could someone tell me why this is not allowed and if there is a possible
>workaround. (I know this example seems pointless however it is a real
>concern as having bulk types in the context is something I would really
>like to do.)
Here's the not allowed bit:
>class Listab
>>Steve Frampton <[EMAIL PROTECTED]> wrote:
>>> foo x = ['1'] ++ foo(x div 10)
>>> *** term : foo
>>> *** type : ((a -> a -> a) -> b -> Int) -> [Char]
>>> *** does not match : Int -> [Char]
>Can someone please explain how to decipher the type line in this error
>messa
On Tue, 2 Sep 1997, Martin Nor{ick wrote,
> Regarding comprehensions: hugs gives me an error for:
> [a | a <- [10], b <- getLine ]
> and says that getLine must be of type [a], but why? b is not used!
Since [10] is a list, this comprehension is used to generate a list, and
therefore b must take i