You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test :: (1 <= a) => Proxy (Div (n * a) a) -> Proxy n
test = id
However, with -fplugin GHC.TypeLits.Normalise (0.3.1), -fplugin GHC.TypeLits.KnownNat.Solver (0.7), -fplugin GHC.TypeLits.Extra.Solver (0.7),and -fconstraint-solver-iterations=0, ghc 8.6.5 won't have this and complains:
• Could not deduce: Div (n * a) a ~ n
from the context: 1 <= a
Is there any way to achieve this?
PS: I can define this:
foo :: forall x n a . (x ~ (n * a)) => Proxy n -> Proxy a -> ()
foo = const . const ()
but this doesn't give me what I need downstream.
The text was updated successfully, but these errors were encountered:
I'd like to define the following:
However, with
-fplugin GHC.TypeLits.Normalise
(0.3.1),-fplugin GHC.TypeLits.KnownNat.Solver
(0.7),-fplugin GHC.TypeLits.Extra.Solver
(0.7),and-fconstraint-solver-iterations=0
, ghc 8.6.5 won't have this and complains:Is there any way to achieve this?
PS: I can define this:
but this doesn't give me what I need downstream.
The text was updated successfully, but these errors were encountered: