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.
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
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
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
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
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
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
ACL2003 Resources Information Infrastructure Workshop
_
CALL for PAPERS
Towards a Resources Information Infrastructure
Workshop at ACL2003 in Sapporo (Japan)