From f5901c8dfd071a71d169611a7e594c479431fe99 Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Tue, 15 Mar 2022 22:52:10 +0100 Subject: [PATCH] reflex-dom-core: Eta expand some functions to appease the ghc 9 typechecker This is a sad change, because hlint will complain about the unnecessary eta expansion. The problem is that ghc 9 will not unify the forall x. x with () in an argument position. Although obviously a supplied value of the type forall x. WidgetT x () can be used as a WidgetT () (). eta expanding helps the type checker to agree with this. --- reflex-dom-core/src/Reflex/Dom/Main.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reflex-dom-core/src/Reflex/Dom/Main.hs b/reflex-dom-core/src/Reflex/Dom/Main.hs index 24219c77..75651c86 100644 --- a/reflex-dom-core/src/Reflex/Dom/Main.hs +++ b/reflex-dom-core/src/Reflex/Dom/Main.hs @@ -58,7 +58,7 @@ import Reflex.Profiled {-# INLINE mainHydrationWidgetWithHead #-} mainHydrationWidgetWithHead :: (forall x. HydrationWidget x ()) -> (forall x. HydrationWidget x ()) -> JSM () -mainHydrationWidgetWithHead = mainHydrationWidgetWithHead' +mainHydrationWidgetWithHead x y = mainHydrationWidgetWithHead' x y {-# INLINABLE mainHydrationWidgetWithHead' #-} -- | Warning: `mainHydrationWidgetWithHead'` is provided only as performance tweak. It is expected to disappear in future releases. @@ -67,7 +67,7 @@ mainHydrationWidgetWithHead' = mainHydrationWidgetWithSwitchoverAction' (pure () {-# INLINE mainHydrationWidgetWithSwitchoverAction #-} mainHydrationWidgetWithSwitchoverAction :: JSM () -> (forall x. HydrationWidget x ()) -> (forall x. HydrationWidget x ()) -> JSM () -mainHydrationWidgetWithSwitchoverAction = mainHydrationWidgetWithSwitchoverAction' +mainHydrationWidgetWithSwitchoverAction x y z = mainHydrationWidgetWithSwitchoverAction' x y z {-# INLINABLE mainHydrationWidgetWithSwitchoverAction' #-} -- | Warning: `mainHydrationWidgetWithSwitchoverAction'` is provided only as performance tweak. It is expected to disappear in future releases. @@ -187,7 +187,7 @@ runHydrationWidgetWithHeadAndBodyWithFailure onFailure switchoverAction app = wi {-# INLINE mainWidget #-} mainWidget :: (forall x. Widget x ()) -> JSM () -mainWidget = mainWidget' +mainWidget x = mainWidget' x {-# INLINABLE mainWidget' #-} -- | Warning: `mainWidget'` is provided only as performance tweak. It is expected to disappear in future releases.