• Ryan Scott's avatar
    Make dataToQa aware of Data instances which use functions to implement toConstr · d2f9972a
    Ryan Scott authored
    Trac #10796 exposes a way to make `template-haskell`'s `dataToQa` function
    freak out if using a `Data` instance that produces a `Constr` (by means of
    `toConstr`) using a function name instead of a data constructor name. While
    such `Data` instances are somewhat questionable, they are nevertheless present
    in popular libraries (e.g., `containers`), so we can at least make `dataToQa`
    aware of their existence.
    In order to properly distinguish strings which represent variables (as opposed
    to data constructors), it was necessary to move functionality from `Lexeme` (in
    `ghc`) to `GHC.Lexeme` in a new `ghc-boot` library (which was previously named
    Reviewed By: goldfire, thomie
    Differential Revision: https://phabricator.haskell.org/D1313
    GHC Trac Issues: #10796
7.12.1-notes.rst 9.64 KB