Help with propositional formulas

2003-07-19 Thread Douglas O. Matoso
Hi, I have an school assignment that asks to implement an truth table of propositional formulas. I'm having difficulties in the following part: data Prop = Var Char | Not Prop | And Prop Prop | Or Prop Prop type Subst = [(Char,Bool)] - Define a function bools :: Int -> [[Bool]] that calculates a

Re: how implement a UArray with a ForeignPtr?

2003-07-19 Thread Ross Paterson
On Sat, Jul 19, 2003 at 08:17:10AM -0400, David Roundy wrote: > Hello. I was wondering if there might be any relatively simple way to > implement a type equivalent to UArray, but with the memory stored in a > ForeignPtr? It seems like this would be a commonly useful situation, where > you have a C

how implement a UArray with a ForeignPtr?

2003-07-19 Thread David Roundy
Hello. I was wondering if there might be any relatively simple way to implement a type equivalent to UArray, but with the memory stored in a ForeignPtr? It seems like this would be a commonly useful situation, where you have a C function that returns a pointer to an array of data, and it would be