When attempting to build hsh, I get complaint that it can't satisfy
dependency for mtl-any.
How can I get this?
Thanks!
**
wget
http://software.complete.org/hsh/static/download_area/1.2.0/hsh_1.2.0.tar.gz
[EMAIL PROTECTED]:~/haskellInstalls/hsh$ sudo runghc Setup.lhs configure
Se
and I'm on...
[EMAIL PROTECTED]:~/haskellInstalls$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.6
2007/3/21, Thomas Hartman <[EMAIL PROTECTED]>:
When attempting to build hsh, I get complaint that it can't satisfy
dependency for mtl-any.
How can I get this?
Thanks!
Some progress, but still not solved.
I built ghc6.6 from source, but apt-get / libghc6-mtl-dev now seem to
be circularly dependent.
I'm not such an apt expert, is there an easy way out of this using
packages or do I have to keep building everything from source?
*
[EMAIL PROTECTED]:
Furthermore (as the above messages suggest and locate confirms), I
seem to have mtl already
I took a wild guess and tried specifying this with ghc -i
like
sudo runghc -i/usr/lib/ghc6-mtl-dev Setup.lhs configure
and sudo runghc -i/usr/lib/ Setup.lhs configure
but no dice.
***
[EMA
S. Alexander Jacobson wrote:
Conceptually, I think what I really want is the data structure
equivalent of type inference. Just as I don't want to be forced to
declare my function types, I don't want to be forced to declare my
data types. The field labels I use should be enough to define the
Hi,
I would like to write a function untilM, which would be to until as mapM is to
map.
An example use would be if I had a function
dice :: State Int Int
which returns random dice throws within a state monad.
Then I'd like to be able to do something like
untilM (\(s,p)-> s>=100) f (0,1)
whe
Recently I've been hacking together a small Haskell module on top of
ptrace(2). It's comming along nicely, but it's very low level. The
signals arrive in a list:
wait :: Int -> IO [Signal]
and processing of the signals can be done using e.g. mapM_:
wait childPid >>= mapM_ processSignal
In
DavidA wrote:
So I figure untilM should look something like:
untilM :: Monad m => (a -> Bool) -> (a -> m a) -> a -> m a
untilM p f x = return (if p x then x else untilM p f (f x))
The problem is that the two branches of the conditional have different types.
If I try to remedy that by changing "t
"Claus Reinke" <[EMAIL PROTECTED]> writes:
>> I won't try to understand fix just yet, but I'm still confused by
>> the type of fix:
>> fix :: (a -> a) -> a
>> It appears to me that it takes a function as an argument, and that
>> function takes a single argument. So how are you passing fix an
> "Thomas" == Thomas Hartman <[EMAIL PROTECTED]> writes:
Thomas> Furthermore (as the above messages suggest and locate confirms), I
Thomas> seem to have mtl already
Thomas> I took a wild guess and tried specifying this with ghc -i
Thomas> like
Thomas> sudo runghc -i/usr/lib/ghc6-mtl-dev Set
[trigger garbage collection when open runs out of free file descriptors, then
try again]
so, instead of documenting limitations and workarounds, this issue should be
fixed in GHC as well.
This may help in some cases but it cannot be relied upon. Finalizers are
always run in a separate thread (
Interesting, but what if 'p' is also a monadic action? For instance,
it might access the state of the State monad which 'f' is updating.
On Mar 21, 2007, at 5:31 AM, Jules Bean wrote:
..but here 'f' is a pure function, not a monadic action. If you
want f to be a monadic action then you want
David F. Place wrote:
Interesting, but what if 'p' is also a monadic action? For instance,
it might access the state of the State monad which 'f' is updating.
Then I'd stop trying to do it as a one-liner, I suspect:
let untilM p f x = do
cond <- p x
if cond then return x
else do y <- f x
So, the next question is: Why isn't this already in Control.Monad?
On Mar 21, 2007, at 8:27 AM, Jules Bean wrote:
David F. Place wrote:
Interesting, but what if 'p' is also a monadic action? For
instance, it might access the state of the State monad which 'f'
is updating.
Then I'd stop t
David F. Place wrote:
So, the next question is: Why isn't this already in Control.Monad?
Some people have proposed it.
Part of the reason is all the possible variations (monadic action,
monadic test, monadic filter, etc etc), and it's all really very easy to
write yourself.
Perhaps it's e
On Mar 21, 2007, at 8:40 AM, Jules Bean wrote:
Part of the reason is all the possible variations (monadic action,
monadic test, monadic filter, etc etc), and it's all really very
easy to write yourself.
Indeed, I had just written
whileM_ p a = do cond <- p ; if cond then do a ; whileM_ p
DavidA wrote:
> I would like to write a function untilM, which would be to until as mapM is
> to
> map.
>
> An example use would be if I had a function
> dice :: State Int Int
> which returns random dice throws within a state monad.
>
> Then I'd like to be able to do something like
> untilM (\(
On Wed, Mar 21, 2007 at 09:28:15AM +, Magnus Therning wrote:
> Recently I've been hacking together a small Haskell module on top of
> ptrace(2). It's comming along nicely, but it's very low level. The
> signals arrive in a list:
>
> wait :: Int -> IO [Signal]
Aside: Why lazy? It seems lik
On Wed, Mar 21, 2007 at 07:19:20 -0700, Stefan O'Rear wrote:
>On Wed, Mar 21, 2007 at 09:28:15AM +, Magnus Therning wrote:
>> Recently I've been hacking together a small Haskell module on top of
>> ptrace(2). It's comming along nicely, but it's very low level. The
>> signals arrive in a list:
Whooops. Thanks for the correction.
On 3/20/07, Levent Erkok <[EMAIL PROTECTED]> wrote:
On 3/19/07, Nicolas Frisby <[EMAIL PROTECTED]> wrote:
> Nope, but I believe the two are equipotent. This usage of "believe" is
> one of those "I think I remember reading it somewhere" usages.
>
> On 3/19/0
I am reading Hudak's paper Modular Domain Specific Languages and Tools
[1] and am confused by his use of the term `Partial Evaluation'. I
understand it to mean supplying some but not all arguments to a
function, e.g. (+3) but it seems to mean something else too. This is in
the context of optimi
Hello,
Partial evaluation in this context (programming languages research)
usually refers to "compile time" optimization techniques such as
statically evaluating as much of a function as possible (e.g. going into
the function body and evaluating as much as possible that doesn't depend
on the f
jim burton wrote:
I am reading Hudak's paper Modular Domain Specific Languages and Tools
[1] and am confused by his use of the term `Partial Evaluation'. I
understand it to mean supplying some but not all arguments to a
function, e.g. (+3) but it seems to mean something else too.
That's parti
I think you are confusing "partial application" and "partial evaluation".
Though they are conceptually related.
The former is what happens when you apply a function of arity N to M
arguments, where M < N. In Haskell the partially applied function is
suspended, pending the rest of its arguments.
T
In John Hughes's "Programming With Arrows"
(http://www.cs.chalmers.se/~rjmh/afp-arrows.pdf), he discusses a
"stream function" type
newtype SF a b = SF {runSF :: [a] -> [b]}
and gives
instance Arrow SF where
He gives some examples using this, and everything seems to go just fine.
But in Ross
Hello,
> In John Hughes's "Programming With Arrows"
> (http://www.cs.chalmers.se/~rjmh/afp-arrows.pdf), he discusses a
> "stream function" type
> newtype SF a b = SF {runSF :: [a] -> [b]}
> and gives
> instance Arrow SF where
> He gives some examples using this, and everything seems to go jus
Benjamin Franksen wrote:
> Bertram Felgenhauer wrote:
>> Having to rely on GC to close the fds quickly enough is another problem;
>> can this be solved on the library side, maybe by performing GCs when
>> running out of FDs?
>
> Claus Reinke wrote:
>> in good old Hugs, for instance, we find in fun
These sort of things come up from time to time. Why not make a proposal?
http://www.haskell.org/pipermail/haskell-cafe/2006-February/014214.html
Dominic.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/ha
Alex Queiroz wrote:
>
> I don't quite get how ($!) works. I have this function:
>
> ids <- liftM (map fromSql . concat ) $! quickQuery con query []
There's a difference between an IO action and the result of said action,
and similarly there's a difference between making sure an action is
e
On 2007-03-21, Thomas Hartman <[EMAIL PROTECTED]> wrote:
> Some progress, but still not solved.
>
> I built ghc6.6 from source, but apt-get / libghc6-mtl-dev now seem to
> be circularly dependent.
What distribution and version are you running?
___
Haske
I suppose there are plenty of flavors for such functions, and they are
simple enough to write.
One I've been using a bit is this one:
loopM :: Monad m => a -> (a -> m (Maybe a)) -> m ()
loopM start action = loop start
where
loop i =
do result <- action i
case
31 matches
Mail list logo