Skip to content

Error when deriving functor from newtype #4555

Open

Description

@MitchStevens

Description

When the below code is compiled I get the error

purs: An internal error occurred during compilation: unifyTypes: unspecified skolem scope
Please report this at https://github.com/purescript/purescript/issues
CallStack (from HasCallStack):
  error, called at src/Language/PureScript/Crash.hs:10:3 in purescript-0.15.15-A1Hsm5jzdq3K6f9tg0KeFN:Language.PureScript.Crash
  internalError, called at src/Language/PureScript/TypeChecker/Unify.hs:124:12 in purescript-0.15.15-A1Hsm5jzdq3K6f9tg0KeFN:Language.PureScript.TypeChecker.Unify

To Reproduce

type Config = { f :: forall x. x }
newtype A a = A (ReaderT Config Aff a)
derive newtype instance Functor A

Expected behavior

I expect this code to compile successfully

PureScript version

0.15.15

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions