Skip to content
Snippets Groups Projects
Commit 488d3631 authored by Bodigrim's avatar Bodigrim Committed by Marge Bot
Browse files

More precise types for fields of OverlappingInstances and UnsafeOverlap in TcSolverReportMsg

It's clear from asserts in `GHC.Tc.Errors` that `overlappingInstances_matches`
and `unsafeOverlapped` are supposed to be non-empty, and `unsafeOverlap_matches`
contains a single instance, but these invariants are immediately lost afterwards
and not encoded in types. This patch enforces the invariants by pattern matching
and makes types more precise, avoiding asserts and partial functions such as `head`.
parent c3732c62
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment