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. Re: Haddock and XML (Mateusz Kowalczyk)
2. Re: Haddock and XML (Emanuel Koczwara)
3. Re: Haddock and XML (Mateusz Kowalczyk)
4. Re: Haddock and XML (Emanuel Koczwara)
5. How would you write... (John M. Dlugosz)
6. Re: How would you write... (Norbert Melzer)
----------------------------------------------------------------------
Message: 1
Date: Mon, 21 Apr 2014 21:11:21 +0200
From: Mateusz Kowalczyk <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] Haddock and XML
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252
On 04/21/2014 09:08 PM, Emanuel Koczwara wrote:
> Hi,
>
> I want to include some XML in documentation produced by haddock. Here is
> my simple test case:
>
> http://lpaste.net/103047
>
> I generate the docs like this:
>
> haddock -h Doctest.hs
>
> Can I set some command line options or maybe there are some formatting
> options (like '@' in my example) to get this XML rendered correctly?
>
> Emanuel
>
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
Hi,
Birdtrack (?>? in front of a line) syntax takes everything verbatim so
it should do what you want. I'm not in an environment to test this at
the moment so let me know how it goes.
Thanks
--
Mateusz K.
------------------------------
Message: 2
Date: Mon, 21 Apr 2014 21:23:10 +0200
From: Emanuel Koczwara <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Haddock and XML
Message-ID: <1398108190.5327.29.camel@emanuel-laptop>
Content-Type: text/plain; charset="utf-8"
Hi,
> Birdtrack (?>? in front of a line) syntax takes everything verbatim so
> it should do what you want. I'm not in an environment to test this at
> the moment so let me know how it goes.
>From documentation (www.haskell.org/haddock/doc/html/ch03s08.html):
3.8.2. Special characters
The following characters have special meanings in documentation
comments: \, /, ', `, ", @, <. To insert a literal occurrence of one of
these special characters, precede it with a backslash (\).
Additionally, the character > has a special meaning at the beginning of
a line, and the following characters have special meanings at the
beginning of a paragraph: *, -. These characters can also be escaped
using \.
Furthermore, the character sequence >>> has a special meaning at the
beginning of a line. To escape it, just prefix the characters in the
sequence with a backslash.
Updated test case: http://lpaste.net/103051
Haddock error: http://lpaste.net/103052
Emanuel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5185 bytes
Desc: not available
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20140421/09a54867/attachment-0001.bin>
------------------------------
Message: 3
Date: Mon, 21 Apr 2014 21:48:51 +0200
From: Mateusz Kowalczyk <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] Haddock and XML
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252
On 04/21/2014 09:23 PM, Emanuel Koczwara wrote:
> Hi,
>
>> Birdtrack (?>? in front of a line) syntax takes everything verbatim so
>> it should do what you want. I'm not in an environment to test this at
>> the moment so let me know how it goes.
>
>
> From documentation (www.haskell.org/haddock/doc/html/ch03s08.html):
>
> 3.8.2. Special characters
>
> The following characters have special meanings in documentation
> comments: \, /, ', `, ", @, <. To insert a literal occurrence of one of
> these special characters, precede it with a backslash (\).
>
> Additionally, the character > has a special meaning at the beginning of
> a line, and the following characters have special meanings at the
> beginning of a paragraph: *, -. These characters can also be escaped
> using \.
>
> Furthermore, the character sequence >>> has a special meaning at the
> beginning of a line. To escape it, just prefix the characters in the
> sequence with a backslash.
>
I'm pretty well aware of the docs considering I now co-maintain Haddock ;)
> Updated test case: http://lpaste.net/103051
> Haddock error: http://lpaste.net/103052
Ok, firstly, code blocks are a paragraph-level entity: you'll need to
have an empty line before the code block (so just add an empty comment
line on line 2 of the comment. I forgot to mention this but I now see it.
If it still doesn't know let me know. Looking at that error, you're
probably using Haddock 2.13.x and what is most likely happening is that
it sees < and tries to parse a URL.
In Haddock 2.14.x (GHC 7.8.x required) this error would be gone (and the
fact that you need a newline would quickly become apparent).
If that *still* doesn't work, you can escape the ?<? with ?\?. If that
STILL doesn't work, you can use HTML escape codes for ?<? but I very
highly doubt that it will come to this.
If you're still having issues after inserting a newline, I'll try and
set up an environment and see what I can do for you.
> Emanuel
>
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
--
Mateusz K.
------------------------------
Message: 4
Date: Mon, 21 Apr 2014 22:20:41 +0200
From: Emanuel Koczwara <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Haddock and XML
Message-ID: <1398111641.5327.34.camel@emanuel-laptop>
Content-Type: text/plain; charset="us-ascii"
Hi,
Thanks, it works now.
Emanuel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5185 bytes
Desc: not available
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20140421/a0f9c92b/attachment-0001.bin>
------------------------------
Message: 5
Date: Tue, 22 Apr 2014 03:00:20 -0500
From: "John M. Dlugosz" <[email protected]>
To: [email protected]
Subject: [Haskell-beginners] How would you write...
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed
chain1 = [ translate x y $ color red $ Circle r | (x,y,r) <- pappus 100 [1..10]
]
The above is not right, as the comprehension syntax doesn't see the input range
buried in
an argument.
What's the right way to express
pap1 = translate x y $ color red $ Circle r
where (x,y,r) = pappus 100 1
where 1 is [1..10] and I get a list of results?
(pap1 does work as expected)
(1) how can the list comprehension syntax manage it,
(2) what's the recommended way to express that (not necessarily via list
comprehension
syntax) ?
?John
------------------------------
Message: 6
Date: Tue, 22 Apr 2014 10:17:48 +0200
From: Norbert Melzer <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] How would you write...
Message-ID:
<ca+bcvssqvgmwtn4fucpconwfddt-r75jzk-yz_+uffv8fn_...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
What Is the the type of your pappus function?
Am 22.04.2014 10:01 schrieb "John M. Dlugosz" <[email protected]>:
> chain1 = [ translate x y $ color red $ Circle r | (x,y,r) <- pappus 100
> [1..10] ]
>
> The above is not right, as the comprehension syntax doesn't see the input
> range buried in an argument.
>
> What's the right way to express
>
> pap1 = translate x y $ color red $ Circle r
> where (x,y,r) = pappus 100 1
>
> where 1 is [1..10] and I get a list of results?
> (pap1 does work as expected)
>
> (1) how can the list comprehension syntax manage it,
> (2) what's the recommended way to express that (not necessarily via list
> comprehension syntax) ?
>
> ?John
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20140422/099b6ab7/attachment.html>
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 70, Issue 42
*****************************************