Apologies
My email client has gone mad. ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Andy Gill's Html library
Hi, I've been working through the source code of Andy Gill's Html library for my own edification. Andrew makes the following definitions. \begin{code} instance (Show a) => Show (BlockTable a) where showsPrec p = showsTable type TableI a = [[(a,(Int,Int))]] -> [[(a,(Int,Int))]] data BlockTable a = Table (Int -> Int -> TableI a) Int Int \end{code} You can create a (1x1) table entry \begin{code} single :: a -> BlockTable a single a = Table (\ x y z -> [(a,(x+1,y+1))] : z) 1 1 \end{code} Can someone explain the reasoning behind using a function to describe a Table rather than just a list of lists? Tom ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
GHC and the FFI
Hi all, Should GHC 5.02.3 support the latest version of the FFI or is that still only in CVS? Thanks Ian ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: HGL with GHC in Win32
>> --- > Just as long as someone remembers to do the re-greencarding <<< >> --- >> in cvs: hslibs/win32 before the next release, > I'll do that tonight. (Not sure if I can test it that soon but I > figure I can't break it any worse than it already is.) I just committed some freshly greencarded files. I also added ghc.mk which is the makefile I used to greencard with. I haven't added any rules to compile the greencard output with ghc - I can't test anything I wrote so I figure best to leave the file uncluttered than to put in broken stuff. A ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: HGL with GHC in Win32
> Would that be in the released Greencard or only in the cvs version? In the CVS version only AFAIK. > So the Win32 sources could now be regenerated and future builds and > releases wouldn't run into these problems with Win32 or HGL anymore? I believe so. > --- Just as long as someone remembers to do the re-greencarding <<< > --- > in cvs: hslibs/win32 before the next release, I'll do that tonight. (Not sure if I can test it that soon but I figure I can't break it any worse than it already is.) > please, because that won't happen automatically anymore (but then I > may be wrong about this - I don't understand the fptools Makefiles, > yet;-). My assumption is that the machine generated files are in the repository so that they don't have to install greencard on their test machines so, yes, I'd guess that's right. [btw GHC folks. Instead of putting greencard-generated code into the CVS repository, why don't you run the CVS copy of GreenCard using Hugs - I do it all that way all the time. That'd avoid the cyclic dependency between building GreenCard and building the libraries. It's a small extra requirement to install Hugs on your test machines but we only do one or two releases a year and GreenCard works fine with all of them. I'm sure it runs just as well under NHC if you'd prefer that route. Or you could even compile GreenCard with the copy of GHC you use to build GHC with.] > PS. I still have to figure out how to make hslibs/win32 in isolation, This seems like a common need for which there should be a standard plan of attack. Sadly, I don't know it. -- Alastair Reid[EMAIL PROTECTED]http://www.cs.utah.edu/~reid/ ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: HGL with GHC in Win32
> >> The size problem is traceable to [Greencard's ffi code generation] > I took a look at this and found that Sigbjorn had fixed it some months > ago Would that be in the released Greencard or only in the cvs version? > Building GDITypes with this command: > > green-card --target=ffi -i. --include-dir ../../green-card/lib/ghc -i . GDITypes.gc > generates correct code for prim_RGB (the problem Hal Daume ran into). > and for Win32Window.adjustWindowRect So the Win32 sources could now be regenerated and future builds and releases wouldn't run into these problems with Win32 or HGL anymore? --- >>> Just as long as someone remembers to do the re-greencarding <<< --- in cvs: hslibs/win32 before the next release, please, because that won't happen automatically anymore (but then I may be wrong about this - I don't understand the fptools Makefiles, yet;-). Great - thanks, Claus PS. I still have to figure out how to make hslibs/win32 in isolation, so I won't be able to test & confirm whether this solves all the HGL/GHC/Win32 problems for a while (e.g., there was the problem of polygon creation running out of resources, see Friday's email; that could easily be related to the same ffi problem, but it would be good to check) - anyone else in a better position for testing? ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: HGL with GHC in Win32
Claus: >> The size problem is traceable to [Greencard's ffi code generation] Alastair: > The problem seems to be present in the current repository. > Hmmm, I distinctly remember tracking this down and fixing it but it > doesn't look like I committed the change - I'll check in the > morning. I took a look at this and found that Sigbjorn had fixed it some months ago - but I was using it wrong. Building GDITypes with this command: green-card --target=ffi -i. --include-dir ../../green-card/lib/ghc -i . GDITypes.gc (Very important to use the ghc directory here^^^) generates correct code for prim_RGB (the problem Hal Daume ran into). and for Win32Window.adjustWindowRect If you use ../../green-card/lib/hugs on the command line, you'll get incorrect code. This hasn't been affecting Hugs up till now because the ffi target didn't work with Hugs anyway. I'm hoping we'll be able to merge the GHC and Hugs versions of StdDIS.gc into a single FFI version. -- Alastair ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: compiling libraries with ghc
> hi, i wrote some utilities to make my coding a little easier > and i put them in some libraries. then to use them i made a > package conf file and added it with ghc-pkg -a. i then tried > compiling them with > > ghc -package-name extensions -c Foo.hs > > but i am not sure i am compiling it right as i get linker > errors of the form > > /usr/libexec/elf/ld: cannot find -lDirectoryAndExtensions > > whenever i try to compile a program that uses my libraries. I can't tell exactly what's wrong from this error message - what does your package conf file look like? > i can fix this by copying all the .o files to libFoo.a files. > what is the right way to compile libraries? You should make a lifFoo.a for static linking, and a single Foo.o for use with GHCi. The documentation on packages in the user guide explains how to do this. Cheers, Simon ___ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users