Allow Haddock comments before function arguments.
authorIavor Diatchki <iavor.diatchki@gmail.com>
Thu, 7 Jun 2018 17:32:27 +0000 (13:32 -0400)
committerBen Gamari <ben@smart-cactus.org>
Thu, 7 Jun 2018 22:06:31 +0000 (18:06 -0400)
commit200c8e046b44e38698d7e7bb9801f306e9570a0a
treec3e815b1c59d4fbf1c03cf4bffccf609ea1c9a63
parentdc8c03b2a5c70d3169e88d407f3ef28e0cb26af5
Allow Haddock comments before function arguments.

Currently, documentation strings on function arguments has to be written
after the argument (i.e., using `{-^ -}` comments).  This patch allows
us to use `{-| -}` comments to put the comment string before an
argument.   The same works for the results of functions.

Reviewers: bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie, mpickering, carter

Differential Revision: https://phabricator.haskell.org/D4767
compiler/parser/Parser.y
testsuite/tests/haddock/should_compile_flag_haddock/haddockA038.stderr
testsuite/tests/haddock/should_compile_flag_haddock/haddockA039.hs [new file with mode: 0644]
testsuite/tests/haddock/should_compile_flag_haddock/haddockA039.stderr [new file with mode: 0644]