-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
I've found some cases where shouldNotTypecheck fails to capture the deferred type errors. The full error is documented here, but in short, what seems to be happening is:
-
I've got an expression
fromNatSingToZ (SuccSing ZeroSing) :: Z 'Zerothat fails to typecheck due to a missing instance -shouldNotTypecheckdoes capture the deferred type error. -
when I pass that expression to a function
fromZToF (fromNatSingToZ (SuccSing ZeroSing))wherefromZToF :: Z 'Zero -> F,shouldNotTypecheckdoes not capture the deferred type error. It suggests I make sure the expression has a NFData instance, whichFdoes.
There's some other weird behaviour going on:
- if I rename
fromNatSingToZtotoZ,shouldNotTypecheckdoes capture the deferred type error above, but doesn't capture the deferred type error thrown byfromNatSingToF (SuccSing ZeroSing))wherefromNatSingToF = fromZToF . fromNatSingToZ - if I rename the type
FtoXorG, all the above deferred type errors are captured - if I move the module that defines the test from
Data/BugSpec.hstoBugSpec.hs, all the above deferred type errors are captured.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels