[xmonad] Problem CPP'ifying XSelection.hs

Gwern Branwen gwern0 at gmail.com
Sat Sep 20 13:12:59 EDT 2008

On 2008.09.20 12:28:24 -0400, "Brandon S. Allbery KF8NH" <allbery at ece.cmu.edu> scribbled 0.6K characters:
> On 2008 Sep 20, at 11:33, Gwern Branwen wrote:
>> I finished editing, and everything looked dandy, but everytime I
>> compiled, or loaded into GHCi (with :set -DUTF8), it fails to compile!
>> And it fails to compile in a way that really perplexes me:
>>    Could not find module `Codec.Binary':
>>      Use -v to see a list of the files searched for.
>> Line 34 reads:
>>    import Codec.Binary.UTF8.String (decode)
> The "UTF8" in that import is being converted to "1", because cpp sees
> "UTF8" as the macro you -D-d.
> --
> brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com

I don't entirely see, but what can I do? I have to import from UTF8.String because that's where decode is, and the UTF8 CPP flag is out of my hands as it is defined elsewhere than XSelection.hs.

Also, I'm not sure that's the problem. Fonts.hsc uses the UTF8 flag, and it imports from Codec.Binary.UTF8.String as well; and yet, I've never seen any such compile error with it.

CIDA Wireless CID Ti president NIMA E.O.D. Sugar Peking of
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://www.haskell.org/pipermail/xmonad/attachments/20080920/a219a4fd/attachment.bin

More information about the xmonad mailing list