Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmonad 0.17.1 seems not working #4

Open
Eiko-Tokura opened this issue Jan 22, 2024 · 4 comments
Open

xmonad 0.17.1 seems not working #4

Eiko-Tokura opened this issue Jan 22, 2024 · 4 comments

Comments

@Eiko-Tokura
Copy link

[eiko@EikoLG16 ~]$ xmonad --recompile
XMonad will use ghc to recompile, because neither "/home/eiko/.xmonad/build" nor "/home/eiko/.xmonad/stack.yaml" exists.
XMonad recompiling (forced).
Errors detected while compiling xmonad config: /home/eiko/.xmonad/xmonad.hs
$ ghc --make xmonad.hs -i -ilib -fforce-recomp -main-is main -dynamic -v0 -outputdir /home/eiko/.xmonad/build-x86_64-linux -o /home/eiko/.xmonad/xmonad-x86_64-linux

lib/ViewDoc.hs:109:60: error:
• Couldn't match type ‘[Char]’ with ‘Char’
Expected: ComplFunction
Actual: [String] -> IO [String]
• In the third argument of ‘inputPromptWithCompl’, namely
‘loadStates’
In the first argument of ‘(?+)’, namely
‘inputPromptWithCompl
def ("Session " ++ parens curState) loadStates’
In a stmt of a 'do' block:
inputPromptWithCompl def ("Session " ++ parens curState) loadStates
?+ (io . changeSession)
|
109 | inputPromptWithCompl def ("Session " ++ parens curState) loadStates ?+ (io . changeSession)
| ^^^^^^^^^^

lib/ViewDoc.hs:113:11: error:
• Couldn't match expected type: IO b
with actual type: String -> IO [String]
• Probable cause: ‘mkComplFunFromList'’ is applied to too few arguments
In a stmt of a 'do' block: mkComplFunFromList' states s
In the expression:
do home <- getHomeDirectory
states <- getDirectoryContents (home </> histdir)
mkComplFunFromList' states s
In an equation for ‘loadStates’:
loadStates s
= do home <- getHomeDirectory
states <- getDirectoryContents (home </> histdir)
mkComplFunFromList' states s
• Relevant bindings include
loadStates :: [String] -> IO b (bound at lib/ViewDoc.hs:110:9)
|
113 | mkComplFunFromList' states s
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

lib/ViewDoc.hs:113:31: error:
• Couldn't match expected type ‘XPConfig’
with actual type ‘[FilePath]’
• In the first argument of ‘mkComplFunFromList'’, namely ‘states’
In a stmt of a 'do' block: mkComplFunFromList' states s
In the expression:
do home <- getHomeDirectory
states <- getDirectoryContents (home </> histdir)
mkComplFunFromList' states s
|
113 | mkComplFunFromList' states s
| ^^^^^^

Please check the file for errors.

not sure what have changed in the new versions, it seems that the code in ViewDoc.hs won't compile? I'm using xmonad 0.17.1

@zaxtax
Copy link
Owner

zaxtax commented Jan 23, 2024

The api must have changed. I'll investigate!

@zaxtax
Copy link
Owner

zaxtax commented Jan 23, 2024

Pushed a change. Does that fixes things?

@Eiko-Tokura
Copy link
Author

Thank you for your idea and helping. I forked your code and solved these problems myself, fixed some problems (for example arguments can have more than one word, so we can use data structures to hold them, and adding per workspace launch etc)

it works great for saving pdf viewers!

@zaxtax
Copy link
Owner

zaxtax commented Jan 23, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants