one thing i'm confused by, and this wasn't properly addressed in the prior threads,
is
for a type like
data Annotated t ann = MkAnn t ann
would you consider the following unsafe?
instance Eq t => Eq ( Annotated t ann)
(==) (MkAnn t1 _) (MkAnn t2 _ ) = t1 == t2
instance Ord t => Ord (Annotated t ann)
compare (MkAnn t1 _) (MkAnn t2 _) = compare t1 t2
by the rubric you've proposed these might be *BAD*, right? But theres many cases where you're doing computation on data, and you wish to track origin, time, etc, but these annotations are *irrelevant* for the actual values computed... It sounds like the proposal you want would rule out such instances!
your proposal would rule out these pretty natural Ord/Eq instances!
am i not understanding your proposal?
It seems like you want LVish to be deterministic in the sense of "up to equality/ordering equivalence", the computation will always yield the same answer .
Haskell has no way of enforcing totality, and deriving a "SafeEq" via generics is wrong, see the Annotated type example i made up, above.
If you define determinism up to the equivalence/ordering relations provided, and assuming anyone using LVish can read the docs before using it, is there really any real problem? are there any *real* example computations that someone might naively do despite the warning where the actual answer would be broken because of this?
If we had a richer type system (like say, Idris plus some totality info), how would we enforce the safety conditions needed to make LVish truely deterministically type safe?
cheers