简体   繁体   中英

How can I import local modules from my .xmonad/xmonad.hs

I'm trying to import a custom, local module named 'Tree.hs' from ~/.xmonad/Tree.hs, but I get:

Error detected while loading xmonad configuration file: /home/shahn/.xmonad/xmonad.hs

xmonad.hs:55:8:
    Could not find module ‘Tree’
    Use -v to see a list of the files searched for.

Please check the file for errors.

It seems that ghc doesn't search in ~/.xmonad for modules. Is there a good way to achieve this?

Xmonad searches for modules in the ~/.xmonad/lib directory. Just put your module in there.

http://xmonad.org/manpage.html#modular-configuration

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM