HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleoptics-core-0.4.1.1Haskell2010

Optics.Internal.Magic

This module is intended for internal use only, and may change without warning in subsequent releases.

  • 2 classes
classclass Dysfunctional (field :: k) (k6 :: k1) (s :: k2) (t :: k3) (a :: k4) (b :: k5) | field s -> k6 t a b, field t -> k6 s a b
#

How about a magic trick? I'm gonna make the coverage condition disappear.

Instances1Dysfunctional
  • TypeInferenceLoop "Type inference for the local binding failed. Write the type" "signature yourself or disable monomorphism restriction with" "NoMonomorphismRestriction LANGUAGE pragma so GHC infers it." field k7 s t a b => Dysfunctional field k7 s t a bDefined in optics-core-0.4.1.1 · Optics.Internal.Magic

    Show something useful when type inference goes into a loop and stops with "reduction stack overflow" message (sometimes happens when trying to infer types of local bindings when monomorphism restriction is enabled).

classclass TypeInferenceLoop (msg1 :: k) (msg2 :: k1) (msg3 :: k2) (field :: k3) (k9 :: k4) (s :: k5) (t :: k6) (a :: k7) (b :: k8) | field s -> k9 t a b, field t -> k9 s a b
#
Instances1TypeInferenceLoop