
It looks like you have an infinite loop created, where `hasLens = boolL`
and `boolL = hasLens`, and the two overlappable instances are each
fulfilling the constraints of the other instance.
On Tue, Jul 24, 2018 at 12:11 AM Theodore Lief Gannon
λ. :set -XFlexibleContexts -XFlexibleInstances -XMultiParamTypeClasses -XUndecidableInstances λ. import RIO λ. import Data.Has λ. class HasBool a where boolL :: Lens' a Bool λ. instance {-#OVERLAPPABLE#-} HasBool a => Has Bool a where hasLens = boolL λ. instance {-#OVERLAPPABLE#-} Has Bool a => HasBool a where boolL = hasLens λ. runRIO () $ view boolL ^CInterrupted.
The RIO environment () doesn't contain a Bool. I can see how the typechecker might get lost in this, but I can compile an equivalent program; it loops on execution. _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.