On 2013-05-09 17:04, Hans Georg Schaathun wrote:
Does anyone have experience with integrating Haskell and Java?
I have done some searching, finding a lot of pointers but hardly
anything in terms of evaluation, successes, or caveats.
From what I see Frege looks promising, arguably not
I've been working on a new Haskell interface to the linux kernel's inotify
system, which allows applications to subscribe to and be notified of
filesystem events. An application first issues a system call that returns
a file descriptor that notification events can be read from, and then
issues
Hi.
So the natural question here is if we can employ the type system to enforce
this correspondence. Phantom types immediately come to mind, as this
problem is almost the same as ensuring that STRefs are only ever used in a
single ST computation. The twist is that the inotify interface
Maybe I understand the problem incorrectly, but it seems to me that you're
overcomplicating things.
With that kind of interface you don't actually need existential types. Or
phantom types. You can just keep Inotify inside the Watch, like this:
import Prelude hiding (init, map)
import
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Greetings,
We can currently do something like
class (Num a, Eq a) = Foo a where bar :: a - a - Bool bar =
(==)
This means that our `a' has to be an instance of Num and Eq. Apologies
for a bit of an artificial example.
Is there a way however to do
Hello everybody,
I'm trying to formulate the stream processing problem, which doesn't
seem to be solved fully by the currently existing patterns. I'm
experimenting with a new idea, but I want to make sure that I don't miss
any defining features of the problem, so here is my list. A stream
Hi Mateusz,
It's not directly possible to write a class with a choice of
superclasses; as you point out, it's not really clear what that would
mean. One workaround, though it might not be sensible in practice, is
the following.
{-# LANGUAGE ConstraintKinds, GADTs #-}
First, reify the
On May 9, 2013, at 10:36 PM, Conal Elliott co...@conal.net wrote:
BTW, have you see the new paper The constrained-monad problem? I want to
investigate whether its techniques can apply to Category friends for linear
maps and for circuits. Perhaps you’d like to give it a try as well. I got to
On Fri, May 10, 2013 at 9:00 AM, Andres Löh and...@well-typed.com wrote:
This twist is very simple to deal with if you have real existential
types,
with the relevant part of the interface looking approximately like
init :: exists a. IO (Inotify a)
addWatch :: Inotify a - FilePath - IO
On Fri, May 10, 2013 at 9:04 AM, MigMit miguelim...@yandex.ru wrote:
With that kind of interface you don't actually need existential types. Or
phantom types. You can just keep Inotify inside the Watch, like this:
Right, that is an alternative solution, but phantom types are a relatively
I'm not sure if it would work for your case, but have you considered using
DataKinds instead of phantom types? At least, it seems like it would be
cheap to try out.
http://www.haskell.org/ghc/docs/7.4.2/html/users_guide/kind-polymorphism-and-promotion.html
On Fri, May 10, 2013 at 12:52 PM,
On Fri, May 10, 2013 at 5:49 PM, Alexander Solla alex.so...@gmail.comwrote:
I'm not sure if it would work for your case, but have you considered using
DataKinds instead of phantom types? At least, it seems like it would be
cheap to try out.
On Fri, May 10, 2013 at 3:31 PM, Leon Smith leon.p.sm...@gmail.com wrote:
On Fri, May 10, 2013 at 5:49 PM, Alexander Solla alex.so...@gmail.comwrote:
I'm not sure if it would work for your case, but have you considered
using DataKinds instead of phantom types? At least, it seems like it
I'm looking for the version of haskell platform that was supposed to be
released May 6. It seems like it isn't out yet. What's preventing this from
happening, and is there anything I can do to help?
Regards,
- Clark
___
Haskell-Cafe mailing list
A value has an indefinite extent if it's lifetime is independent of any
block of code or related program structure, think malloc/free or new/gc.
A value has a dynamic extent if is lifetime is statically determined
relative to the dynamic execution of the program (e.g. a stack variable):
in this
As far as I can tell, the only thing on that list not solved currently
by `pipes` is leftovers, but I will be releasing that very soon.
Hello everybody,
I'm trying to formulate the stream processing problem, which doesn't
seem to be solved fully by the currently existing patterns. I'm
Mateusz Kowalczyk wrote:
Is there a way however to do something along the lines of:
class Eq a = Foo a where bar :: a - a - Bool bar = (==)
class Num a = Foo a where bar :: a - a - Bool bar _ _ = False
This would allow us to make an instance of Num be an instance of Foo
or an instance of
I guess you might like then
http://okmij.org/ftp/Haskell/types.html#Prepose
which discusses implicit parameters and their drawbacks (see Sec 6.2).
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
But Haskell (and GHC) have existential types, and your prototype code
works with GHC after a couple of trivial changes:
main = do
W nd0 - init
wd0 - addWatch nd0 foo
wd1 - addWatch nd0 bar
W nd1 - init
wd3 - addWatch nd1 baz
printInotifyDesc nd0
printInotifyDesc nd1
I'm a bit curious
* be reliable in the presence of async exceptions (solved by conduit,
pipes-safe),
* hold on to resources only as long as necessary (solved by conduit
and to some degree by pipes-safe),
Are you aware of
http://okmij.org/ftp/Streams.html#regions
which
20 matches
Mail list logo