Hi,
Ive a read-eval-print loop based program that
Ive been trying to make more robust by catching and responding to any
exceptions that might be thrown; mainly using Control.Exception.evaluate and
Control.Exception.catch. However, I noticed that once I catch a non-termination
type of
On Wed, 2004-06-23 at 01:13, Duncan Coutts wrote:
ghc makes it's own type checker monad TcM an instance of the Quasi class
(which is rather cunning), however this means that if the user calls the
Monad function 'fail' then the internal TcM fail method gets called.
This monad (IOEnv) was never
Hi,
This was posted to the Haskell list earlier,
http://www.haskell.org//pipermail/haskell/2004-June/014286.html
but just to record what appears to be a typechecker bug.
I have a function with this type:
buildUArray' :: (Ix i, MArray (array s) a (ST s)) =
(i,i) - (i - a) - ST s
Carsten Schultz wrote:
Wouldn't that make
getSocketOption :: Socket - SocketOption - IO Int
a bit strange? How would you propose to change it?
Possible, but also possibly overkill, would be:
newtype Debug = Debug Bool
newtype SendBuffer = SendBuffer (Maybe Int)
[...]
class SocketOption a where
Hi!
I'd like to make Haskell bindings for some C library and I'm wondering if
someone was/is thinking about writing Haskell support for SWIG or the present
Haskell tools provide better route for such a task(s)?
Sincerely,
Gour
--
Gour| [EMAIL PROTECTED]
Registered Linux
Hi,
I'm not a Haskell expert, but you may find GreenCard useful
(http://www.haskell.org/greencard/).
And from my previous experience, you can write Haskell bindings to C using
Haskell only, without any coding in C. You'd better read the FFI
specifications
On Mon, Jun 28, 2004 at 11:08:38AM -0400, Isaac Jones wrote:
My basic requirement is that they should be functions useful for
system administration.
We've sucked in some functions in from GHC and from Cabal[1]. It would
be nice if we could just have a dumping ground for related functions
Here's a small bit of code that involves some fairly hairy class
overloadings (ghc's mutable unboxed array classes)
The code builds an array in the ST monad by creating a mutable array
then assigning to each element and finally freezing the array and
returning an immutable array.
Firstly the bit
Erm, something I remember about needing MArrays... Here's something
which does the same thing (cooks and MArray then freezes it - also using
STUArray... The neat thing is MArray is a class, so you can swap between
STUArray and STArray implementations without changing code.
This is the classic
On Tue, 2004-06-29 at 18:42, MR K P SCHUPKE wrote:
Erm, something I remember about needing MArrays... Here's something
which does the same thing (cooks and MArray then freezes it - also using
STUArray... The neat thing is MArray is a class, so you can swap between
STUArray and STArray
Try this:
distString :: String - String - Int
distString s0 s1 = let a = runST (difST s0 s1)
in a!(1,1)
difST :: MArray (STUArray s) Int (ST s) = String - String - ST s (UArray (Int,Int)
Int)
difST s0 s1 = do
b@(_,br) - return $ (\x1 y1 - ((0,0),(x1,y1))) (length s0) (length s1)
d -
G'day all.
Quoting Iavor S. Diatchki [EMAIL PROTECTED]:
just a few silly remarks...
Not so silly...
actually i think this is a good approximation. not all polymorphic
functions are natural
transformations, but simple ones usually are.
I've found when studying category theory that
12 matches
Mail list logo