RE: Compiling GHC disabling the type checker

2006-10-16 Thread Simon Peyton-Jones
| How does GHC react to a really large number of unsafeCoerce's? Is this
| likely to destroy performance? Has anything like this been done
| before? I know that LML was able to turn off the type checker, but I
| guess GHC doesn't have such an option, because of its typed Core
| language.

I've never tried that.  However GHC now handles 'casts' in a more
systematic way (this is the FC stuff), and I hitnk unsafe coerces will
benefit from that.  Worth a try.

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


foldl laziness support. Reply

2006-10-16 Thread Serge D. Mechveliani
Concerning the laziness support problem,

I thank people for explanations about  foldl and foldr.

 I wonder how to avoid these numerous cost pitfalls.
 Maybe, the complier could do more optimization?


Duncan Coutts [EMAIL PROTECTED]  writes

 There are important differences between foldl, foldl' and foldr. It is
 quite important to choose the right one. I don't think this can be done
 automatically.

 In my experience, the choice is almost always between foldl' and foldr.
 
 [..]

I do not see  foldl'  in the standard library.
Is it of the GHC lib extension?  has it strictness annotation?


 So as Lemmih says, in this case you want to use foldr:

 import List (union)
 main = let n = 10^4 :: Int
in
putStr
(shows (take 2 $ unionMany [[1 .. i] | i - [1 .. n]]) \n)

 unionMany = foldr union []

I see. Thank you.
I have impression that something is here besides the intuition for the 
foldl/foldr choice.

Here is a contrived example which is more close to my real situation.

-
import qualified Data.Set as Set (Set(..), empty, member, insert)
import List (union, find)

main = let  n = 10^6 :: Int  in  putStr (shows (g1 n) \n)

f :: Int - (Set.Set Int, [Int])
fn   =  

  -- original version, I write so because it is easy to program
  --
  foldl add (Set.empty, []) [[1 .. i] | i - [1 .. n]]
  where
  add (s, xs) ys =  (Set.insert (sum xs) s, union xs ys)

  {- attempt to optimize (fails)
  --
  h (Set.empty, []) [[1 .. i] | i - [1 .. n]]
  where
  h (s, xs) []= (s, xs) 
  h (s, xs) (ys: yss) = h (Set.insert (sum xs) s, union xs ys) yss
  -}

g1, g2 :: Int - Bool -- client functions

g1 n = case  snd $ f n  of  x: _ - even x
_- False

g2 n = let (set, xs) = f n
   in
   case  find ( 100) xs  of  Just x - Set.member (2*x) set
  _  - False
-

Evidently,  g1 n  must have the cost of  O(1).  
But in  ghc-6.6 -O,  it has O(n).

How to improve  f ?  I tried  foldr,  and failed.

The situation is so that some clients are as  g1,  and others are as  
g2, and, at least,  g1  must be O(1).

Regards,

-
Serge Mechveliani
[EMAIL PROTECTED]
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Link errors when using the GHC API

2006-10-16 Thread Bas van Dijk
(I noticed my reply to Mathew Mills didn't reach the GHC list, so here it is.)

On Wednesday 11 October 2006 21:53, Mathew Mills wrote:
 Interesting.   I was unable to reproduce your problem.  What platform
 are you running on?  Are you using a binary distribution or one you
 built from source?

I'm running Gentoo Linux (x86). I emerged the latest GHC (6.6). So GHC is 
built from source.

$ uname -a
Linux bassbox 2.6.17-gentoo-r7 #7 PREEMPT Tue Oct 3 01:15:50 CEST 2006 i686 
AMD Athlon(tm) 64 Processor 3200+ GNU/Linux

$ gcc --version
gcc (GCC) 4.1.1 (Gentoo 4.1.1)

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.6

$ ghc-pkg list
/usr/lib/ghc-6.6/package.conf:
Cabal-1.1.6, GLUT-2.0, HaXml-1.13.2, OpenGL-2.1, QuickCheck-1.0,
base-2.0, (ghc-6.6), haskell-src-1.0, haskell-src-exts-0.2,
haskell98-1.0, html-1.0, mtl-1.0, network-2.0, parsec-2.0,
readline-1.0, regex-base-0.71, regex-compat-0.71, regex-posix-0.71,
rts-1.0, stm-2.0, template-haskell-2.0, unix-1.0

BTW, why is the (ghc-6.6) package listed between parentheses?

I also emerged GHC on another PC with the same architecture running the same 
Gentoo version and there I had the same error:

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

Loading package base ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package readline-1.0 ... linking ... done.
Loading package unix-1.0 ... linking ... done.
Loading package Cabal-1.1.6 ... linking ... done.
Loading package regex-base-0.71 ... linking ... done.
Loading package regex-posix-0.71 ... linking ... done.
Loading package regex-compat-0.71 ... linking ... done.
Loading package haskell98 ... linking ... done.
ghc-6.6: /usr/lib/ghc-6.6/HSghc.o: unknown symbol 
`Cabalzm1zi1zi6_DistributionziPackage_a_closure'
Loading package ghc-6.6 ... linking ... ghc-6.6: unable to load package 
`ghc-6.6'

 Seems like something didn't build right...  You might use 'nm' to
 examine your libHSCabal.a to see if a similarly named symbol is
 present.  For example, is there a leading underscore?  May the
 version (m1zi1zi6) isn't present?

When I 'nm /usr/lib/ghc-6.6/libHSCabal.a' and search for, for example, 
Cabalzm1zi1zi6_DistributionziPackage_a_closure I see that it is indeed an 
(U)ndefined symbol. I don't know what that means though.

Reemerging GHC or Cabal also doesn't help.

Any help is highly appreciated.

Greetings,

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


Re: foldl laziness support. Reply

2006-10-16 Thread Neil Mitchell

Hi


I do not see  foldl'  in the standard library.
Is it of the GHC lib extension?  has it strictness annotation?


Hoogle it!

http://haskell.org/hoogle/?q=foldl%27

Data.List.foldl' :: (a - b - a) - a - [b] - a

Thanks

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


Re: Compiling GHC disabling the type checker

2006-10-16 Thread Simon Marlow

Neil Mitchell wrote:


I would like to write a translator which takes a Haskell-like language
to GHC compilable Haskell. This Haskell-like language is not
explicitly typed, and cannot have types inferred for it (rank 2 types
may exist etc), however it is known that the program will not crash
with a type error. All case statements are well typed, i.e. case x of
{1 - ..; True - ...} will not happen, although types cannot be given
to the whole program.

How does GHC react to a really large number of unsafeCoerce's? Is this
likely to destroy performance? Has anything like this been done
before? I know that LML was able to turn off the type checker, but I
guess GHC doesn't have such an option, because of its typed Core
language.


There's one restriction that I know of: you should be careful not to cast a 
function value to a non-function type (except a polymorphic type), because the 
two have incompatible representations when it comes to seq and case.   And of 
course, you should never cast an unboxed value to a boxed type or vice versa. 
Apart from these, I think you should be fine to unsafeCoerce# away.


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


Re: Bad control characters in GHCi 6.6 (Mac OS X PPC)

2006-10-16 Thread Simon Marlow

Björn Buckwalter wrote:


I downloaded the GHC 6.6 tarballs, built and installed them on my mac
(Tiger, PPC) using the documented procedure:
 ./configure
 make
 make install

The build and install was fairly smooth. However, ghci will not
recognize control characters, e.g. delete/backspace, arrow keys,
ctrl-a, ctrl-d et c. It seems to recognize ctrl-c for cancelling a
line but will print the ^C first. A typical session may look like:


It sound like either you don't have readline installed, or the GHC build didn't 
detect it.  Do you have readline?  (the real GNU readline, not Apple's version).


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


Re: ghc for PC Solaris

2006-10-16 Thread Simon Marlow

Christian Maeder wrote:


I would like to get ghc (version 6.6) working for our students. The
machines are ATHLON-64 with Solaris 10. (SunOS  5.10 Generic_118855-19
i86pc i386 i86pc)

If someone has a binary distribution of any ghc version (that is able to
build ghc-6.6), please let me know.



But I would also try to build ghc from hc-sources.
What is the best platform I could get hc-sources from?
We have sparc-sun-solaris2.10 and i686-pc-linux-gnu ourselves.


You should be able to use any platform with a working GHC 6.6 to bootstrap from; 
x86/Linux is fine.  Ian bootstraps GHC on new machines for fun(!), so I'm pretty 
sure the process has most of the kinks ironed out at the moment.


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


Re: Parallel GC

2006-10-16 Thread Chad Scherrer

Sounds great, thanks!

-Chad

On 10/16/06, Simon Marlow [EMAIL PROTECTED] wrote:


GHC 6.6 does run code in parallel on SMP hardware, but the GC is still single
threaded.  We have a prototype parallel GC, and I'm planning to work on it some
more in the next few months... you'll probably see it in GHC 6.8.

Cheers,
Simon


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


Re: 6.4.3 and threaded RTS problems

2006-10-16 Thread Wolfgang Thaller
Could someone on MacOS X try the 6.4.x branch again?  I just  
committed a fix that makes the threaded RTS more stable on Solaris,  
and I'm hoping it clears up the problems on MacOS X too.  Remember  
to re-enable -threaded in ghc/compiler/Makefile if you previously  
disabled it.


The problem seems to be solved now, great work!

Cheers,

Wolfgang


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


Re: 6.4.3 and threaded RTS problems

2006-10-16 Thread Simon Marlow

Wolfgang Thaller wrote:
Could someone on MacOS X try the 6.4.x branch again?  I just  
committed a fix that makes the threaded RTS more stable on Solaris,  
and I'm hoping it clears up the problems on MacOS X too.  Remember  to 
re-enable -threaded in ghc/compiler/Makefile if you previously  
disabled it.



The problem seems to be solved now, great work!


That was quick, thanks Wolfgang.

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


Re: Link errors when using the GHC API

2006-10-16 Thread Bas van Dijk
On Monday 16 October 2006 12:41, Duncan Coutts wrote:
 This is a problem with the way we have packaged it for Gentoo. We know
 the source of the problem and will fix it soon.

Great, thanks.

On Monday 16 October 2006 12:46, Clemens Fruhwirth wrote:
 The problem is Gentoo specific. Quick dirty fix: cp
 /usr/lib/ghc-6.6/HSCabal.o /usr/lib/Cabal-1.1.6/ghc-6.6/HSCabal-1.1.6.o

This seems to get rid of the problem in ghci:

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

Loading package base ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package readline-1.0 ... linking ... done.
Loading package unix-1.0 ... linking ... done.
Loading package Cabal-1.1.6 ... linking ... done.
Loading package regex-base-0.71 ... linking ... done.
Loading package regex-posix-0.71 ... linking ... done.
Loading package regex-compat-0.71 ... linking ... done.
Loading package haskell98 ... linking ... done.
Loading package ghc-6.6 ... linking ... done.
Prelude

But the problem remains when making for example testGHC.gs:

---
module Main where

import qualified GHC
import DynFlags (defaultDynFlags)

main = GHC.defaultErrorHandler defaultDynFlags $ putStrLn Hello World
---

$ ghc -package ghc --make testGHC.hs
[1 of 1] Compiling Main ( testGHC.hs, testGHC.o )
Linking testGHC ...
/usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `r6iZ_info':
: undefined reference to 
`Cabalzm1zi1zi6_LanguageziHaskellziExtension_optional_info'
/usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6r9_info':
: undefined reference to 
`Cabalzm1zi1zi6_LanguageziHaskellziExtension_zdwshowsPrec_info'
/usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6sJ_info':
: undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_lvl31_info'
/usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6sN_info':
: undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_zddEq_closure'
/usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6ID_0_alt':
: undefined reference to `Cabalzm1zi1zi6_DistributionziCompiler_polyzugo_info'
/usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o): In function `s6IG_0_alt':
: undefined reference to 
`Cabalzm1zi1zi6_DistributionziCompiler_polyzugo1_info'
/usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o):(.rodata+0x0): undefined reference 
to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_optional_closure'
/usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o):(.rodata+0x1cc): undefined reference 
to `Cabalzm1zi1zi6_LanguageziHaskellziExtension_zdwshowsPrec_closure'
/usr/lib/ghc-6.6/libHSghc.a(HeaderInfo.o):(.rodata+0x1dc): undefined reference 
to `Cabalzm1zi1zi6_DistributionziCompiler_lvl31_closure'
/usr/lib/ghc-6.6/libHSghc.a(PackageConfig.o): In function `s23t_1_alt':
: undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure'
/usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s77S_1_alt':
: undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure'
/usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s79E_1_alt':
: undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure'
/usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7i7_1_alt':
: undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure'
/usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7vI_1_alt':
: undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure'
/usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7yi_info':
: undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_zeze_info'
/usr/lib/ghc-6.6/libHSghc.a(Packages.o): In function `s7GC_1_alt':
: undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure'
/usr/lib/ghc-6.6/libHSghc.a(Linker.o): In function `s8TZ_1_alt':
: undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure'
/usr/lib/ghc-6.6/libHSghc.a(Linker.o): In function `s8Vv_1_alt':
: undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure'
/usr/lib/ghc-6.6/libHSghc.a(Finder.o): In function `s7l2_1_alt':
: undefined reference to `Cabalzm1zi1zi6_DistributionziPackage_a_closure'
collect2: ld returned 1 exit status
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Hacking on GHC interactively with GHCi

2006-10-16 Thread Clemens Fruhwirth
Hello everyone,

I would like to hack on GHC interactively. My aim is to load ghc into
ghci and start hacking a source file in one emacs buffer, while the
other hosts an inferior-haskell session connected to GHCi. I really
like this kind of development style and found it to be way more
productive than edit/compile/test/restart from edit.

To context of the following is the compiler/ subtree, as I'm primarily
interested in that. I tried to:

* load all GHC compiler source files into ghci, fails because of
  occassional unboxed types (bytecode generated can't deal with them)

* load all .o files (with unboxed types) and load a modified source in
interpreted mode. This doesn't work well because for that approach you
need to mix the source with the object in the same directory (copy
compiler/**/*.[l]hs to stage1 or stage2). This, fails because
there seem to be some sources missing, I have not investiged where the
.o-boot files come from like compiler/stage2/basicTypes/OccName.o-boot.
With source files, GHCi just ignores the existing .o file (resumable
because it can't check whether the .o file is more recent than the
source file)

* load ghci -package ghc and load main/Main.hs. This work pretty well,
but only in comparsion to the other approaches -- that means loading
does not fail. Invoking :main -c foobar.hs freezes the ghci
session. With this approach I can not change any module withing
the packaged ghc. Is that true? But that's what I want to do (in
particular to the parser part).

So, before I start to work towards a particular end of these 3
approaches, is there anyone how develops ghc in an interactive way
using ghci with partial :reload-ing of modules? The GHC user guide has a
good illustration of what I'm looking for
http://www.haskell.org/ghc/docs/latest/html/users_guide/ghci-compiled.html

Any hint is appreciated.
-- 
Fruhwirth Clemens - http://clemens.endorphin.org 
for robots: [EMAIL PROTECTED]


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


Re: ghc-6.6 mac intel binary bundle

2006-10-16 Thread Rodney D Price

Here's what worked for me:

bunzip2 ghc-6.6-i386-apple-darwin.tar.bz2
tar -xvf ghc-6.6-i386-apple-darwin.tar
cd ghc-6.6
./configure
sudo make show-install-setup
sudo make install
ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.6

I'm on a MacBook Pro running OS X 10.4.8.  The make show-
install-setup step doesn't do anything but show you where the
files will go when you do make install, but make install worked
fine on my machine.

-Rod


On Oct 13, 2006, at 7:23 PM, Adam Megacz wrote:



Hi,

I'm grateful to whoever prepared the binary bundle for ghc-6.6 on
MacOS/Intel, but the instructions for installing it are missing/wrong.

In particular, make install doesn't do much, and the only binary in
the bundle called ghc appears to need additional configuration
options (-B), so it seems to need some sort of installation procedure.
The INSTALL file is not useful.

Overall, I'm kind of uncertain exactly what this tarball contains.  It
looks like a built copy of the source code, but most of the source
code is missing.  It's not an installer (.mpkg) nor does it
(apparently) contain any install scripts.

Could you perhaps update this webpage with an example of the shell
commands you might use to get it installed to the point where typing
ghc Foo.hs works?

  http://www.haskell.org/ghc/download_ghc_66.html#macosxintel

Thanks,

  - a

--
PGP/GPG: 5C9F F366 C9CF 2145 E770  B1B8 EFB1 462D A146 C380

___
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


scoped tyvar

2006-10-16 Thread Bulat Ziganshin
Hello glasgow-haskell-users,

should the following work in 6.6?

-- | Alloc the mutable byte vector having `elems` elements of required type
allocUnboxed :: (STorIO m s, Integral elems, Unboxed a)
 = elems - m (MUVec s a)
allocUnboxed elems :: m (MUVec s a) =  -- it's line 149
allocUnboxedBytes (fromIntegral elems * sizeOfUnboxed (undefined::a))


the problem is that it works in 6.6rc1, but user reports that his
compiler (i think, 6.6 release) can't compile it saying:

Data/Unboxed.hs:149:0: Parse error in pattern

may be it's because september's changes in scoped tyvars handling? how
i can convert this code retaining compatibility with Hugs?

-- 
Best regards,
 Bulat  mailto:[EMAIL PROTECTED]

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


RE: scoped tyvar

2006-10-16 Thread Simon Peyton-Jones
I don't know about Hugs, but you can add an explicit 'forall' to the
type sig for allocUnboxed, to bring the type variables into scope.
http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.
html#scoped-type-variables

S

| -Original Message-
| From: Bulat Ziganshin [mailto:[EMAIL PROTECTED]
| Sent: 16 October 2006 17:16
| To: glasgow-haskell-users@haskell.org
| Cc: Simon Peyton-Jones
| Subject: scoped tyvar
| 
| Hello glasgow-haskell-users,
| 
| should the following work in 6.6?
| 
| -- | Alloc the mutable byte vector having `elems` elements of required
type
| allocUnboxed :: (STorIO m s, Integral elems, Unboxed a)
|  = elems - m (MUVec s a)
| allocUnboxed elems :: m (MUVec s a) =  -- it's line 149
| allocUnboxedBytes (fromIntegral elems * sizeOfUnboxed
(undefined::a))
| 
| 
| the problem is that it works in 6.6rc1, but user reports that his
| compiler (i think, 6.6 release) can't compile it saying:
| 
| Data/Unboxed.hs:149:0: Parse error in pattern
| 
| may be it's because september's changes in scoped tyvars handling? how
| i can convert this code retaining compatibility with Hugs?
| 
| --
| Best regards,
|  Bulat  mailto:[EMAIL PROTECTED]

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


Re: Link errors when using the GHC API

2006-10-16 Thread Duncan Coutts
On Mon, 2006-10-16 at 17:42 +0200, Bas van Dijk wrote:
 On Monday 16 October 2006 12:41, Duncan Coutts wrote:
  This is a problem with the way we have packaged it for Gentoo. We know
  the source of the problem and will fix it soon.
 
 Great, thanks.
 
 On Monday 16 October 2006 12:46, Clemens Fruhwirth wrote:
  The problem is Gentoo specific. Quick dirty fix: cp
  /usr/lib/ghc-6.6/HSCabal.o /usr/lib/Cabal-1.1.6/ghc-6.6/HSCabal-1.1.6.o
 
 This seems to get rid of the problem in ghci:

 But the problem remains when making for example testGHC.gs:

Yeah. That'd have a different quick fix:

cp /usr/lib/ghc-6.6/libHSCabal.a /usr/lib/Cabal-1.1.6/ghc-6.6/

because ghci uses the .o files and ghc uses the .a ones.

Duncan

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


Re: Compiling GHC disabling the type checker

2006-10-16 Thread roconnor

On Mon, 16 Oct 2006, Simon Marlow wrote:

There's one restriction that I know of: you should be careful not to cast a 
function value to a non-function type (except a polymorphic type), because 
the two have incompatible representations when it comes to seq and case. 
And of course, you should never cast an unboxed value to a boxed type or vice 
versa. Apart from these, I think you should be fine to unsafeCoerce# away.


Coq's extraction mechinism uses the type () whenever it encounters a 
dependent type that it cannot make a Haskell type for.  Thus, all sorts of 
functions end up getting cast to () types.


Would it be safer to cast things to ``() - ()'', or perhaps a single 
polymorphic variable ``a''?


--
Russell O'Connor  http://r6.ca/
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: Link errors when using the GHC API

2006-10-16 Thread Bas van Dijk
 Yeah. That'd have a different quick fix:

 cp /usr/lib/ghc-6.6/libHSCabal.a /usr/lib/Cabal-1.1.6/ghc-6.6/

 because ghci uses the .o files and ghc uses the .a ones.

Thanks it works! Now I can finally start playing with the GHC API.

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


Re: ghc-6.6 mac intel binary bundle

2006-10-16 Thread Deborah Goldsmith

On Oct 16, 2006, at 9:16 AM, Rodney D Price wrote:

bunzip2 ghc-6.6-i386-apple-darwin.tar.bz2
tar -xvf ghc-6.6-i386-apple-darwin.tar


These can be combined in one step:

tar -xfvj ghc-6.6-i386-apple-darwin.tar.bz2

Deborah

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