three dots of :browse

Sean Leather leather at cs.uu.nl
Sat Apr 24 04:12:35 EDT 2010


> If I use :browse a module with GHC 6.12, it sometimes displays
> garbage. Here is an example:
>
> Prelude> :browse Data.IP
> data AddrRange a
>  = iproute-0.2.0:Data.IP.Range.AddrRange {addr :: a,
>                                           mask :: a,
>                                           mlen :: Int}
> (snip)
> data AddrRange a
>  = iproute-0.2.0:Data.IP.Range.AddrRange {..., mask :: a, ...}
> data AddrRange a
>  = iproute-0.2.0:Data.IP.Range.AddrRange {..., mlen :: Int}
>
>
> "..." is the garbage. Due to this, I cannot parse the output of
> :browse. This is not displayed with GHC 6.10.
>
> Q1) What is the intention of "..."?
>

I believe it's related to the module export list.

> module Test (y) where
> data R = R { x :: Char, y :: Int, z :: Float }

*Test> :browse
data Test.R = Test.R {..., y :: Int, ...}

Q2) How to prevent it so that I can obtain output which I can parse?
>

Export all the labels, perhaps?

Regards,
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20100424/88e5554a/attachment.html


More information about the Glasgow-haskell-users mailing list