• David Feuer's avatar
    Prohibit RULES changing constructors · bc332b31
    David Feuer authored
    Previously, `RULES` like
    {-# RULES
    "JustNothing" forall x . Just x = Nothing
    were allowed. Simon Peyton Jones say this seems to have been a
    mistake, that such rules have never been supported intentionally,
    and that he doesn't know if they can break in horrible ways.
    Furthermore, Ben Gamari and Reid Barton are considering trying to
    detect the presence of "static data" that the simplifier doesn't
    need to traverse at all. Such rules do not play well with that.
    So for now, we ban them altogether. In most cases, it's possible
    to work around the ban using hand-written wrapper functions.
    Reviewers: austin, simonpj, bgamari
    Reviewed By: simonpj, bgamari
    Subscribers: thomie
    Differential Revision: https://phabricator.haskell.org/D3169
all.T 3.68 KB