I was wondering if a good approach to java interoperability might be a
Haskell Jaskell Interface. Jaskell allows some haskell programs to run
on the java virtual machine and dealt with some of the issues with
regards to interfacing haskell with java on the virtual machine side
of things. Therefore
>>> In GHC, if a thread spawned by forkIO blocks on some network or
>>> disk IO, is the threading system smart enough not to wake the thread
... "disk IO", you say?
Most platforms support asynchronous I/O for what UNIX calls `slow'
devices - pipe, tty, Berkeley socket. Select, poll, kqueue, O_ND
"Kevin Quick" writes:
> I was trying to put them on the inside. Essentially I was trying to
> use the 'a' portion of the LNode as a type that would provide methods
> from which I could reconstruct the shape of the Graph. Or to put it
> another way, I had a collection of data and I wanted to be a
On May 1, 2010, at 10:54 AM, Warren Harris wrote:
I think I'll have to wait for Jeremy's update.
On the plus side, the comments/source in the tutorial are pretty good
to follow the source along as an example, even if you don't compile
and run them. I didn't bother installing happstack-tu
jason.dusek:
> 2010/04/30 Don Stewart :
> > Prior to the upgrade we weren't mostly beaten on speed, so I think a bit
> > of tuning (ghc -server :) should help.
>
> What do you mean by that? I tried searching the flags page:
>
>
> http://www.haskell.org/ghc/docs/6.12.2/html/users_guide/flag
2010/04/30 Don Stewart :
> Prior to the upgrade we weren't mostly beaten on speed, so I think a bit
> of tuning (ghc -server :) should help.
What do you mean by that? I tried searching the flags page:
http://www.haskell.org/ghc/docs/6.12.2/html/users_guide/flag-reference.html
I couldn't
Something needs to be done about the GTKhs mailing list. It is flooded
with spam that no one would want coming to their in box:
http://haskell.org/pipermail/gtkhs/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/lis
Check the laws that instances of MonadPlus and Alternative should comply
with to help you make your decision.
Cheers
Mark
Sean Leather wrote:
I want to generalize a set of functions from lists to some functor
type. I require the following three operation types.
f a
a -> f a
f a -> f a
On Sat, 01 May 2010 15:42:09 -0700, Ivan Lazar Miljenovic
wrote:
instance Graph GrB where
-- instance (Cls a) => Graph GrB where -- error: ambiguous constraint, must
mention type a
-- instance (Cls a) => forall a. Graph GrB where -- error: malformed instance
header
-- instance (Cls a) Graph
The errors in the older code were due to not supplying enough input
arguments to all my class instance declarations. My final code works
and is pasted bellow:
{-# LANGUAGE EmptyDataDecls,
MultiParamTypeClasses,
ScopedTypeVariables,
FunctionalDependencies,
I want to generalize a set of functions from lists to some functor type. I
require the following three operation types.
f a
a -> f a
f a -> f a -> f a
Should I choose MonadPlus and use these?
mzero
return
mplus
Or should I choose Alternative and use these?
empty
pure
(<|>)
O
"Kevin Quick" writes:
> Yes, I was hoping to use FGL directly (or it's replacement as I've
> scanned some of the recent Cafe discussions and seen that Ivan in
> particular is undertaking this).
FGL isn't really set up for this kind of "the data type _must_ be
restricted" approach.
> The key here
It's called "monad transformers"
func1' :: Int -> EitherT Error IO String
func1' n = EitherT $ func1 n
func2' :: Int -> EitherT Error IO String
func2' s = EitherT $ func2 n
runCalc' :: Int -> EitherT Error IO [String]
runCalc' param = func1' param >>= func2'
runCalc :: Int -> IO (Either Error [St
You might want to make a local version of ErrorT in your library, to
avoid the silly 'Error' class restriction. This is pretty easy; just
copy it from the 'transformers' or 'mtl' package.
On Sat, May 1, 2010 at 14:42, Ryan Ingram wrote:
> Check out ErrorT in Control.Monad.Error
>
>> :t ErrorT
> E
Check out ErrorT in Control.Monad.Error
> :t ErrorT
ErrorT :: m (Either e a) -> ErrorT e m a
> :info ErrorT
instance (Monad m, Error e) => Monad (ErrorT e m)
> :info Error
class Error e where
noMsg :: e
strMsg :: String -> e
So, if you can make your Error type an instance of this class,
Hello!
I have some sort of strange question:
assume that there are 2 functions
func1 :: Int -> IO (Either Error String)
func2 :: String -> IO (Either Error [String])
in case if there will be no IO involved, I could use
Control.Monad.Either and write something like
runCalc :: Int -> IO (Either
On Sat, 01 May 2010 01:01:47 -0700, Sebastian Fischer
wrote:
On May 1, 2010, at 8:08 AM, Ivan Lazar Miljenovic wrote:
* I can't redefine the Graph methods to introduce the (Cls a)
constraint [reasonable]
Not sure if you can.
I think Kevin means that he cannot change the signature of the
On Fri, 30 Apr 2010 23:30:21 -0700, Jason Dagit wrote:
On Fri, Apr 30, 2010 at 11:08 PM, Ivan Lazar Miljenovic <
ivan.miljeno...@gmail.com> wrote:
You're putting the constraint in the wrong places: put the "(Cls a) => "
in the actual functions where you need it.
I need to use Cls methods in
On 01/05/10 16:17, Bas van Dijk wrote:
I created a ticket about the "asynchronous exception wormholes" so
that we won't forget about them:
http://hackage.haskell.org/trac/ghc/ticket/4035
Thanks - don't worry, I haven't forgotten, just been busy with other things.
Cheers,
Simon
__
On May 1, 2010, at 10:48 AM, Daniel Fischer wrote:
Add a --constraint="base>=4"
That should fix containers-0.2.0.1, but it might break something else.
Sorry...
$ cabal install --constraint="Crypto<4.2.1" --
constraint="HJScript<0.5" --constraint="base>=4" happs-tutorial
Resolving depende
Am Samstag 01 Mai 2010 19:06:33 schrieb Warren Harris:
> On May 1, 2010, at 3:39 AM, Daniel Fischer wrote:
> > Try
> >
> > $ cabal install --constraint="Crypto<4.2.1" --
> > constraint="HJScript<0.5"
> > happs-tutorial
>
> This had the same problem building containers:
>
> Building containers-0.2.
On May 1, 2010, at 3:39 AM, Daniel Fischer wrote:
Try
$ cabal install --constraint="Crypto<4.2.1" --
constraint="HJScript<0.5"
happs-tutorial
This had the same problem building containers:
Building containers-0.2.0.1...
Data/IntMap.hs:182:7:
Could not find module `Data.Data':
Johan Tibell writes:
> Hi Aran,
>
> On Fri, Apr 30, 2010 at 9:28 PM, Aran Donohue wrote:
>
> Thanks for the excellent links, that's exactly what I wanted. It's
> interesting that they've chosen not to base the new work on
> libevent.
>
> The reason was mostly performance concerns du
On Apr 30, 6:18 pm, John Creighton wrote:
> On Apr 29, 7:47 am, John Creighton wrote:
>
> > I've been trying to apply some stuff I learned about functional
> > dependencies, but I run into one of two problems. I either end up with
> > inconsistent dependencies (OverlappingInstances doesn't see
On Sat, May 1, 2010 at 3:33 PM, Ivan Lazar Miljenovic
wrote:
> You need to know which library they're in.
You can use the ghc-pkg tool to do this:
$ ghc-pkg find-module Control.Monad.State
/usr/lib/ghc-6.12.1/package.conf.d
monads-fd-0.0.0.1
mtl-1.1.0.2
I created a ticket about the "asynchronous exception wormholes" so
that we won't forget about them:
http://hackage.haskell.org/trac/ghc/ticket/4035
regards,
Bas
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listi
Roly Perera writes:
> Thanks for those replies, it's a lot clearer now. By the way, is there
> a unified package view for all the documentation shipped with the
> Haskell Platform, or do I need to know what library to look in?
You need to know which library they're in.
However, cabal-install no
Aaron Gray writes:
> I am relatively new to Haskell. I am attempting to get "Typing Haskell in
> Haskell" to work on HUGS or GHC.
>
>http://web.cecs.pdx.edu/~mpj/thih/
>
> I am getting an error on loading SourcePrelude :-
>
>Hugs> :l SourcePrelude
>ERROR ".\PPrint.hs" - Can't find imp
Thanks for those replies, it's a lot clearer now. By the way, is there
a unified package view for all the documentation shipped with the
Haskell Platform, or do I need to know what library to look in?
cheers,
Roly
On 1 May 2010 15:33, Ivan Lazar Miljenovic wrote:
> Roly Perera writes:
>> I've j
On Sat, May 1, 2010 at 10:05 AM, Aaron Gray
wrote:
> Hi,
> I am relatively new to Haskell. I am attempting to get "Typing Haskell in
> Haskell" to work on HUGS or GHC.
> http://web.cecs.pdx.edu/~mpj/thih/
> I am getting an error on loading SourcePrelude :-
> Hugs> :l SourcePrelude
> ERROR
Hi,
I am relatively new to Haskell. I am attempting to get "Typing Haskell in
Haskell" to work on HUGS or GHC.
http://web.cecs.pdx.edu/~mpj/thih/
I am getting an error on loading SourcePrelude :-
Hugs> :l SourcePrelude
ERROR ".\PPrint.hs" - Can't find imported module "Pretty"
And I ca
Roly Perera writes:
> I've just upgraded from 6.10.1 to 6.12.1 and can't seem to find all
> the library documentation. This page is apparently the documentation
> root:
>
> http://www.haskell.org/ghc/docs/6.12.1/html/
>
> but if I click through to the Haskell Hierarchical Libraries page
>
> http:/
Thanks guys!
On 1 May 2010 14:04, Johan Tibell wrote:
> On Sat, May 1, 2010 at 3:02 PM, Sebastian Fischer <
> s...@informatik.uni-kiel.de> wrote:
>
>> I guess I either need to install profiling libraries for uniplate, or
>>> disable profiling of those functions coming from uniplate.
>>>
>>
>> E
On Sat, May 1, 2010 at 1:41 PM, Roly Perera
wrote:
> I can't for example find Control.Monad.State. I guess I'm missing
> something obvious about how things are organised?
The following places might therefore be of interest:
http://hackage.haskell.org/package/mtl
http://hackage.haskell.org/packag
Hello,
I would recommend:
darcs get --lazy http://patch-tag.com/r/mae/happstack
cd happstack
chmod +x bin/build-install-all.sh
./bin/build-install-all.sh
This should install the latest version of happstack from darcs which
resolves most install problems. I intend to release it any minute now,
Those libraries are not distributed with the compiler. Use either The
Haskell Platform, or hackage to get those packages.
On Saturday, May 1, 2010, Roly Perera wrote:
> Hi,
>
> I've just upgraded from 6.10.1 to 6.12.1 and can't seem to find all
> the library documentation. This page is apparentl
On Sat, May 1, 2010 at 3:02 PM, Sebastian Fischer <
s...@informatik.uni-kiel.de> wrote:
> I guess I either need to install profiling libraries for uniplate, or
>> disable profiling of those functions coming from uniplate.
>>
>
> Exactly. For the former
>
>cabal install --reinstall --enable-li
I guess I either need to install profiling libraries for uniplate,
or disable profiling of those functions coming from uniplate.
Exactly. For the former
cabal install --reinstall --enable-library-profiling uniplate
should do the trick.
Sebastian
--
Underestimating the novelty of the fu
Hi all,
I have a code which makes use of the uniplate package.
When I try to compile with profiling enabled, I get the following error:
$$ ghc --make -O2 -prof -auto-all test.hs
test.hs:10:7:
Could not find module `Data.Generics.Uniplate.Data':
Perhaps you haven't installed the profili
Hi,
I've just upgraded from 6.10.1 to 6.12.1 and can't seem to find all
the library documentation. This page is apparently the documentation
root:
http://www.haskell.org/ghc/docs/6.12.1/html/
but if I click through to the Haskell Hierarchical Libraries page
http://www.haskell.org/ghc/docs/6.12.
Limestraël wrote:
> Heinrich, I saw you updated your operational package (you considered my
> remark about ProgramView, thank you)
Your feedback is much appreciated. :)
> I saw you added a liftProgram function, however it is not like the mapMonad
> function you were talking about.
> mapMonad was:
Am Samstag 01 Mai 2010 13:16:55 schrieb Limestraël:
> Hello Café,
>
> When I was trying to cabal-install haskell-src, I came up with:
> cabal: The program happy is required but it could not be found
>
> However, the happy package was actually installed and the 'happy'
> executable was in ~/.cabal/b
Hello Café,
When I was trying to cabal-install haskell-src, I came up with:
cabal: The program happy is required but it could not be found
However, the happy package was actually installed and the 'happy' executable
was in ~/.cabal/bin (which was in my PATH)
I had to link ~/.cabal/bin/happy to /u
Heinrich, I saw you updated your operational package (you considered my
remark about ProgramView, thank you)
I saw you added a liftProgram function, however it is not like the mapMonad
function you were talking about.
mapMonad was:
mapMonad :: (Monad m1, Monad m2) =>
(foral
Am Samstag 01 Mai 2010 10:34:22 schrieb Warren Harris:
> On May 1, 2010, at 1:28 AM, Ivan Lazar Miljenovic wrote:
> > Warren Harris writes:
> >> On May 1, 2010, at 12:08 AM, Alexander Solla wrote:
> >>> I think that if you run this, you will satisfy all the dependencies:
> >>>
> >>> cabal install
Hello Richard,
Saturday, May 1, 2010, 1:34:19 PM, you wrote:
> If libraries foo and bar are compiled using the same version of GHC, is
> is possible to link the two libraries into the same executable? Does
at the last end, you can put each entire library plus ghc runtime into dll
--
Best reg
Hello
I have a few questions about using Haskell (GHC, in particular) to write
self-contained libraries with a C interface.
If libraries foo and bar are compiled using the same version of GHC, is
is possible to link the two libraries into the same executable? Does
anything special nee
Hi Aran,
On Fri, Apr 30, 2010 at 9:28 PM, Aran Donohue wrote:
> Thanks for the excellent links, that's exactly what I wanted. It's
> interesting that they've chosen not to base the new work on libevent.
The reason was mostly performance concerns due to libev(ent) using callbacks
to signal event
Hello
I'm trying to write self-contained Mac OS X plug-ins
(http://developer.apple.com/mac/library/documentation/CoreFoundation/Conceptual/CFPlugIns/CFPlugIns.html)
using GHC. I want the plug-in to be usable on a clean system (i.e., GHC
and XCode are not installed). Does anyone have experien
On May 1, 2010, at 1:28 AM, Ivan Lazar Miljenovic wrote:
Warren Harris writes:
On May 1, 2010, at 12:08 AM, Alexander Solla wrote:
I think that if you run this, you will satisfy all the dependencies:
cabal install "hjscript<0.5.0" happstack
Thank you. That worked. I had a similar probl
Warren Harris writes:
> On May 1, 2010, at 12:08 AM, Alexander Solla wrote:
>>
>> I think that if you run this, you will satisfy all the dependencies:
>>
>> cabal install "hjscript<0.5.0" happstack
>>
>
> Thank you. That worked. I had a similar problem installing the
> happstack-tutorial, but fou
Jason Dagit writes:
> On Sat, May 1, 2010 at 12:49 AM, Ivan Lazar Miljenovic <
> I thought we were discussing how expressive the Graph typeclass is, not
> whether I made a sensible implementation. I mean, I could pretty easily fix
> that "problem", but I think that's not the important topic. Fo
Sebastian Fischer writes:
>> Furthermore, as I said earlier,
>> it doesn't make sense to constrain the label type just to make an
>> instance of a type class.
>>
>> (Now, if we had other functions in there which _might_ depend on the
>> label types, this _would_ make sense; as it stands however,
On Sat, May 1, 2010 at 12:49 AM, Ivan Lazar Miljenovic <
ivan.miljeno...@gmail.com> wrote:
> Jason Dagit writes:
>
> > On Sat, May 1, 2010 at 12:23 AM, Ivan Lazar Miljenovic <
> > ivan.miljeno...@gmail.com> wrote:
> >
> >> Hmmm this is an interesting way of doing it, but I would argue that
>
On May 1, 2010, at 12:08 AM, Alexander Solla wrote:
I think that if you run this, you will satisfy all the dependencies:
cabal install "hjscript<0.5.0" happstack
Thank you. That worked. I had a similar problem installing the
happstack-tutorial, but found that I could work around it with t
On May 1, 2010, at 8:08 AM, Ivan Lazar Miljenovic wrote:
* I can't redefine the Graph methods to introduce the (Cls a)
constraint [reasonable]
Not sure if you can.
I think Kevin means that he cannot change the signature of the methods
in the Graph class because those are defined in the FG
Furthermore, as I said earlier,
it doesn't make sense to constrain the label type just to make an
instance of a type class.
(Now, if we had other functions in there which _might_ depend on the
label types, this _would_ make sense; as it stands however, it
doesn't.)
You'll notice that my empty
Jason Dagit writes:
> On Sat, May 1, 2010 at 12:23 AM, Ivan Lazar Miljenovic <
> ivan.miljeno...@gmail.com> wrote:
>
>> Hmmm this is an interesting way of doing it, but I would argue that
>> it's pointless: the fact that you're using MPTCs doesn't give you
>> anything extra that the original
On Sat, May 1, 2010 at 12:23 AM, Ivan Lazar Miljenovic <
ivan.miljeno...@gmail.com> wrote:
> Hmmm this is an interesting way of doing it, but I would argue that
> it's pointless: the fact that you're using MPTCs doesn't give you
> anything extra that the original class. Furthermore, as I said
Hmmm this is an interesting way of doing it, but I would argue that
it's pointless: the fact that you're using MPTCs doesn't give you
anything extra that the original class. Furthermore, as I said earlier,
it doesn't make sense to constrain the label type just to make an
instance of a type cla
On Fri, Apr 30, 2010 at 11:53 PM, Ivan Lazar Miljenovic <
ivan.miljeno...@gmail.com> wrote:
> Jason Dagit writes:
>
> > On Fri, Apr 30, 2010 at 11:08 PM, Ivan Lazar Miljenovic <
> > ivan.miljeno...@gmail.com> wrote:
> >>
> >>
> >> You're putting the constraint in the wrong places: put the "(Cls a
On Apr 30, 2010, at 11:28 PM, Warren Harris wrote:
$ cabal install happstack
Resolving dependencies...
cabal: cannot configure HJScript-0.5.0. It requires hsx >=0.7.0
For the dependency on hsx >=0.7.0 there are these packages:
hsx-0.7.0. However
none of them are available.
hsx-0.7.0 was excl
Sorry for the useless noise, I realised just after I sent this that
that is what Jason said initially :s
On 1 May 2010 17:02, Ivan Lazar Miljenovic wrote:
> "Brandon S. Allbery KF8NH" writes:
>
>> On May 1, 2010, at 02:38 , Jason Dagit wrote:
>>> Why wasn't the Graph class designed this way? My
"Brandon S. Allbery KF8NH" writes:
> On May 1, 2010, at 02:38 , Jason Dagit wrote:
>> Why wasn't the Graph class designed this way? My guess: It was
>> probably a decision that predated multiparameter type classes.
>
>
> Or a specific decision was made to stick to Haskell'98 compatibility.
I w
Warren Harris writes:
> I thought I'd install happstack to give it a try, but immediately hit
> the following build problem:
>
> $ cabal install happstack
> Resolving dependencies...
> cabal: cannot configure HJScript-0.5.0. It requires hsx >=0.7.0
> For the dependency on hsx >=0.7.0 there are th
65 matches
Mail list logo