Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. strange behavior (Luca Ciciriello)
2. Re: strange behavior (Daniel Fischer)
3. Re: Extract and integer from a ByteString
(Brandon S. Allbery KF8NH)
4. Re: strange behavior (SOLVED) (Luca Ciciriello)
----------------------------------------------------------------------
Message: 1
Date: Wed, 16 Jun 2010 15:34:15 +0200
From: Luca Ciciriello <[email protected]>
Subject: [Haskell-beginners] strange behavior
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi All.
I'm experimenting a strange behavior. I've wrote in Haskell a tool to automatic
generate C++ code. All works fine if I use GHCi or compile with GHC on WIndows,
but I see the strange behavior if I use my program on MacOS X 10.6.4
In example, the portion of code here below
createConstructor :: [String] -> String -> [String]
createConstructor xs classname = ["\t\tpublic: " ++ classname ++ "()\n\t\t{"]
++
["\t\t\t" ++ (snd
(makePair x)) ++ " = nullptr;" | x <- xs] ++
["\t\t}\n"]
on Windows generate:
public: DAT_CDM_Enum()
{
fileName = nullptr;
filePath = nullptr;
fileType = nullptr;
}
but on MacOS X 10.6.4 I have:
public: DAT_CDM_Enum()
{
= nullptr; fileName
= nullptr; filePath
fileType = nullptr;
}
This is a very weird behavior to me.
I'm using Haskell platform (ghc 6.12.1) on MacOS X and on Windows.
Any idea?
Luca
------------------------------
Message: 2
Date: Wed, 16 Jun 2010 15:51:42 +0200
From: Daniel Fischer <[email protected]>
Subject: Re: [Haskell-beginners] strange behavior
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
On Wednesday 16 June 2010 15:34:15, Luca Ciciriello wrote:
> Hi All.
> I'm experimenting a strange behavior. I've wrote in Haskell a tool to
> automatic generate C++ code. All works fine if I use GHCi or compile
> with GHC on WIndows, but I see the strange behavior if I use my program
> on MacOS X 10.6.4
>
> Any idea?
Does snd (makePair x) contain an '\r' character?
That would explain it.
>
> Luca
------------------------------
Message: 3
Date: Wed, 16 Jun 2010 10:22:07 -0400
From: "Brandon S. Allbery KF8NH" <[email protected]>
Subject: Re: [Haskell-beginners] Extract and integer from a ByteString
To: Tom Hobbs <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"
Skipped content of type multipart/alternative-------------- next part
--------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url :
http://www.haskell.org/pipermail/beginners/attachments/20100616/3ae9acc6/PGP-0001.bin
------------------------------
Message: 4
Date: Wed, 16 Jun 2010 16:48:25 +0200
From: Luca Ciciriello <[email protected]>
Subject: Re: [Haskell-beginners] strange behavior (SOLVED)
To: Daniel Fischer <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi Daniel.
I solved the question writing a little function that remove from the input file
all the \r chars and all the \n chars. So your first intuition seems be correct.
Thanks.
Luca.
On Jun 16, 2010, at 3:51 PM, Daniel Fischer wrote:
> On Wednesday 16 June 2010 15:34:15, Luca Ciciriello wrote:
>> Hi All.
>> I'm experimenting a strange behavior. I've wrote in Haskell a tool to
>> automatic generate C++ code. All works fine if I use GHCi or compile
>> with GHC on WIndows, but I see the strange behavior if I use my program
>> on MacOS X 10.6.4
>
>>
>> Any idea?
>
> Does snd (makePair x) contain an '\r' character?
> That would explain it.
>
>>
>> Luca
>
>
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 24, Issue 18
*****************************************