Re: Distributing a GHC-compiled binary for Macs (x86)

2007-03-09 Thread Christian Maeder
(move a discussion to glasgow-haskell-users)

Macs that don't have GHC installed don't seem to have readline-5
installed, either.

Therefore we've created that GNUreadline.framework (see below). However,
the binary that one wants to distribute must be linked against that
framework. We do this by adding linker options to ghc:

-optl-F/home/maeder/Library/Frameworks -optl-framework -optlGNUreadline

We have also created a binary distribution (for powerpc, though) that
uses our GNUreadline.framework. For this we've changed
libraries/readline/config.mk manually:

LD=/usr/bin/ld -F/home/maeder/Library/Frameworks -framework GNUreadline
SRC_HC_OPTS +=
-optc-I/home/maeder/Library/Frameworks/GNUreadline.framework/Headers
-optl-F/home/maeder/Library/Frameworks -optl-framework -optlGNUreadline
SRC_HSC2HS_OPTS +=
-I/home/maeder/Library/Frameworks/GNUreadline.framework/Headers

The binary distribution is here:
http://www.informatik.uni-bremen.de/agbkb/forschung/formal_methods/CoFI/hets/mac/versions/ghc-6.6-powerpc-apple-darwin.tar.bz2

We think, that such a GNUreadline.framework is more flexible and
mac-like than installing readline-5 under /opt/local. The framework can
reside under /System/Library/Frameworks but also under
$HOME/Library/Frameworks.

Maybe you could consider making such a distribution (that also doesn't
need root permission) as well?

The sources and the script to create the GNUreadline framework are included:
http://www.informatik.uni-bremen.de/agbkb/forschung/formal_methods/CoFI/hets/mac/GNUreadline-framework.zip

Cheers Christian

Christian Maeder schrieb:
 Arjun Guha schrieb:
 Hi,

 I compiled a binary using GHC 6.6 on my Mac (specifically, using ghc
 --make).  This binary seems to depend on the GNU MP framework--I
 imagine GHC uses it to implement its numeric tower.

 However, Macs that don't have GHC installed don't seem to have GMP, so
 I'll guess that it was installed along with the GHC binary.  Is there
 any way to get around this GMP dependency?  I expect the binary to be
 used on Macs that don't have GHC installed.  It would be acceptable if
 I instructed Mac-users to download a binary installer for GMP, but I
 haven't been able to find one.

 Any hints or suggestions would be appreciated.  Thanks.
 
 We tell our users to install a GMP.framework and a GNUreadline.framework:
 
 http://www.informatik.uni-bremen.de/agbkb/forschung/formal_methods/CoFI/hets/mac_e.htm
 
 Cheers Christian
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


chr and ord not in standard prelude

2007-03-09 Thread Colletta, Edward
When I try to use functions chr or ord, I get a not in scope error.
If I :browse Prelude I do not see these functions.  Is there another
module I should load?
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: chr and ord not in standard prelude

2007-03-09 Thread Mark Hills
It looks like these are in module Char:

 ghci
   ___ ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |  GHC Interactive, version 6.6, for Haskell 98.
/ /_\\/ __  / /___| |  http://www.haskell.org/ghc/
\/\/ /_/\/|_|  Type :? for help.

Loading package base ... linking ... done.
Prelude Char.chr 65
'A'
Prelude Char.ord 'A'
65

Colletta, Edward wrote:

 When I try to use functions chr or ord, I get a not in scope error.
 If I :browse Prelude I do not see these functions.  Is there another
 module I should load?

 

 ___
 Glasgow-haskell-users mailing list
 Glasgow-haskell-users@haskell.org
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
   

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: chr and ord not in standard prelude

2007-03-09 Thread Stefan O'Rear
On Fri, Mar 09, 2007 at 03:40:08PM -0500, Colletta, Edward wrote:
 When I try to use functions chr or ord, I get a not in scope error.
 If I :browse Prelude I do not see these functions.  Is there another
 module I should load?

Don't use chr and ord - they aren't polymorphic, they restrict your
code to work only on Chars.  Use fromEnum and toEnum (which are in the
Prelude) instead. 

Stefan
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users