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
I do not use Dom.MonadWidget because that issues a warning from the simplifiable-class-constraints flag:
app/main.hs:38:3: warning: [-Wsimplifiable-class-constraints]
• The constraint ‘Dom.MonadWidget t m’
matches an instance declaration
instance Reflex.Dom.Old.MonadWidgetConstraints t m =>
Dom.MonadWidget t m
-- Defined in ‘Reflex.Dom.Old’
This makes type inference for inner bindings fragile;
either use MonoLocalBinds, or simplify it using the instance
• In the type signature:
srList :: Dom.MonadWidget t m =>
Dom.Event t () -> m (Dom.Event t (SR.ReqResult () [Entity User]))
The text was updated successfully, but these errors were encountered:
I also had an issue with * being conflated with * -> * in 0.3.5. I used your m :: (* -> *) trick with NoMonomorphismRestriction (and KindSignatures of course), but I also got:
Non type-variable argument
in the constraint: HasJSContext (Performable m1)
(Use FlexibleContexts to permit this)
so I also enabled FlexibleContexts.
I do use MonadWidget but that requires me also to enable MonoLocalBinds.
After that, it works and I no longer have to define a service and XHR stuff! Huzzah!
This is not an issue but a way of documenting my findings.
Having the following API:
I can get the following functions from servant-reflex:
For this to work, I needed to disable the monomorphism restriction with:
{-# LANGUAGE NoMonomorphismRestriction #-}
Also, I like to write explicit type signatures so I came up with the following:
I do not use
Dom.MonadWidget
because that issues a warning from thesimplifiable-class-constraints
flag:The text was updated successfully, but these errors were encountered: