slotThe 5995d6c117 X.C.Desktop: Add type signatures
When we applied hlint hints in bd5b969d9ba24236c0d5ef521c0397390dbc4b37,
the definition of desktopLayoutModifiers got (via the hint to eta
reduce) changed from

    desktopLayoutModifiers layout = avoidStruts layout

to

    desktopLayoutModifiers = avoidStruts

While the former is general enough to infer the type signature

    LayoutClass l a => l a -> ModifiedLayout AvoidStruts l a

the latter just sees the usage site of

    , layoutHook = desktopLayoutModifiers $ layoutHook def

in the desktopConfig function and thus—through the magic of
MonomorphismRestriction—infers the specialized type

    Choose Tall (Choose (Mirror Tall) Full) Window
      -> ModifiedLayout AvoidStruts
           (Choose Tall (Choose (Mirror Tall) Full)) Window

This obviously completely falls apart once someone wants to change the
layout and still uses desktopLayoutModifiers (unaware that it is just
avoidStruts at the moment).  The easy fix is to give things type
signatures, so nothing needs to be inferred.

The _actual_ solution would be, in my opinion, to completely deprecate
X.C.Desktop and remove it in a future release, as well as to completely
rewrite the provided Example.hs.  This needs more deliberation though.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/560
Related: bd5b969d9ba24236c0d5ef521c0397390dbc4b37
2021-06-14 18:36:04 +02:00
..
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-14 18:36:04 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00