• Roland Senn's avatar
    Use export list of Main module in function TcRnDriver.hs:check_main (Fix #16453) · 703221f4
    Roland Senn authored
    - Provide the export list of the `Main` module as parameter to the
      `compiler/typecheck/TcRnDriver.hs:check_main` function.
    - Instead of `lookupOccRn_maybe` call the function `lookupInfoOccRn`.
      It returns the list `mains_all` of all the main functions in scope.
    - Select from this list `mains_all` all `main` functions that are in
      the export list of the `Main` module.
    - If this new list contains exactly one single `main` function, then
      typechecking continues.
    - Otherwise issue an appropriate error message.
    703221f4
Code owners : Ben Gamari
T16453M2.hs 73 Bytes