[Haskell-cafe] Re: [Haskell] ANNOUNCE: jhc 0.7.4
John Meacham
john at repetae.net
Sat Jul 10 17:33:30 EDT 2010
On Sat, Jul 10, 2010 at 04:01:53PM -0500, Antoine Latter wrote:
> * running DrIFT on src/E/TypeCheck.hs fails with an illegal
> bytesequence in hGetContents. I'm guessing that this is only an issue
> when building DrIFT with GHC 6.12+, and that the file contains bytes
> illegal in UTF8. I deleted everything funny looking in the file and
> then it went smooth
Hi, are you compiling from the tarball or the darcs repository? the
tarball shouldn't require DrIFT to be installed. I had not tested DrIFT
with 6.12 but that file should be in UTF8. Hmm... on OSX, is the default
locale a UTF8 one? does ghc 6.12 properly encode to/from utf8 on it by
defualt? could you check, I don't have a mac handy.
> * The way you use sed doesn't work with the BSD sed that ships with my
> Mac Book. Installing GNU sed and using it works. Similarly, BSD find
> doesn't know about '-name', so make hl-clean results in sadness.
Hmm.. yeah, this has been reported before, but I was unable to reproduce
the problem. But I may have accidentally been using a GNU sed, my mac at
the time was highly gnu-ized. Could you send me a version that works.
> * jhci works great, but jhc crashes when I try to compile something:
> >>>>>
> jhc test1.hs
> jhc 0.7.4 (tokfekyuvi-27)
> Finding Dependencies...
> Using Ho Cache: '/Users/alatter/.jhc/cache'
> Main [test1.hs]
> Typechecking...
> [1 of 1] Main (.............................................)
> test1.hs:9 - Warning: defaulting: t93 => Jhc.Basics.Integer
> Compiling...
> [1 of 1] Main <..................................................>
> Collected Compilation...
> -- typeAnalyzeMethods
> -- BoxifyProgram
> -- Boxy WorkWrap
> -- LambdaLift
> E
> jhc: <stdout>: hPutChar: invalid argument (Illegal byte sequence)
> <<<<<
>
> Again, this seems like the handle is in UTF8 mode and we're trying to
> output something non-UTF8.
Hmm.. clearly something about the locale is wrong... It is outputing a
unicode character there, but it shoudl translate adn display to utf8
just fine. perhaps ghc is not actually opening utf8 handles on your
platform...
> * cabal install has a --jhc flag, but it doesn't seem to work:
> >>>>>
> cabal install byteorder --jhc
> Resolving dependencies...
> cabal: internal error: impossible
> <<<<<
> I have jhc installed in a non-standard location (under ${HOME}/usr) so
> I may need to have some environment variables set up. This is wil
> Cabal 1.8.0.4 and cabal-install 0.8.2
The cabal support for jhc never worked actually, it wasn't written by
me. There really isn't any easy way to integrate cabal with jhc right
now, and even if there was, all of hackage has ghc specific
dependencies. No doubt the solution to this problem will be involved, I
have conciously decided to not think about the issue until I have full
haskell 2010 support down pat. That will be more useful for writing
portable programs in the short run.
> Keep up the good work!
>
> I have an implementation for STRefs I threw together this afternoon
> for jhc if you're interested. I can't test it properly, though, with
> the compiler crash above.
Try without the '-v' flag, it shouldn't try printing the non ascii
character then. or modify src/Stats.hs and replacet all the C.<char>
constants with ascii equivalants. If there is a good way to test whether
the terminal supports non-ascii characters, that would be good to put a
test in jhc for.
John
--
John Meacham - ⑆repetae.net⑆john⑈ - http://notanumber.net/
More information about the Haskell-Cafe
mailing list