Hdirect
Hi there. I get the impression someone is working on this stuff from the changes in CVS so you probably know about these problems, but just in case (and to prove that it is all worthwhile, for you to do this stuff), here they are: Using the latest Win32 GHC (thanks to Reuben for the ongoing work) and CVS source for HDirect: - Trying to build Hdirect straight from CVS has a number of dependency problems. I find I have to do several iterations of make and make boot and make lib. (Happy likewise has a crossdependency when bootstrapping without installing a binary copy first) - The dependency analysis seems to fail for IDLUtils.lhs - I have to do a make IDLUtils.hi - You have to build ihc.exe by bootstrapping without com first. - make clean does not delete src/ihc.exe - the com interface files seem to think they are in package main eg: __interface Main PointerPrim 1 501 where __export PointerPrim finalFreeMemory finalNoFree primAllocFrame primAllocMemory primFinalise primFreeBSTR primFreeMemory primNoFree; import Prelude :: 1; import PrelBase ! :: 1; import PrelWord :: 1; import PrelIOBase :: 1; and so at build time in the comcli example: -- miketh@NASTURTIUM //e/cvs/ghc/hdirect/examples/comcli $ make /cygdrive/e/ghc/ghc-5.01/bin/ghc -fglasgow-exts -package com -fno-warn-missing-m ethods -O-c Quartz.hs -o Quartz.o Quartz.hs:9: Module `Automation' is located in package `com' but its interface file claims it is part of package `Main' Quartz.hs:13: Module `Com' is located in package `com' but its interface file claims it is part of package `Main' make: *** [Quartz.o] Error 1 -- - various minor source problems: Index: lib/ComDll.lhs === RCS file: /cvs/fptools/hdirect/lib/ComDll.lhs,v retrieving revision 1.16 diff -r1.16 ComDll.lhs 39c39 import Foreign --- import Foreign hiding ( Ptr ) Index: lib/ComServ.lhs === RCS file: /cvs/fptools/hdirect/lib/ComServ.lhs,v retrieving revision 1.16 diff -r1.16 ComServ.lhs 88c88 import Foreign --- import Foreign hiding ( Ptr ) Index: lib/autoPrim.h === RCS file: /cvs/fptools/hdirect/lib/autoPrim.h,v retrieving revision 1.10 diff -r1.10 autoPrim.h 100c100 #ifdef __GNUC__ --- #if defined(__GNUC__) ! defined(__MINGW32__) Index: src/Makefile === RCS file: /cvs/fptools/hdirect/src/Makefile,v retrieving revision 1.57 diff -r1.57 Makefile 52c52 --- SUPPORT_TYPELIBS = YES Index: src/TLBWriter.lhs === RCS file: /cvs/fptools/hdirect/src/TLBWriter.lhs,v retrieving revision 1.23 diff -r1.23 TLBWriter.lhs 36c36 writeTLB :: [String] - [Decl] - IO () --- --writeTLB :: [String] - [Decl] - IO () 38c38 writeTLB _ _ = ioError (userError (writeTLB: type library writer code not com piled in)) --- --writeTLB _ _ = ioError (userError (writeTLB: type library writer code not c ompiled in)) Cheers (and as usual thanks for the good work) Mike Thomas ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
GHC derives and accepts illegal Haskell98 contexts
I have experimented with the definition of class assertions in section 4.1.3 in the Haskell 98 report, and found that GHC 4.08 and GHC 5.00.1 (invoked via ``ghc -c Test.hs'') both derive and accept type arguments (in class assertions) that do not have a variable as head. I cannot really imagine where this might hurt, though. By the way, I find that the .hi format of 5.00 is, from a human-readability point of view, in my opinion not optimal in that there is no separator after the __forall-bound variables: r2 :: __forall b (E (PrelBase.String, b)) = b - PrelBase.Bool; ^ There is no comparison with NHC since NHC still has the ``simple context restriction''. Best regards, Wolfram = module Test where class T a where t :: a b c - Bool class E a where e :: a - a - Bool instance T (,) where t (a,b) = True q1 :: (T a,Eq (a String b)) = a String b - Bool q1 x = if x == x then t x else True --r1 :: Eq (String, b) = b - Bool -- derived and accepted by GHC --r1 :: Eq a = a - Bool -- derived by Hugs98, -- accepted by both Hugs98 and GHC r1 x = q1 (asd,x) q2 :: (T a,E (a String b)) = a String b - Bool q2 x = if e x x then t x else True --r2 :: E (String, b) = b - Bool -- derived and accepted by GHC r2 x = q2 (asd,x) -- not accepted by hugs +98 ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs