Skip to content

Enhancement: Improve GHC error messages #17

Description

@aneilmac

The error messages are unfriendly when using the GHC kernel.

For example a cell containing: (1 :: Int) / 2

produces the following error:

panic! (the 'impossible' happened)
  GHC version 9.15.20260331:
	<interactive>:1:12: error: [GHC-39999]
    • No instance for ‘Fractional Int’ arising from a use of ‘/’
    • In the expression: (1 :: Int) / 2
      In an equation for ‘it’: it = (1 :: Int) / 2

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

Ideally, the error message should not expose the panic! and leave the user with just the salient information:

<interactive>:1:12: error:
    * No instance for (Fractional Int) arising from a use of `/'
    * In the expression: (1 :: Int) / 2
      In an equation for `it': it = (1 :: Int) / 2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions