[GHC] #8822: Allow -- ^ Haddock syntax on record constructors
GHC
ghc-devs at haskell.org
Tue Feb 25 04:58:25 UTC 2014
#8822: Allow -- ^ Haddock syntax on record constructors
-------------------------------------+-------------------------------------
Reporter: Fuuzetsu | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler (Parser) | Version: 7.9
Keywords: | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
-------------------------------------+-------------------------------------
Original ticket is on Haddock Trac
[http://trac.haskell.org/haddock/ticket/144 here] which I'm opening here
as it requires lexer/parser changes.
The idea is that given something like
{{{
-- | A tree with labeled internal nodes
data Tree =
Empty -- ^ Leaf
| Branch -- ^ Internal node
{ label :: a -- ^ Node label
, subtrees :: [Tree] -- ^ List of subtrees
}
}}}
we'd like it to parse as the user would expect instead of failing. We're
currently forced to do something like
{{{
-- | A tree with labeled internal nodes
data Tree =
Empty -- ^ Leaf
| -- | Internal node
Branch
{ label :: a -- ^ Node label
, subtrees :: [Tree] -- ^ List of subtrees
}
}}}
which is quite ugly. I can't think of a reason why the first form wouldn't
be allowed.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8822>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list