Skip to content

Introduce `MaybeValidated` type to remove invalid states

John Ericson requested to merge Ericson2314/ghc:check-iface-result-types into master

The old return type (RecompRequired, Maybe _), was confusing because it was inhabited by values like (UpToDate, Nothing) that made no sense.

The new type ensures:

  • you must provide a value if it is up to date.

  • you must provide a reason if you don't provide a value.

it is used as the return value of:

  • checkOldIface
  • checkByteCode
  • checkObjects
Edited by John Ericson

Merge request reports