doctest seems to do all manner of weird things with the GHC flags passed to it, see https://github.com/sol/doctest/blob/6daf5b9623001ad8ff30e59a7a8add2840f1cac7/src/Run.hs#L57. This can be disabled by passing --no-magic to doctest. With that flag everything seems to work even with new-build :)
FYI that flag was added in 0.11.3 I think, see sol/doctest@132e1b9.
doctest seems to do all manner of weird things with the GHC flags passed to it, see https://github.com/sol/doctest/blob/6daf5b9623001ad8ff30e59a7a8add2840f1cac7/src/Run.hs#L57. This can be disabled by passing
--no-magicto doctest. With that flag everything seems to work even with new-build :)FYI that flag was added in 0.11.3 I think, see sol/doctest@132e1b9.