[Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?
Roman Cheplyaka
roma
Wed Oct 2 10:21:31 UTC 2013
* Heinrich Apfelmus <apfelmus at quantentunnel.de> [2013-10-02 11:24:39+0200]
> In other words, equality of abstract data types is different from
> equality of algebraic data types (constructors). I don't think you'll
> ever be able to avoid this proof obligation that the public API of an
> abstract data type preserves equivalence, so that LVish will yield
> "results that are deterministic up to equivalence".
It still seems to fit nicely into Safe Haskell. If you are the
implementor of an abstract type, you can do whatever you want in the Eq
instance, declare your module as Trustworthy, and thus take the
responsibility for soundness of that instance w.r.t. your public API.
Roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20131002/227e3c89/attachment.pgp>
More information about the Haskell-Cafe
mailing list