Skip to content

Disallow hiding superclasses of exported classes #3132

@metaleap

Description

@metaleap

Using the current master branch, compiling a purescript project containing these two modules Mini.TCls3 and Mini.TClsImpl3 errors not with a description of what's wrong (if anything) in the source but rather:

* Building project in /home/rox/c/ps/gonad-demos
Compiling Mini.TCls3
Compiling Mini.TClsImpl3
purs: An internal error occurred during compilation: "newDictionaries: type class lookup failed"
Please report this at https://github.com/purescript/purescript/issues
CallStack (from HasCallStack):
  error, called at src/Language/PureScript/Crash.hs:24:3 in purescript-0.11.6-8vLqjNaSDrU71uAVwdv7Dy:Language.PureScript.Crash
  internalError, called at src/Language/PureScript/TypeChecker/Entailment.hs:578:40 in purescript-0.11.6-8vLqjNaSDrU71uAVwdv7Dy:Language.PureScript.TypeChecker.Entailment
purs: thread blocked indefinitely in an MVar operation
* ERROR: Subcommand terminated with exit code 1

In this case purs (built from current master) was invoked via this pulp command-line:

pulp build -- --source-maps  --comments

The crash no longer occurs when class Zero, zilch, class One, ein, uno are added to the exports of Mini/TCls3.purs (equivalently in this case to simply ditching the exports ie. exporting-everything-implicitly). But regardless, purs probably wants to error cleanly not crash-ly =)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions