简体   繁体   English

如何从我的.xmonad / xmonad.hs导入本地模块

[英]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: 我正在尝试从〜/ .xmonad / Tree.hs导入名为'Tree.hs'的自定义本地模块,但是我得到了:

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. ghc似乎没有在〜/ .xmonad中搜索模块。 Is there a good way to achieve this? 是否有实现此目标的好方法?

Xmonad searches for modules in the ~/.xmonad/lib directory. ~/.xmonad/lib~/.xmonad/lib目录中搜索模块。 Just put your module in there. 只需将您的模块放在那里。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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