• Sylvain Henry's avatar
    Rename literal constructors · 13bb4bf4
    Sylvain Henry authored and Ben Gamari's avatar Ben Gamari committed
    In a previous patch we replaced some built-in literal constructors
    (MachInt, MachWord, etc.) with a single LitNumber constructor.
    In this patch we replace the `Mach` prefix of the remaining constructors
    with `Lit` for consistency (e.g., LitChar, LitLabel, etc.).
    Sadly the name `LitString` was already taken for a kind of FastString
    and it would become misleading to have both `LitStr` (literal
    constructor renamed after `MachStr`) and `LitString` (FastString
    variant). Hence this patch renames the FastString variant `PtrString`
    (which is more accurate) and the literal string constructor now uses the
    least surprising `LitString` name.
    Both `Literal` and `LitString/PtrString` have recently seen breaking
    changes so doing this kind of renaming now shouldn't harm much.
    Reviewers: hvr, goldfire, bgamari, simonmar, jrtc27, tdammers
    Subscribers: tdammers, rwbarton, thomie, carter
    Differential Revision: https://phabricator.haskell.org/D4881