Most systems of (first-order) logic differentiate between function
letters (aka, symbols) and predicate letters (symbols). The former are
used to build terms; the latter build atomic formulas (which can later
be combined in more complex formulas using negation, conjunction,
disjunction, and
Hi
I want to make sure a filename is valid. For example, prn and con
This is another rat's nest, so I suggest that it be dealt with
separately from the basic filepath module. The notion of valid is
squishy: It depends entirely on what you intend to do with the path.
Its a rats nest to do
Hello Jared,
Tuesday, July 18, 2006, 11:12:09 PM, you wrote:
% defining natural numbers
natural(zero).
natural(s(X)) :- natural(X).
% translate to integers
toInt(zero, 0).
toInt(s(X), N) :- toInt(X, Y), N is Y + 1.
Thank you. I can now more precisely state that what I'm trying
On Tue, 18 Jul 2006, Jared Warren wrote:
% defining natural numbers
natural(zero).
natural(s(X)) :- natural(X).
% translate to integers
toInt(zero, 0).
toInt(s(X), N) :- toInt(X, Y), N is Y + 1.
Thank you. I can now more precisely state that what I'm trying to
figure out is: what is
While we're in a period of reflection, pondering the history of haskell,
I've prepared some graphs of activity on the IRC channel.
Summary: its growing much as the mailing lists are, with more than 5000
users over the past 5 years.
Full details here,
http://www.cse.unsw.edu.au/~dons/irc/
Duncan Coutts wrote:
I believe that the smp flavour of the RTS is now built by default and so
all you need to do is use it when linking a program:
ghc-6.5 -smp Foo.hs -o foo
Yes, although -smp is now the same as -threaded, so for simplicity we'll stop
referring to -smp and just use
Hi,
In this library proposal, there are a bunch of xxxDrive functions ..
[remove them]
I strongly agree about this.
I have decided you are right, on Windows getDrive x can be written simply as:
getDrive x | isRelative x =
| otherwise = head (getDirectories x)
And given that
Hello!
The function trace is supposed to write debug messages to console.
However, when I trying to run the following program
import Debug.Trace
main = do
putStrLn xxx
return (trace yyy ())
putStrLn zzz
only xxx and zzz is displayed. yyy is missing.
Why trace is not working?
PS.
Hi,
I want to open for reading a log file that another process is locking
for write. I know it's possible, since 'cat' and 'vim' can read that
file (but not edit it, of course). How can I do that in Haskell?
'openFile' says permission denied.
Thanks,
Maurício
Alexander Vodomerov wrote:
import Debug.Trace
main = do
putStrLn xxx
return (trace yyy ())
putStrLn zzz
only xxx and zzz is displayed. yyy is missing.
Why trace is not working?
Nothing uses the value of (trace yyy ()), so it is never
evaluated.
Try this instead, which uses the
I've looked around at the various STRef examples out there, but still
nothing I write myself using this will work. I'm trying to figure out
how the s is escaping in really simple examples like
x = runST $ return 1
y = runST $ do {r - newSTRef 1; readSTRef r}
Neither of these works in ghci -
Chad Scherrer wrote:
x = runST $ return 1
y = runST $ do {r - newSTRef 1; readSTRef r}
Neither of these works in ghci
x = runST (return 1)
y = runST (do {r - newSTRef 1; readSTRef r})
The escaping s is something to do with rank 2 polymorphism.
(Search for rank in the ghc user guide, for
Hello Simon,
Simon, you are administrator of many haskell mail lists, so i wrote to
you. last day i don't receive messages in these mail lists.
investigating the problem, i found on haskell-cafe subscription page
that there are some problems in mail delivery to my address. i'm not
100% sure but i
Simon and partners,
Thank you for this paper.
As a relative newcomer to Haskell, quite few topics on the mailing
lists went right past me. Now that I've read this paper a can at least
understand generally what most topics are about.
I'd definitely recommend this as reading material to anyone
Trying to diagnose problems with mailing lists...
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Apparently Mailman was stuck, I've restarted it and it seems to be
working again. Noone's account has been disabled, as far as I can tell.
Cheers,
Simon
On 20 July 2006 06:18, Bulat Ziganshin wrote:
Hello Simon,
Simon, you are administrator of many haskell mail lists, so i wrote to
Hello Maurício,
Thursday, July 20, 2006, 1:22:01 AM, you wrote:
I want to open for reading a log file that another process is locking
for write. I know it's possible, since 'cat' and 'vim' can read that
file (but not edit it, of course). How can I do that in Haskell?
'openFile' says
Hi,
Either one of these will work:
main = do
putStrLn xxx
x - return (trace yyy ())
x `seq` putStrLn zzz
main = do
putStrLn xxx
trace yyy (return ())
putStrLn zzz
This works fine, the problem is that trace is defined to output the
first parameter before returning the second. In the case of
Alexander Vodomerov [EMAIL PROTECTED] wrote:
main = do
putStrLn xxx
return (trace yyy ())
putStrLn zzz
only xxx and zzz is displayed. yyy is missing.
This is because you never demanded the value of (trace yyy ()), so it
was never computed. The joys of laziness! To force its
Whoa. That changes everything I thought I knew about ($). Come to
think of it, one of the examples that does work it written
main = print $ runST f
where f is defined separtely. So that's consistent.
I'll take a look at the references. Thanks!
Indeed. The short answer: use
runST (long
On 2006-07-13 at 10:16BST I wrote:
Hooray! I've been waiting to ask Why aren't we asking what
laws hold for these operations?
Having thought about this for a bit, I've come up with the
below. This is intended to give the general idea -- it's not
polished code, and I'm not at all wedded to the
Hi,
The short answer: use
runST (long expression)
rather than
runST $ long expression
when it comes to higher-ranked functions such as runST.
I suppose the same holds for runSTUArray, right? But this still gives
me that same error, about being less polymorphic than expected.
Hello Chad,
Thursday, July 20, 2006, 9:38:43 PM, you wrote:
I suppose the same holds for runSTUArray, right? But this still gives
me that same error, about being less polymorphic than expected.
there is well-known problem with that _unboxed_ arrays aren't
polymorphic. Oleg Kiselyov proposed
Ok, I see now why the return is necessary. For now I'll switch to
boxed arrays until I get the rest of this down better.
But why should this...
sumArrays [] = error Can't apply sumArrays to an empty list
sumArrays (x:xs) = runSTArray (result x)
where
result x = do x0 - thaw x
On Thu, 2006-07-20 at 18:09 +0300, Alvaro Galan wrote:
Hi, im almost new in haskell world, but im trying to do a simple
graphical interface for a small program, i developed the program under
winhugs, and now i want to develop the gui also with it, but all the
libraries and kits that i download
Chad Scherrer wrote:
But why should this...
sumArrays [] = error Can't apply sumArrays to an empty list
sumArrays (x:xs) = runSTArray (result x)
where
result x = do x0 - thaw x
mapM_ (x0 +=) xs
return x0
work differently than this...
| ps: you successfully going through all the standard Haskell troubles
in
| this area :) seems that making FAQ about using ST monad will be a
| good idea :)
Indeed. If someone would like to start one, a good place for it would be
GHC's collaborative-documentation Wiki
Hello Simon,
Friday, July 21, 2006, 7:46:15 AM, you wrote:
| ps: you successfully going through all the standard Haskell troubles
in
| this area :) seems that making FAQ about using ST monad will be a
| good idea :)
Indeed. If someone would like to start one, a good place for it would be
28 matches
Mail list logo