[GHC] #11551: Get doctests into testsuite
GHC
ghc-devs at haskell.org
Thu Jan 5 11:19:16 UTC 2017
#11551: Get doctests into testsuite
-------------------------------------+-------------------------------------
Reporter: lwm | Owner:
Type: task | Status: new
Priority: normal | Milestone:
Component: Core Libraries | Version: 7.10.3
Resolution: | Keywords:
| documentation, doctest
Operating System: Unknown/Multiple | Architecture:
Type of failure: Documentation | Unknown/Multiple
bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by phadej):
you have to compile doctests against the same compiler you are testing
with.
- A compiled ghc master
- patched ghc-paths: https://github.com/simonmar/ghc-paths/pull/9 (not
sure if actually necessary)
- compiled doctest using just compiled ghc
- `.../build/doctest/doctest libraries/base/Data/Maybe.hs`
- profit
{{{
Examples: 44 Tried: 44 Errors: 0 Failures: 0
}}}
Maybe, Char and Either pass, Functor got:
{{{
### Failure in libraries/base/Data/Functor.hs:49: expression `show <$>
Nothing'
expected: "Nothing"
but got: ""
"\ESC[;1m<interactive>:31:6: \ESC[;1m\ESC[31merror:\ESC[;1m"
" Ambiguous occurrence \8216<$>\8217"
" It could refer to either \8216Data.Functor.<$>\8217,"
" defined at
libraries/base/Data/Functor.hs:73:1"
" or \8216Prelude.<$>\8217,"
" imported from \8216Prelude\8217
(and originally defined in \8216Data.Functor\8217)\ESC[0m"
}}}
nasty colorcodes!
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11551#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list