Skip to content

Implement "Meaningful main return types" proposal

The GHC Steering Committee has accepted the proposal "Meaningful main return types", which introduces:

  • a new extension MeaningfulMainReturn under which main is required to have a type IO (), IO Void or IO ExitCode, with the latter arranging to return the ExitCode on program termination; and
  • a new on-by-default warning -Wambiguous-main-return which will complain if main has a type other than IO () or IO Void (and MeaningfulMainReturn is not in effect).
Edited by Adam Gundry
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information