Re: [Haskell-cafe] Haddock question

2010-07-21 Thread Ivan Lazar Miljenovic
"S. Doaitse Swierstra"  writes:

> Unfortunately I get for input:
>
> -- | We can now run the parser @`pa`@ on input \"a\", which succeeds: 
> -- @ 
> --   Result: \"a\"
> --   Second line
> -- @
>
> the output
>
> We can now run the parser pa on input "a", which succeeds: Result: "a"
> Second line

Methinks you need a blank (comment) line before the @:

-- | We can now run the parser @`pa`@ on input \"a\", which succeeds: 
--
-- @  
--   Result: \"a\"
--   Second line  
-- @  

>
> Doaitse
>
>
>
>
>
>
> On 21 jul 2010, at 16:17, Daniel Fischer wrote:
>
>> On Wednesday 21 July 2010 16:09:37, S. Doaitse Swierstra wrote:
>>> I am trying to document my parser library. In order to do so I should
>>> like to include some example output in my haddock documentation. I fail
>>> to see however how to get a block of output into the haddock part.
>>> 
>>> E.g.
>>> 
>>> -- | We can now run the parser @`pa`@ on input \"a\", which succeeds:
>>> -- @ Result: \"a\"
>>> -- @
>> 
>> -- | We can now ...
>> --
>> -- @
>> --   Result: \"a\"
>> -- @
>> --
>> --  In further news, ...
>> 
>>> 
>>> does not put the Result ... on a separate line, and if I have several
>>> lines of output they are concatenated.
>>> 
>>> How to proceed,
>>> 
>>> Doaitse
>>> 
>> 
>> ___
>> Haskell-Cafe mailing list
>> Haskell-Cafe@haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haddock question

2010-07-21 Thread Daniel Fischer
On Wednesday 21 July 2010 16:23:48, S. Doaitse Swierstra wrote:
> Unfortunately I get for input:
>
> -- | We can now run the parser @`pa`@ on input \"a\", which succeeds:
> -- @
> --   Result: \"a\"
> --   Second line
> -- @
>
> the output

You need to separate the @'d paragraph from the rest of the comment by a 
blank comment line.


-- | We can now run the parser @`pa`@ on input \"a\", which succeeds:
--
-- @
--   Result: \"a\"
--   Second line
-- @

ought to work as intended.

>
> We can now run the parser pa on input "a", which succeeds: Result: "a"
> Second line
>
> Doaitse
>
> On 21 jul 2010, at 16:17, Daniel Fischer wrote:
> > On Wednesday 21 July 2010 16:09:37, S. Doaitse Swierstra wrote:
> >> I am trying to document my parser library. In order to do so I should
> >> like to include some example output in my haddock documentation. I
> >> fail to see however how to get a block of output into the haddock
> >> part.
> >>
> >> E.g.
> >>
> >> -- | We can now run the parser @`pa`@ on input \"a\", which succeeds:
> >> -- @ Result: \"a\"
> >> -- @
> >
> > -- | We can now ...
> > --
> > -- @
> > --   Result: \"a\"
> > -- @
> > --
> > --  In further news, ...
> >
> >> does not put the Result ... on a separate line, and if I have several
> >> lines of output they are concatenated.
> >>
> >> How to proceed,
> >>
> >> Doaitse
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haddock question

2010-07-21 Thread S. Doaitse Swierstra
Unfortunately I get for input:

-- | We can now run the parser @`pa`@ on input \"a\", which succeeds: 
-- @ 
--   Result: \"a\"
--   Second line
-- @

the output

We can now run the parser pa on input "a", which succeeds: Result: "a" Second 
line

Doaitse






On 21 jul 2010, at 16:17, Daniel Fischer wrote:

> On Wednesday 21 July 2010 16:09:37, S. Doaitse Swierstra wrote:
>> I am trying to document my parser library. In order to do so I should
>> like to include some example output in my haddock documentation. I fail
>> to see however how to get a block of output into the haddock part.
>> 
>> E.g.
>> 
>> -- | We can now run the parser @`pa`@ on input \"a\", which succeeds:
>> -- @ Result: \"a\"
>> -- @
> 
> -- | We can now ...
> --
> -- @
> --   Result: \"a\"
> -- @
> --
> --  In further news, ...
> 
>> 
>> does not put the Result ... on a separate line, and if I have several
>> lines of output they are concatenated.
>> 
>> How to proceed,
>> 
>> Doaitse
>> 
> 
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haddock question

2010-07-21 Thread Daniel Fischer
On Wednesday 21 July 2010 16:09:37, S. Doaitse Swierstra wrote:
> I am trying to document my parser library. In order to do so I should
> like to include some example output in my haddock documentation. I fail
> to see however how to get a block of output into the haddock part.
>
> E.g.
>
> -- | We can now run the parser @`pa`@ on input \"a\", which succeeds:
> -- @ Result: \"a\"
> -- @

-- | We can now ...
--
-- @
--   Result: \"a\"
-- @
--
--  In further news, ...

>
> does not put the Result ... on a separate line, and if I have several
> lines of output they are concatenated.
>
> How to proceed,
>
> Doaitse
>

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haddock question

2010-07-21 Thread S. Doaitse Swierstra
I am trying to document my parser library. In order to do so I should like to 
include some example output in my haddock documentation. I fail to see however 
how to get a block of output into the haddock part.

E.g.

-- | We can now run the parser @`pa`@ on input \"a\", which succeeds: 
-- @ Result: \"a\"
-- @

does not put the Result ... on a separate line, and if I have several lines of 
output they are concatenated.

How to proceed,

Doaitse

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haddock question

2010-07-21 Thread S. Doaitse Swierstra
I am trying to document my parser library. In order to do so I should like to 
include some example output in my haddock documentation. I fail to see however 
how to get a block of output into the haddock part.

E.g.

-- | We can now run the parser @`pa`@ on input \"a\", which succeeds: 
-- @ Result: \"a\"
-- @

does not put the Result ... on a separate line, and if I have several lines of 
output they are concatenated.

 How to proceed,

 Doaitse


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haddock question: hiding internal instances

2010-01-15 Thread Niklas Broberg
>> The question I have is this: How can I get Haddock to omit listing
>> instances of package-internal data types for exported classes?
>
> You currently can't, unfortunately. See:
>
>  http://trac.haskell.org/haddock/ticket/37

Roger that, cc added.

Cheers,

/Niklas
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haddock question: hiding internal instances

2010-01-15 Thread Ross Paterson
On Fri, Jan 15, 2010 at 09:16:03PM +0100, Niklas Broberg wrote:
> The question I have is this: How can I get Haddock to omit listing
> instances of package-internal data types for exported classes?

It's a known limitation: http://trac.haskell.org/haddock/ticket/37
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haddock question: hiding internal instances

2010-01-15 Thread David Waern
2010/1/15 Niklas Broberg :
> Hi all,
>
> The question I have is this: How can I get Haddock to omit listing
> instances of package-internal data types for exported classes?

You currently can't, unfortunately. See:

  http://trac.haskell.org/haddock/ticket/37

David
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haddock question: hiding internal instances

2010-01-15 Thread Niklas Broberg
Hi all,

The question I have is this: How can I get Haddock to omit listing
instances of package-internal data types for exported classes?

Here's an example of what I mean:

http://hackage.haskell.org/packages/archive/haskell-src-exts/1.6.0/doc/html/Language-Haskell-Exts-Pretty.html#t%3APretty

At the very end of the rather extensive list of instances, you'll find
the following:

SrcInfo loc => Pretty (PAsst loc)
SrcInfo loc => Pretty (PType loc)
SrcInfo loc => Pretty (PContext loc)
SrcInfo loc => Pretty (ParseXAttr loc)
SrcInfo loc => Pretty (PFieldUpdate loc)
SrcInfo loc => Pretty (PExp loc)

All these data types are internal to the package, and the module they
live in is marked with 'hide'. As expected no links are generated to
any documentation for these data types, but I want them removed from
this list entirely. They are internal after all, so what's the point
of listing them? How can I achieve this?

Cheers,

/Niklas
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] haddock question [solved]

2008-11-27 Thread allan
Ross Paterson wrote:
> On Thu, Nov 27, 2008 at 11:52:04AM +, allan wrote:
>> I'm trying to locally build the documentation for the haskell-src-exts 
>> package and running into a bit of bother.
>> If I run: cabal haddock
>> I get the error:
>> haddock: parse error in doc string
> 
> The problem is that several of the modules (not Language.Haskell.Exts,
> but modules it imports) have headers containing a field "Original"
> that haddock doesn't recognize.
> 

a ha, Thank you, that has fixed the problem.

regards
allan



-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] haddock question

2008-11-27 Thread Ross Paterson
On Thu, Nov 27, 2008 at 11:52:04AM +, allan wrote:
> I'm trying to locally build the documentation for the haskell-src-exts 
> package and running into a bit of bother.
> If I run: cabal haddock
> I get the error:
> haddock: parse error in doc string

The problem is that several of the modules (not Language.Haskell.Exts,
but modules it imports) have headers containing a field "Original"
that haddock doesn't recognize.

Of course the lack of any location information in the error message
is a deficiency in haddock.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] haddock question

2008-11-27 Thread allan
Dear all

I'm trying to locally build the documentation for the haskell-src-exts package 
and running into a bit of bother.
If I run: cabal haddock
I get the error:
haddock: parse error in doc string

so: cabal haddock -v
Doesn't really provide any extra information, it gives me the exact haddock 
command-line used but there is still no way (I can see) of obtaining the source 
file containing the parse error.

So I downloaded via darcs the latest haddock source code and installed that but 
I get the exact same error message.
I tried grepping in the haddock source code for that particular error message 
(and portions of it) but I couldn't find it.

Finally I tried running haddock on a single source file:
haddock Language/Haskell/Exts.hs 
and even this gets the exact same error message, which is somewhat bizarre 
since that file does not contain any documentation strings.

Anyone have any ideas?

regards
allan

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haddock question

2006-11-26 Thread Luis Cabellos

Ok, With your example I realized that I don't write the type signature
declaration of anything. Without the type Haddock don't put the
comments from code in the generated doc. Now it works.

Thanks. Luis

On 11/26/06, Donald Bruce Stewart <[EMAIL PROTECTED]> wrote:

It appears to be an error in current haddock when interacting with ghc
6.6.

If you use haddock 0.8, the error message is there, but the
documentation is still generated, so should be ok:

$ runhaskell Setup.lhs haddock
Preprocessing executables for haq-0.0...
Running Haddock for haq-0.0...
Warning: cannot use package haq-0.0:
   ghc-pkg failed
Warning: cannot use package base-2.0:
   HTML directory /home/dons/share/ghc-6.6/html/libraries/base does not 
exist.
Warning: Main: the following names could not be resolved:
IO

$ w3m -dump dist/doc/html/haq/Main.html
 haq Contents Index
Main
Synopsis
main :: IO ()
Documentation
main :: IO ()
main runs the main program
Produced by Haddock version 0.8

So grab haddock 0.8 and try that.

http://haskell.org/haddock/#Download

-- Don


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haddock question

2006-11-25 Thread Donald Bruce Stewart
zhen.sydow:
> Hello,
> 
> I follow the How to Write a Haskell program from
> http://www.haskell.org/haskellwiki/How_to_write_a_Haskell_program, but
> I have a problem with Haddock.
> 
> I use Windows XP, I when I install GHC + Haddock I have this warning output
> 
> C:\code\haskell\test> runhaskell Setup.hs haddock
> Preprocessing executables for Test-0.0...
> Running Haddock for Test-0.0...
> Warning: cannot use package Test-0.0:
>   ghc-pkg failed
> Warning: cannot use package base-2.0:
> does not exist.y $topdir\html\libraries\base
> 
> There is something generated in dist\doc\html\test   path but only the
> main function page but it don't has the comments from *.hs file.
> 
> I use --prefix=c:\programs instead of --prefix=$HOME in configure.
> Because I am working on Windows.
> 
> I don't use darcs, but I think that it's not the problem.

It appears to be an error in current haddock when interacting with ghc
6.6.

If you use haddock 0.8, the error message is there, but the
documentation is still generated, so should be ok:

$ runhaskell Setup.lhs haddock
Preprocessing executables for haq-0.0...
Running Haddock for haq-0.0...
Warning: cannot use package haq-0.0:
   ghc-pkg failed
Warning: cannot use package base-2.0:
   HTML directory /home/dons/share/ghc-6.6/html/libraries/base does not 
exist.
Warning: Main: the following names could not be resolved:
IO

$ w3m -dump dist/doc/html/haq/Main.html 
 haq Contents Index
Main
Synopsis
main :: IO ()
Documentation
main :: IO ()
main runs the main program
Produced by Haddock version 0.8

So grab haddock 0.8 and try that.

http://haskell.org/haddock/#Download

-- Don 
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haddock question

2006-11-25 Thread Luis Cabellos

Hello,

I follow the How to Write a Haskell program from
http://www.haskell.org/haskellwiki/How_to_write_a_Haskell_program, but
I have a problem with Haddock.

I use Windows XP, I when I install GHC + Haddock I have this warning output

C:\code\haskell\test> runhaskell Setup.hs haddock
Preprocessing executables for Test-0.0...
Running Haddock for Test-0.0...
Warning: cannot use package Test-0.0:
  ghc-pkg failed
Warning: cannot use package base-2.0:
does not exist.y $topdir\html\libraries\base

There is something generated in dist\doc\html\test   path but only the
main function page but it don't has the comments from *.hs file.

I use --prefix=c:\programs instead of --prefix=$HOME in configure.
Because I am working on Windows.

I don't use darcs, but I think that it's not the problem.

--
Thanks a lot, Luis Cabellos
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe