You are not logged in.
I'm building an xmonad.hs and everything is going well, but I keep running into this weird problem where my xmonad.hs won't compile when I use both gridselectWorkspace and goToSelected at the same time. They will both compile separetly and function seperatly if one or the other is commented out. The issue isnt shared key bindings cause they do have different key bindings. I can't seem to figure it out.
http://www.haskell.org/haskellwiki/Xmon … _xmonad.hs
link to the guys config I'm modeling mine after. The relevant parts to this problem are
-- GSConfig options:
myGSConfig = defaultGSConfig
{ gs_cellheight = 50
, gs_cellwidth = 250
, gs_cellpadding = 10
, gs_font = "" ++ myFont ++ ""
}
-- Key Bindings:
...
, ((modMask .|. shiftMask, xK_g), gridselectWorkspace myGSConfig W.view) -- display grid select and go to selected workspace
, ((modMask, xK_g), goToSelected myGSConfig) -- display grid select and go to selected window
...
-- Error message I'm Getting
xmonad.hs:111:59:
Couldn't match type `GHC.Word.Word64' with `[Char]'
Expected type: GSConfig WorkspaceId
Actual type: GSConfig GHC.Word.Word64
In the first argument of `gridselectWorkspace', namely `myGSConfig'
In the expression: gridselectWorkspace myGSConfig W.view
In the expression:
((modMask .|. shiftMask, xK_g),
gridselectWorkspace myGSConfig W.view)
Please check the file for errors.
xmonad: xmessage: executeFile: does not exist (No such file or directory)
-- Also get this error when gridselectWorkspace is listed first in myKeys
xmonad.hs:111:38:
Couldn't match type `[Char]' with `GHC.Word.Word64'
Expected type: GSConfig Window
Actual type: GSConfig [Char]
In the first argument of `goToSelected', namely `myGSConfig'
In the expression: goToSelected myGSConfig
In the expression: ((modMask, xK_g), goToSelected myGSConfig)
Please check the file for errors.
xmonad: xmessage: executeFile: does not exist (No such file or directory) So yea any of you haskell guru's out there who could lend a hand to a lowly acolyte would be greatly appreciated. I tried to figure out what the problem was but at some point I decided to let more practice hands try their stuff. If you need my config just let me know.
Regards,
Jak
Last edited by jack_slapped (2014-03-13 13:14:46)
Offline
That's the monomorphism restriction getting in your way. Two options:
Add a type signature to ensure myGSConfig has a polymorphic type. For this you can just copy the type of defaultGSConfig.
Disable the monomorphism restriction. This is what that other config does using the LANGUAGE pragma near the top of the file.
Offline
That did the trick. Really appreciate it man! I racked my brain for hours trying to figure it out. Never would have guessed that.
Offline