haskellari / lattices

Fine-grained lattice primitives for Haskell
BSD 3-Clause "New" or "Revised" License
35 stars 15 forks source link

Add Num instances to newtype wrappers #31

Open phadej opened 8 years ago

tonyday567 commented 4 years ago

Can

instance (Num a) => Lattice a where
  a /\ b = a `min` b
  a \/ b = a `max` b

be included directly? It's an undecidable instance, but it looks like a benign one.

tonyday567 commented 4 years ago

Ok, I see why, because of Overlapping Instances. So what's the best way to add Num instances?