See the HList library (http://www.cwi.ni/~ralf/HList) and use an HList
constrained by your interface.
Keean.
John Goerzen wrote:
Hi,
I often have a situation where I'm designing specialized components to
do a more general task. Examples could include mail folder code (maildir,
mbox, etc),
On Wed, Dec 15, 2004 at 02:07:10AM -0800, William Lee Irwin III wrote:
This does not work as expected on Complex numbers due to some odd
typechecking hassles apparently associated with abs. How do I get this
to typecheck for both real (e.g. Double) and Complex arguments?
abs :: Num a = a - a,
On Wed, Dec 15, 2004 at 02:07:10AM -0800, William Lee Irwin III wrote:
This does not work as expected on Complex numbers due to some odd
typechecking hassles apparently associated with abs. How do I get this
to typecheck for both real (e.g. Double) and Complex arguments?
On Wed, Dec 15, 2004
On Wed, Dec 15, 2004 at 04:09:04AM +0100, Sebastian Sylvan wrote:
FMUSIC_MODULE * F_API FMUSIC_LoadSong(
const char *name
);
By doing this in Haskell:
data MusicModule = MusicModule
foreign import ccall fmod.h FMUSIC_LoadSong fmusic_LoadSong ::
CString - IO ForeignPtr MusicModule)
William Lee Irwin III wrote:
This does not work as expected on Complex numbers due to some odd
typechecking hassles apparently associated with abs. ...
Ross Paterson wrote:
abs :: Num a = a - a, whereas you want something that returns a Double.
You could define
class Norm a where
norm ::
On Wed, 15 Dec 2004 06:04:37 -0500, David Roundy
[EMAIL PROTECTED] wrote:
On Wed, Dec 15, 2004 at 04:09:04AM +0100, Sebastian Sylvan wrote:
FMUSIC_MODULE * F_API FMUSIC_LoadSong(
const char *name
);
By doing this in Haskell:
data MusicModule = MusicModule
foreign import ccall
This does not work as expected on Complex numbers due to some odd
typechecking hassles apparently associated with abs. How do I get this
to typecheck for both real (e.g. Double) and Complex arguments?
\begin{code}
module Jacobi (sn, cn, dn, sd, cd, nd, cs, ds, ns, sc, dc, nc) where
scd x k | abs
On Wed, Dec 15, 2004 at 01:13:19PM +0100, Sebastian Sylvan wrote:
Another problem!
When a handle is not being referenced I don't want it to be garbage
collected if the isPlaying function returns True (in other words I
want the song to finish playing even if it's not being referenced
anymore).
System.Mem.performGC?
Sebastian Sylvan wrote:
Another question!
Is there a way to force the garbage collector to kick in?
I''m trying to find out if my finalizer gets called correctly but I
don't know if the garbage collector is run.
/S
___
Haskell-Cafe
Jon Cast wrote (on Tue, 14 Dec 2004 at 22:02):
No. All that is needed for ($) to work is impredicativity (or, more
precisely, for the foralls in ($)'s type to be impredicative). That is
something that could easily be implemented in a compiler. I'm not clear
on why it
On Wed, 15 Dec 2004, William Lee Irwin III wrote:
On Wed, Dec 15, 2004 at 10:28:18AM +, Ross Paterson wrote:
abs :: Num a = a - a, whereas you want something that returns a Double.
You could define
class Norm a where
norm :: a - Double
instance Norm Float where
printastable :: [([Int],Word)] - String
printastable l = concat $ map (\(xs,w) - (show xs) ++ ++ w ++
\n) l
I'd use
[ c | (xs,w) - l, c - (show xs) ++ ++ w ++ \n ]
instead -- after all, list comprehensions provide a much nicer
syntax for map, filter and concat.
I try to stay
On Wed, 15 Dec 2004 22:58:53 -0500, Robert Dockins
[EMAIL PROTECTED] wrote:
On Thu, 2004-12-16 at 01:05 +0100, Sebastian Sylvan wrote:
Another question!
Is there a way to force the garbage collector to kick in?
I''m trying to find out if my finalizer gets called correctly but I
don't
13 matches
Mail list logo