Skip to content

Bug: Error with num coercion in MicroHS kernel #16

Description

@aneilmac

Repro Steps

  1. Have the MicroHS kernel running
  2. Use the following snippet
    newtype Apple = Apple Int deriving (Show, Num) 
    
    (1 :: Apple) + (2 :: Apple)
  3. Observe that following error:
    Runtime error: error: "<repl>": line 7, col 43: undefined value: B@.coerce
    

This error is more severe than normal as all cells return the above error once it is encountered, the only fix is resetting the kernel.

I can confirm that the GHC kernel is not affected and correctly returns 3.

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