Re: does this irritate anyone else?

2003-02-26 Thread Hal Daume III
Hi, > Is there really no way to say "This newtype supports all the operations > of the type it was defined from."? Normally I would define it with type but > I could not then write this code which is "the offending code" you asked for. I think this pretty much defeats the purpose of newtypes.

Re: does this irritate anyone else?

2003-02-26 Thread Mike T. Machenry
It would be nice if all the operations I wanted to call on my newtype were class methods. This is not so unfortunatly. I am pretty sure Set is not a type class. That would be the only solution that would really satisfy me I guess. MkUn seems to be just renaming the problem, and making shorter typ

fundeps for extended Monad definition

2003-02-26 Thread Hal Daume III
Hi all, I'm hoping someone can explain some weirdnesses to me. I want to have a class that's like the standard Monad class, but is a bit more general. That is, I want: class Monad2 m a ma | m a -> ma, ma -> m a where return2 :: a -> ma bind2 :: Monad2 m b mb => ma -> (a -> mb) -> mb _un

Re: does this irritate anyone else?

2003-02-26 Thread Hal Daume III
One way to get around this is to do something like: > newtype DetectiveLocations = DetectiveLocations SomeType1 > newtype FugitiveLocations = FugitiveLocations SomeType2 > > class MkUn nt t | nt -> t where >mk :: t -> nt >un :: nt -> t > > instance MkUn DetectiveLocations SomeType1 where

does this irritate anyone else?

2003-02-26 Thread Mike T. Machenry
I am trying to use type classes to get some percollate actions through a nested data structure. The problem is I can't make an instance of a class unless the type is defined with newtype or data. This means all of my functions look something like this: findFugitive :: DetectiveLocations -> Fugitiv

Haskell running on JVM?

2003-02-26 Thread Graham Klyne
This is something of a long-shot enquiry. Are there any known tools that will allow Haskell programs to be packages as .class files to run on a Java VM? A friend of mine pointed out this reference: http://www.students.cs.uu.nl/people/rjchaaft/jHaskell/old/ which looks to be a defunct projec

Re: Question about How use the ports in haskell

2003-02-26 Thread Nick Name
On Wed, 26 Feb 2003 00:54:13 + "Cesar Augusto Acosta Minoli" <[EMAIL PROTECTED]> wrote: > > ¿There's a way to input/output data from the computers' port in > Haskell? ¿What about LPT1 or Com? I guess the fastest way is to create a C library and use the FFI. If you are on linux, you can

CfP: ACL2003 Resources Infrastucture Workshop

2003-02-26 Thread steven . krauwer
ACL2003 Resources Information Infrastructure Workshop _ CALL for PAPERS Towards a Resources Information Infrastructure Workshop at ACL2003 in Sapporo (Japan)