Hello,
Can someone elucidate to me this behaviour from ghci 6.6.1? Why is the
type of sqlist specialised to Integer?
Prelude let sq x = x * x
Prelude :t sq
sq :: (Num a) = a - a
Prelude sq 2.5
6.25
Prelude :t map sq
map sq :: (Num a) = [a] - [a]
Prelude map sq [2.5]
[6.25]
This is all as I
Isaac Dupree wrote:
David Carter wrote:
This is all as I would expect so far, but:
Prelude let sqlist = map sq
Prelude :t sqlist
sqlist :: [Integer] - [Integer]
And indeed, I get
Prelude sqlist [2.5]
interactive:1:8:
No instance for (Fractional Integer)
... etc
The dreaded
Another newbie question, but I can't seem to find any answers on the web...
Can someone tell me what's wrong with this?
import qualified System.Posix.Directory as PD
readdirAll :: PD.DirStream - IO [String]
readdirAll d =
do dir - PD.readDirStream d
if dir ==
then return []
David Carter wrote:
Another newbie question, but I can't seem to find any answers on the
web...
Just figured it out myself ... I need a do after the else, of
course. (But I still think the error message is less than helpful!).
Sorry for the bandwidth
David
Can someone tell me what's
Hi,
I'm struggling with text-0.1 and text-icu-0.1, as announced at
http://www.serpentine.com/blog/2009/02/27/finally-fast-unicode-support-for-haskell/
The code in
http://pastebin.com/m7d8d9f91
is intended to read in a UTF-8 file a1.txt, reverse it twice, and
write it out to another UTF-8 file
Hi,
I am battling with Data.ByteString.Lazy.Char8, and currently losing.
Any help gratefully received. Here's my code:
import qualified Data.ByteString.Lazy.Char8 as B
import Text.Regex.Posix ((=~))
test = B.pack abc =~ B.pack b :: Bool
This works fine without the .Lazy, and is also fine under
http://pastebin.com/m88c7dc
It works fine if you delete the .Lazy.
Enjoy, and thanks...
David
On Thu, Apr 16, 2009 at 12:35 AM, Jason Dusek jason.du...@gmail.com wrote:
Could you pastebin something that demoes the error?
--
Jason Dusek
___