[xmonad] Trouble getting modular setup to compile

Brent Yorgey byorgey at seas.upenn.edu
Mon Dec 31 13:21:59 CET 2012


On Sun, Dec 30, 2012 at 05:32:29PM -0500, adam vogt wrote:
> On Sun, Dec 30, 2012 at 4:35 PM, Frank Terbeck <ft at bewatermyfriend.org> wrote:
> > xmonad --recompile
> > Error detected while loading xmonad configuration file: /home/hawk/.xmonad/xmonad.hs
> >
> > lib/XMonad/Config/FT/Layouts.hs:19:23:
> >     No instance for (XMonad.Layout.LayoutModifier.LayoutModifier
> >                        FullscreenFull a0)
> 
> Hi Frank,
> 
> All your type errors involve some type variables like `a0' above that
> eventually become Window when the definition is used in your config.
> You could try adding {-# LANGUAGE NoMonomorphismRestriction #-} to the
> top of lib/XMonad/Config/FT/Layouts.hs. I think that will stop ghc
> from trying to fix a given `a0' when compiling your Layouts.hs

I just want to point out that this also explains why it worked in
the monolithic version but not when breaking your config up into
separate modules. In the monolithic version, GHC was able to correctly
infer that a0 must be Window because of how your layout was used.
When the layout is on its own in a module, GHC does not have enough
information to figure out the type.

-Brent



More information about the xmonad mailing list