Data.Generics generic unification?

2004-03-24 Thread John Knottenbelt
Hi Has anybody done generic unification algorithm (e.g. using Data.Generics)? The idea is to do the unifications in a state monad (like http://portal.acm.org/citation.cfm?id=507648&dl=ACM&coll=portal ), but without having to have two level types. It would be cool to have a data type, e.g. da

Parsec State Monad Question

2004-03-05 Thread John Knottenbelt
Hi I was wondering if it was possible to write a function that allows changing the state type of the Parser monad from Parsec. The full parser type is: GenParser p s a, where p is the token type, s is the state type and a is the return type of the monad. However, I mostly use CharParser s a wh

Re: Evacuated Object

2001-05-28 Thread John Knottenbelt
Thanks for having a look at this. The sourcecode is available from http://www.doc.ic.ac.uk/~jak97/graphics.tgz Please let me know if you have any difficulties building. SDL is available from http://www.libsdl.org and SDL_image is available from http://www.devolution.com/~slouken/SDL/projec

Evacuated Object

2001-05-27 Thread John Knottenbelt
I'm experimenting with GHC (5.00.1) on RedHat Linux 7.1, it's foreign function interface (using .hsc files) and the SDL graphics library (v1.2). The curious thing is that the following code: main = sdlInit [sdlVideo[ sdlQuit can be loaded into GHCi and executed as many times as I like

Concurrency in GHCi

2001-03-01 Thread John Knottenbelt
Hi The little program below is to test an idea to try to interact using Hugs or GHCi with a running program. To use the program: 1. Start the server with "addServer addChan" 2. Write requests to addChan "writeChan addChan (Add 3 4)" The program seems to work OK in Hugs, but cra