Installing grapefruit: "lexical error at character 'i'"

Dear list, I am trying to install grapefruit on Kubuntu 14.04. Most of the dependencies seemed to install without incident, but I am running into the following error: jeff@jeff-Lenovo:~$ cabal install grapefruit-ui-gtk grapefruit-examples Resolving dependencies... Configuring grapefruit-ui-0.1.0.5... Building grapefruit-ui-0.1.0.5... Preprocessing library grapefruit-ui-0.1.0.5... src/Internal/UIItem.hs-boot:12:2: lexical error at character 'i' Failed to install grapefruit-ui-0.1.0.5 cabal: Error: some packages failed to install: grapefruit-examples-0.1.0.5 depends on grapefruit-ui-0.1.0.5 which failed to install. grapefruit-ui-0.1.0.5 failed during the building phase. The exception was: ExitFailure 1 grapefruit-ui-gtk-0.1.0.5 depends on grapefruit-ui-0.1.0.5 which failed to install. jeff@jeff-Lenovo:~$ I wanted to find the offending 'i' character, but the file "src/Internal/UIItem.hs-boot" I was unable to find anywhere: jeff@jeff-Lenovo:/$ pwd / jeff@jeff-Lenovo:/$ sudo find . -name *UIItem.hs* [sudo] password for jeff: jeff@jeff-Lenovo:/$ Any ideas? Thanks, Jeff

In my experience that is a
#if xxx
without CPP enabled
On Mon, Jan 5, 2015 at 11:56 PM, Jeffrey Brown
Dear list,
I am trying to install grapefruit on Kubuntu 14.04. Most of the dependencies seemed to install without incident, but I am running into the following error:
jeff@jeff-Lenovo:~$ cabal install grapefruit-ui-gtk grapefruit-examples Resolving dependencies... Configuring grapefruit-ui-0.1.0.5... Building grapefruit-ui-0.1.0.5... Preprocessing library grapefruit-ui-0.1.0.5... src/Internal/UIItem.hs-boot:12:2: lexical error at character 'i' Failed to install grapefruit-ui-0.1.0.5 cabal: Error: some packages failed to install: grapefruit-examples-0.1.0.5 depends on grapefruit-ui-0.1.0.5 which failed to install. grapefruit-ui-0.1.0.5 failed during the building phase. The exception was: ExitFailure 1 grapefruit-ui-gtk-0.1.0.5 depends on grapefruit-ui-0.1.0.5 which failed to install. jeff@jeff-Lenovo:~$
I wanted to find the offending 'i' character, but the file "src/Internal/UIItem.hs-boot" I was unable to find anywhere: jeff@jeff-Lenovo:/$ pwd / jeff@jeff-Lenovo:/$ sudo find . -name *UIItem.hs* [sudo] password for jeff: jeff@jeff-Lenovo:/$
Any ideas?
Thanks, Jeff
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Mon, Jan 5, 2015 at 4:56 PM, Jeffrey Brown
I wanted to find the offending 'i' character, but the file "src/Internal/UIItem.hs-boot" I was unable to find anywhere:
It won't be there, it was removed during cleanup from the failed install. Use "cabal get grapefruit-ui" to get a more permanent copy of the source. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Thanks guys!
I found the library, though, as a .tar.gz file under
/home/jeff/.cabal/packages/hackage.haskell.org/grapefruit-ui/0.1.0.5, and
when I uncompressed that, found the UIItem file.
I can't find the offending character in it, though. Supposedly it was at
position 12.2 (line 12, column 2, right?), but I only see whitespace there.
The first few lines of it are these ("module" being the first word of the
first line):
module Internal.UIItem (
-- * User interface items in general
UIItem (UIItem),
item,
-- * Bricks
Brick,
brick,
just,
-- * Boxes
Box,
box,
with,
With (With),
On Mon, Jan 5, 2015 at 2:00 PM, Brandon Allbery
On Mon, Jan 5, 2015 at 4:56 PM, Jeffrey Brown
wrote: I wanted to find the offending 'i' character, but the file "src/Internal/UIItem.hs-boot" I was unable to find anywhere:
It won't be there, it was removed during cleanup from the failed install. Use "cabal get grapefruit-ui" to get a more permanent copy of the source.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

I did not realize UIItem.hs and UIItem.hs-boot were separate things; I
thank Matthew Pickering for pointing out that potential error in a private
message.
It looks like Alan or Kim was right: the 12th line of the boot file reads
"#if MIN_VERSION_base(4,7,0)", and the file contains no mention of CPP. I
am left with two questions:
How to enable CPP?
------------------
Do I just include the following liine at the top of the boot file?
{-# LANGUAGE CPP #-}
How to replace the boot file?
-----------------------------
In my hackage.haskell.org folder there are a lot of subfolders named after
Haskell libraries -- arrows, cairo, etc. Almost every one of those includes
in turn a single folder with a version number, and within that a .tar.gz
file. In order to find the error you all helped me locate, I uncompressed
the .tar.gz file in the grapefruit-ui folder. I could alter that object,
but that does not seem likely to help, because I would not be altering the
data that Haskell actually uses.
Thanks! This is exciting!
On Mon, Jan 5, 2015 at 2:22 PM, Jeffrey Brown
Thanks guys!
I found the library, though, as a .tar.gz file under /home/jeff/.cabal/packages/hackage.haskell.org/grapefruit-ui/0.1.0.5, and when I uncompressed that, found the UIItem file.
I can't find the offending character in it, though. Supposedly it was at position 12.2 (line 12, column 2, right?), but I only see whitespace there. The first few lines of it are these ("module" being the first word of the first line):
module Internal.UIItem (
-- * User interface items in general UIItem (UIItem), item,
-- * Bricks Brick, brick, just,
-- * Boxes Box, box, with, With (With),
On Mon, Jan 5, 2015 at 2:00 PM, Brandon Allbery
wrote: On Mon, Jan 5, 2015 at 4:56 PM, Jeffrey Brown
wrote: I wanted to find the offending 'i' character, but the file "src/Internal/UIItem.hs-boot" I was unable to find anywhere:
It won't be there, it was removed during cleanup from the failed install. Use "cabal get grapefruit-ui" to get a more permanent copy of the source.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Regarding replacing the boot-file, I thought I could delete the original
.tar.gz file and replace it with one of my own. But that seems like it
would only be a temporary fix -- would Cabal not discard that for a newer
one every time I update, thus bringing back the problem?
On Mon, Jan 5, 2015 at 2:54 PM, Jeffrey Brown
I did not realize UIItem.hs and UIItem.hs-boot were separate things; I thank Matthew Pickering for pointing out that potential error in a private message.
It looks like Alan or Kim was right: the 12th line of the boot file reads "#if MIN_VERSION_base(4,7,0)", and the file contains no mention of CPP. I am left with two questions:
How to enable CPP? ------------------ Do I just include the following liine at the top of the boot file? {-# LANGUAGE CPP #-}
How to replace the boot file? ----------------------------- In my hackage.haskell.org folder there are a lot of subfolders named after Haskell libraries -- arrows, cairo, etc. Almost every one of those includes in turn a single folder with a version number, and within that a .tar.gz file. In order to find the error you all helped me locate, I uncompressed the .tar.gz file in the grapefruit-ui folder. I could alter that object, but that does not seem likely to help, because I would not be altering the data that Haskell actually uses.
Thanks! This is exciting!
On Mon, Jan 5, 2015 at 2:22 PM, Jeffrey Brown
wrote: Thanks guys!
I found the library, though, as a .tar.gz file under /home/jeff/.cabal/packages/hackage.haskell.org/grapefruit-ui/0.1.0.5, and when I uncompressed that, found the UIItem file.
I can't find the offending character in it, though. Supposedly it was at position 12.2 (line 12, column 2, right?), but I only see whitespace there. The first few lines of it are these ("module" being the first word of the first line):
module Internal.UIItem (
-- * User interface items in general UIItem (UIItem), item,
-- * Bricks Brick, brick, just,
-- * Boxes Box, box, with, With (With),
On Mon, Jan 5, 2015 at 2:00 PM, Brandon Allbery
wrote: On Mon, Jan 5, 2015 at 4:56 PM, Jeffrey Brown
wrote: I wanted to find the offending 'i' character, but the file "src/Internal/UIItem.hs-boot" I was unable to find anywhere:
It won't be there, it was removed during cleanup from the failed install. Use "cabal get grapefruit-ui" to get a more permanent copy of the source.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Hi,
Probably, the best solution in this case (and most similar cases) is
to send patch to upstream. I believe, grapefruit maintainers will be
glad to see it.
As far as I know, you can open a bug at
http://trac.haskell.org/grapefruit/. Mailing list is also a nice place
to try: http://projects.haskell.org/cgi-bin/mailman/listinfo/grapefruit
Regards,
Alexey
2015-01-06 1:08 GMT+02:00 Jeffrey Brown
Regarding replacing the boot-file, I thought I could delete the original .tar.gz file and replace it with one of my own. But that seems like it would only be a temporary fix -- would Cabal not discard that for a newer one every time I update, thus bringing back the problem?
On Mon, Jan 5, 2015 at 2:54 PM, Jeffrey Brown
wrote: I did not realize UIItem.hs and UIItem.hs-boot were separate things; I thank Matthew Pickering for pointing out that potential error in a private message.
It looks like Alan or Kim was right: the 12th line of the boot file reads "#if MIN_VERSION_base(4,7,0)", and the file contains no mention of CPP. I am left with two questions:
How to enable CPP? ------------------ Do I just include the following liine at the top of the boot file? {-# LANGUAGE CPP #-}
How to replace the boot file? ----------------------------- In my hackage.haskell.org folder there are a lot of subfolders named after Haskell libraries -- arrows, cairo, etc. Almost every one of those includes in turn a single folder with a version number, and within that a .tar.gz file. In order to find the error you all helped me locate, I uncompressed the .tar.gz file in the grapefruit-ui folder. I could alter that object, but that does not seem likely to help, because I would not be altering the data that Haskell actually uses.
Thanks! This is exciting!
On Mon, Jan 5, 2015 at 2:22 PM, Jeffrey Brown
wrote: Thanks guys!
I found the library, though, as a .tar.gz file under /home/jeff/.cabal/packages/hackage.haskell.org/grapefruit-ui/0.1.0.5, and when I uncompressed that, found the UIItem file.
I can't find the offending character in it, though. Supposedly it was at position 12.2 (line 12, column 2, right?), but I only see whitespace there. The first few lines of it are these ("module" being the first word of the first line):
module Internal.UIItem (
-- * User interface items in general UIItem (UIItem), item,
-- * Bricks Brick, brick, just,
-- * Boxes Box, box, with, With (With),
On Mon, Jan 5, 2015 at 2:00 PM, Brandon Allbery
wrote: On Mon, Jan 5, 2015 at 4:56 PM, Jeffrey Brown
wrote: I wanted to find the offending 'i' character, but the file "src/Internal/UIItem.hs-boot" I was unable to find anywhere:
It won't be there, it was removed during cleanup from the failed install. Use "cabal get grapefruit-ui" to get a more permanent copy of the source.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Ah, of course. Thanks, Alexey!
On Mon, Jan 5, 2015 at 3:37 PM, Alexey Shmalko
Hi,
Probably, the best solution in this case (and most similar cases) is to send patch to upstream. I believe, grapefruit maintainers will be glad to see it.
As far as I know, you can open a bug at http://trac.haskell.org/grapefruit/. Mailing list is also a nice place to try: http://projects.haskell.org/cgi-bin/mailman/listinfo/grapefruit
Regards, Alexey
Regarding replacing the boot-file, I thought I could delete the original .tar.gz file and replace it with one of my own. But that seems like it would only be a temporary fix -- would Cabal not discard that for a newer one every time I update, thus bringing back the problem?
On Mon, Jan 5, 2015 at 2:54 PM, Jeffrey Brown
wrote: I did not realize UIItem.hs and UIItem.hs-boot were separate things; I thank Matthew Pickering for pointing out that potential error in a
message.
It looks like Alan or Kim was right: the 12th line of the boot file reads "#if MIN_VERSION_base(4,7,0)", and the file contains no mention of CPP. I am left with two questions:
How to enable CPP? ------------------ Do I just include the following liine at the top of the boot file? {-# LANGUAGE CPP #-}
How to replace the boot file? ----------------------------- In my hackage.haskell.org folder there are a lot of subfolders named after Haskell libraries -- arrows, cairo, etc. Almost every one of those includes in turn a single folder with a version number, and within that a .tar.gz file. In order to find the error you all helped me locate, I uncompressed the .tar.gz file in the grapefruit-ui folder. I could alter that object, but that does not seem likely to help, because I would not be altering the data that Haskell actually uses.
Thanks! This is exciting!
On Mon, Jan 5, 2015 at 2:22 PM, Jeffrey Brown
wrote: Thanks guys!
I found the library, though, as a .tar.gz file under /home/jeff/.cabal/packages/hackage.haskell.org/grapefruit-ui/0.1.0.5,
and
when I uncompressed that, found the UIItem file.
I can't find the offending character in it, though. Supposedly it was at position 12.2 (line 12, column 2, right?), but I only see whitespace
The first few lines of it are these ("module" being the first word of
2015-01-06 1:08 GMT+02:00 Jeffrey Brown
: private there. the first line):
module Internal.UIItem (
-- * User interface items in general UIItem (UIItem), item,
-- * Bricks Brick, brick, just,
-- * Boxes Box, box, with, With (With),
On Mon, Jan 5, 2015 at 2:00 PM, Brandon Allbery
wrote: On Mon, Jan 5, 2015 at 4:56 PM, Jeffrey Brown <
jeffbrown.the@gmail.com>
wrote:
I wanted to find the offending 'i' character, but the file "src/Internal/UIItem.hs-boot" I was unable to find anywhere:
It won't be there, it was removed during cleanup from the failed install. Use "cabal get grapefruit-ui" to get a more permanent copy of the source.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (4)
-
Alan & Kim Zimmerman
-
Alexey Shmalko
-
Brandon Allbery
-
Jeffrey Brown