Skip to content

Improve error location information inside type class instance lookup #1433

@hdgarrood

Description

@hdgarrood

I'm currently converting the tests in purescript-sequences to use newtype wrappers to avoid orphan instances. For example, this file contains some of the offending tests. In these files, all the tests are defined using one big do block.

In my working copy, I now have the necessary newtype wrappers, and they all have Arbitrary instances. I thought I had converted all the tests over to use these wrappers, but it seems I must have missed at least one, because I'm getting "No instance found for Arbitrary (NonEmpty.Seq Number)" errors.

Unfortunately the source span is huge: "Error at /home/harry/documents/code/purescript-sequences/test/Data/Sequence/NonEmpty.purs line 20, column 1 - line 145, column 57:" - being told the error is somewhere between line 20 and line 145 is not very helpful.

As far as I can tell, this applies to errors arising from missing instances only.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions