Kevin Quick qu...@sparq.org writes:
I need help understanding how to express the following:
data (Cls a) = B a = B [a]
I think this only works if you have a forall in there.
data GrB a b = GrB (B a)
instance Graph GrB where ...
In the methods for the instance specification, I need
On Fri, Apr 30, 2010 at 11:30 PM, Jason Dagit da...@codersbase.com 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.
That's
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 these packages: hsx-0.7.0.
However
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.
--
brandon s. allbery
Jason Dagit da...@codersbase.com 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) =
in the actual functions where you need it.
That's solid advice in general, but it's
Jason Dagit da...@codersbase.com writes:
On Fri, Apr 30, 2010 at 11:30 PM, Jason Dagit da...@codersbase.com wrote:
Looking over this real quick, I think the Graph class should be changed to
mention a and b:
class Graph (gr a b) where ...
Won't work: you need to specify that gr has kind * -
Warren Harris warrensomeb...@gmail.com 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
Brandon S. Allbery KF8NH allb...@ece.cmu.edu 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
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 ivan.miljeno...@gmail.com wrote:
Brandon S. Allbery KF8NH allb...@ece.cmu.edu writes:
On May 1, 2010, at 02:38 , Jason Dagit wrote:
Why wasn't
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
On Fri, Apr 30, 2010 at 11:53 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
Jason Dagit da...@codersbase.com 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
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
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
Jason Dagit da...@codersbase.com 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
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
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
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 hjscript0.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
Sebastian Fischer s...@informatik.uni-kiel.de 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
Jason Dagit da...@codersbase.com 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
On May 1, 2010, at 1:28 AM, Ivan Lazar Miljenovic wrote:
Warren Harris warrensomeb...@gmail.com 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 hjscript0.5.0 happstack
Thank you. That worked.
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
Hi Aran,
On Fri, Apr 30, 2010 at 9:28 PM, Aran Donohue aran.dono...@gmail.comwrote:
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
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
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
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/bin
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:
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
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
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
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 roly.per...@dynamicaspects.org wrote:
Hi,
I've just upgraded from 6.10.1 to 6.12.1 and can't seem to find all
the library
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
On Sat, May 1, 2010 at 1:41 PM, Roly Perera
roly.per...@dynamicaspects.org 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
Thanks guys!
On 1 May 2010 14:04, Johan Tibell johan.tib...@gmail.com 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
Roly Perera roly.per...@dynamicaspects.org 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
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 cannot
On Sat, May 1, 2010 at 10:05 AM, Aaron Gray
aaronngray.li...@googlemail.com 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
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 ivan.miljeno...@gmail.com wrote:
Roly
Aaron Gray aaronngray.li...@googlemail.com 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
Roly Perera roly.per...@dynamicaspects.org 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
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
On Sat, May 1, 2010 at 3:33 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com 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
On Apr 30, 6:18 pm, John Creighton johns2...@gmail.com wrote:
On Apr 29, 7:47 am, John Creighton johns2...@gmail.com 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
Johan Tibell johan.tib...@gmail.com writes:
Hi Aran,
On Fri, Apr 30, 2010 at 9:28 PM, Aran Donohue aran.dono...@gmail.com 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
On May 1, 2010, at 3:39 AM, Daniel Fischer wrote:
Try
$ cabal install --constraint=Crypto4.2.1 --
constraint=HJScript0.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':
It is
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=Crypto4.2.1 --
constraint=HJScript0.5
happs-tutorial
This had the same problem building containers:
Building containers-0.2.0.1...
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 Fri, 30 Apr 2010 23:30:21 -0700, Jason Dagit da...@codersbase.com 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
On Sat, 01 May 2010 01:01:47 -0700, Sebastian Fischer
s...@informatik.uni-kiel.de 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
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
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, you
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 ryani.s...@gmail.com wrote:
Check out ErrorT in
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 [String])
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
(|)
Or
On Sat, 01 May 2010 15:42:09 -0700, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com 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
--
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
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
2010/04/30 Don Stewart d...@galois.com:
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
jason.dusek:
2010/04/30 Don Stewart d...@galois.com:
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:
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
Kevin Quick qu...@sparq.org 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
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_NDELAY,
61 matches
Mail list logo