Hi,
bindings-DSL[1] is a stable and reliable macro package for FFI. It just
got a new tutorial and its repository is now in git. If no one else
wants to maintain it, I'll still be looking at issue reports and fixing
possible problems, but I've not been actively using Haskell for some time,
and
On Thu, Jul 11, 2013 at 03:39:02PM -0700, KC wrote:
I ask this on this mailing list because there are quite a few
mathematically oriented people here.
If you accept the Law of Excluded Middle, everything either has a
matroid structure, or not. On the other hand, if you do not accept
it, then
I ask this on this mailing list because there are quite a few
mathematically oriented people here.
Casey
--
--
Regards,
KC
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
I'm a somewhat experienced coder but I am relatively new to Haskell.
I've got a question about whether a usage of do notation is idiomatic,
or whether it's better to use pattern matching.
I've got two functions which take an input and return Maybe SomeType.
If either returns Nothing, I also want
The do notation in this instance yields a nice advantage: if you want to
switch to a different monad to encapsulate failure you will meely need to
swap out the type signature and your function will need no further work.
On Aug 4, 2012 7:35 AM, Matthew wonderzom...@gmail.com wrote:
I'm a somewhat
Also if you don't need foo and bar you can write:
callFoo callBar return baz
//Johan
On Aug 4, 2012 8:36 AM, Matthew wonderzom...@gmail.com wrote:
I'm a somewhat experienced coder but I am relatively new to Haskell.
I've got a question about whether a usage of do notation is idiomatic,
or
On Fri, Aug 3, 2012 at 11:34 PM, Matthew wonderzom...@gmail.com wrote:
I'm a somewhat experienced coder but I am relatively new to Haskell.
I've got a question about whether a usage of do notation is idiomatic,
or whether it's better to use pattern matching.
I've got two functions which take
On Sat, Aug 4, 2012 at 7:05 AM, Alexander Solla alex.so...@gmail.com wrote:
On Fri, Aug 3, 2012 at 11:34 PM, Matthew wonderzom...@gmail.com wrote:
I'm a somewhat experienced coder but I am relatively new to Haskell.
I've got a question about whether a usage of do notation is idiomatic,
or
On Sat, Aug 4, 2012 at 7:05 AM, Alexander Solla alex.so...@gmail.com wrote:
On Fri, Aug 3, 2012 at 11:34 PM, Matthew wonderzom...@gmail.com wrote:
...
With do notation, I can write something like this:
do
foo - callFoo x
bar - callBar x
return (baz)
Is there a partial order on Haskell type classes?If so, does it induce any quasi-order relation on types named in the instances?In the example below types C and D have the same operation fThanks,Patdata C = C deriving Showdata D = D deriving Showclass A t where f::t-t f t = t instance A C
It seems like you would, going by semantics of System F, where types
with type variables name a certain subset of types, = constraints
further restrict the types of the same shape (are they an
independent kind of restriction?), so typeclass declarations
with/without = specify a partial order over
On 25/08/2011 02:59 AM, Albert Y. C. Lai wrote:
do, a block, a monad block
rec, a knot tied in the block
mu, a name that calls itself (mu is pronounced as me in modern Greek)
forM_, a long long list to run
SO, a state aborting threads (SO is stack overflow)
la, a state to follow SO
T's,
do, a block, a monad block
rec, a knot tied in the block
mu, a name that calls itself (mu is pronounced as me in modern Greek)
forM_, a long long list to run
SO, a state aborting threads (SO is stack overflow)
la, a state to follow SO
T's, tranformers of monads
that will bring us back to do
On 25 August 2011 11:59, Albert Y. C. Lai tre...@vex.net wrote:
do, a block, a monad block
rec, a knot tied in the block
mu, a name that calls itself (mu is pronounced as me in modern Greek)
forM_, a long long list to run
SO, a state aborting threads (SO is stack overflow)
la, a state to
Dear haskellers,
I was reading the terms of service of the Haskell Community Server
and found this statement:
Users residing in countries on the United States Office of Foreign
Assets Control sanction list, including Cuba, Iran, Libya, North
Korea, Sudan and Syria, may not post or access
2011/5/7 Facundo Domínguez facundoming...@gmail.com:
Dear haskellers,
I was reading the terms of service of the Haskell Community Server
and found this statement:
Users residing in countries on the United States Office of Foreign
Assets Control sanction list, including Cuba, Iran, Libya,
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 12/15/10 02:36 , Roman Cheplyaka wrote:
Regarding the rationale, I'm not so sure and I'd like to hear an
explanation from someone competent. But I assume it has something
to do with the fact that if you supply a 'do' argument, you cannot
supply
Monads seem to use fail in one of three ways:
-Regular monads leave it at the default definition of error
-MonadPlus sometimes redefines it to mzero
-IO redefines it to failIO
Are there any other definitions of fail? If not, does the special case of IO really need a class-level definition, or
I'd love for the compiler to give an error (or maybe just a warning)
in the case that I have a pattern match in a monad that just blows up
(throws an exception) on a pattern match failure.
Currently there's no way to know the behavior of failed pattern match
failures without looking at the
On Tue, Dec 21, 2010 at 08:31:08AM -0700, Jonathan Geddes wrote:
I'd love for the compiler to give an error (or maybe just a warning)
in the case that I have a pattern match in a monad that just blows up
(throws an exception) on a pattern match failure.
You will be interested to know that
everything you ask for already was in Haskell ages ago:
those were the days ... where the method in Functor method was called map,
and zero was a method of, guess what, MonadZero...
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
I'd be really interested in learning the rationale behind those changes. I'm
sure it wasn't done for capricious or arbitrary reasons, but I can't help
but see it as a step back.
--Jonathan Geddes (sent from android mobile)
On Dec 21, 2010 8:47 AM, Lauri Alanko l...@iki.fi wrote:
On Tue, Dec 21,
Am 15.12.2010 08:36, schrieb Roman Cheplyaka:
* Jonathan Geddes geddes.jonat...@gmail.com [2010-12-14 19:59:14-0700]
Quick question:
Why do I need the $ in the following bits of code?
main = withSocketsDo $ do
--do something with sockets
foo = fromMaybe 0 $ do
--do something in the
From: Roman Cheplyaka r...@ro-che.info
Sent: Wed, December 15, 2010 1:36:55 AM
* Jonathan Geddes geddes.jonat...@gmail.com [2010-12-14 19:59:14-0700]
Quick question:
Why do I need the $ in the following bits of code?
main = withSocketsDo $ do
--do something with sockets
Quick question:
Why do I need the $ in the following bits of code?
main = withSocketsDo $ do
--do something with sockets
foo = fromMaybe 0 $ do
--do something in the maybe monad
I don't see (after admittedly only a minute or so thinking about it)
where any grammar ambiguities would
* Jonathan Geddes geddes.jonat...@gmail.com [2010-12-14 19:59:14-0700]
Quick question:
Why do I need the $ in the following bits of code?
main = withSocketsDo $ do
--do something with sockets
foo = fromMaybe 0 $ do
--do something in the maybe monad
I don't see (after
Hello.
http://www.haskell.org/onlinereport/exps.html#sect3.14 a obscure (to me) note
which says
As indicated by the translation of do, variables bound by let have fully
polymorphic types while those defined by - are lambda bound and are thus
monomorphic.
What actually does it mean?
And,
On Mon, 13 Sep 2010, Alexander Kotelnikov wrote:
Hello.
http://www.haskell.org/onlinereport/exps.html#sect3.14 a obscure (to me) note
which says
As indicated by the translation of do, variables bound by let have fully polymorphic
types while those defined by - are lambda bound and are thus
2010/9/13 Henning Thielemann lemm...@henning-thielemann.de:
It means that variables bound by let, may be instantiated to different types
later.
Can you give an example, please?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Mon, Sep 13, 2010 at 8:21 AM, Alexander Kotelnikov sa...@myxomop.com wrote:
And, also, would it make any difference if
do {p - e; stmts} = let ok p = do {stmts}
ok _ = fail ...
in e = ok
is redefined as e = (\p - do {stmts})?
This is the magic that allows pattern-match
I'm looking at iteratee as a way to replace my erroneous and really
inefficient lazy-IO-based backend for an expect like Monad DSL I've been
working for about 6 months or so now on and off.
The problem is I want something like:
expect some String
send some response
to block or perhaps timeout,
David Leimbach leim...@gmail.com writes:
to block or perhaps timeout, depending on the environment, looking for
some String on an input Handle, and it appears that iteratee works
in a very fixed block size. While a fixed block size is ok, if I can
put back unused bytes into the enumerator
On Wed, Mar 31, 2010 at 12:02 PM, Gregory Collins
g...@gregorycollins.netwrote:
David Leimbach leim...@gmail.com writes:
to block or perhaps timeout, depending on the environment, looking for
some String on an input Handle, and it appears that iteratee works
in a very fixed block size.
On Wed, Mar 31, 2010 at 12:24 PM, David Leimbach leim...@gmail.com wrote:
On Wed, Mar 31, 2010 at 12:02 PM, Gregory Collins g...@gregorycollins.net
wrote:
David Leimbach leim...@gmail.com writes:
to block or perhaps timeout, depending on the environment, looking for
some String on an
I'd say we don't really need subclasses. I mean, what's the difference:
class Eq a where (==) :: a - a - Bool
instance Eq a = Eq (Maybe a) where
Nothing == Nothing = True
Just x == Just y = x == y
_ == _ = False
sort :: Eq a = [a] - [a]
or
data Eq a = Eq {eq :: a - a - Bool}
eqMaybe ::
s/subclasses/classes/
Sorry for the confusion.
Miguel Mitrofanov wrote:
I'd say we don't really need subclasses. I mean, what's the difference:
class Eq a where (==) :: a - a - Bool
instance Eq a = Eq (Maybe a) where
Nothing == Nothing = True
Just x == Just y = x == y
_ == _ = False
sort
This reminds me of an email posted to this list long ago
by Luke Palmer, describing a use of records-as-interfaces
in Agda.
--
Jason Dusek
-- Forwarded message --
From: Luke Palmer lrpal...@gmail.com
Date: 2009/12/29
Subject: Re: [Haskell-cafe] Alternatives to type
On Fri, Feb 26, 2010 at 04:23:52PM +0300, Miguel Mitrofanov wrote:
I'd say we don't really need subclasses. I mean, what's the difference:
class Eq a where (==) :: a - a - Bool
instance Eq a = Eq (Maybe a) where
Nothing == Nothing = True
Just x == Just y = x == y
_ == _ = False
sort
Hi Mauricio,
2009/12/5 Maurício CA mauricio.antu...@gmail.com:
Problem is: I don't have a Windows machine where I could test
this. So, if you need USB in windows, please keep in touch. I
wouldn't ask you to write any code, but I need to know what builds
and what doesn't.
I don't need usb
Hi,
I keep this direct binding to libusb-1.0.x:
http://hackage.haskell.org/package/bindings-libusb
on top of which Bas maintains a nice USB library:
http://hackage.haskell.org/package/usb
Work has been done to support libusb-1.0.x in Windows. So, as long
as my bindings-libusb works
I agree with what you meant, but not quite with what you said. To be
pedantic:
import Debug.Trace
foo :: Int
foo = trace Foo (bar 12)
bar :: Int - Int
bar x = trace Bar x
main :: IO ()
main = foo `seq` foo `seq` return ()
main prints Foo\nBar\n showing that the bar is only evaluated
But pedantically even the function:
quux :: Int - Int
quux x = trace Quux (bar 12)
optmain :: IO ()
optmain = quux 10 `seq` quux 11 `seq` return ()
might print only once if GHC at the optimization level selected recognizes
that quux doesn't depend on its argument and rewrote your code
Do I have this right? Remembering Memoization!
For some applications, a lot of state does not to be saved, since
initialization functions can be called early, and these functions
will remember - (memoize) their results when called again, because
of lazy evaluation?
--
Regards,
Casey
On 14/09/2009, at 9:28 AM, Casey Hawthorne wrote:
Do I have this right? Remembering Memoization!
For some applications, a lot of state does not to be saved, since
initialization functions can be called early, and these functions
will remember - (memoize) their results when called again,
I've beeing writing a low-level binding to posix that can be
usefull if you want to use posix but has no time to learn FFI:
http://hackage.haskell.org/package/bindings-posix
However, my understandment of posix is barely nothing, and I see
that many of its functionality is enabled or disabled by
do nmergeIO or mergeIO preserve order? or not preserve order?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Although it is not formally specified, my intuition for the specification is
that order is preserved within each of the lists.
Luke
On Tue, Mar 10, 2009 at 2:50 PM, Anatoly Yakovenko aeyakove...@gmail.comwrote:
do nmergeIO or mergeIO preserve order? or not preserve order?
Hmm, yea, actually that makes sense. What i am looking for is
something that maps over a list and returns the list in order which
the values are evaluated. looks like i can implement that pretty
easily with unamb.
On Tue, Mar 10, 2009 at 2:33 PM, Luke Palmer lrpal...@gmail.com wrote:
Although
I think nmergeIO . map (:[]) should do the trick.
Luke
On Tue, Mar 10, 2009 at 3:41 PM, Anatoly Yakovenko aeyakove...@gmail.comwrote:
Hmm, yea, actually that makes sense. What i am looking for is
something that maps over a list and returns the list in order which
the values are evaluated.
i think this would still force me to evailuate the whole list, right?
i would want something that pipes the results into a channel that i
can lazyly read as the results are available.
On Tue, Mar 10, 2009 at 2:44 PM, Luke Palmer lrpal...@gmail.com wrote:
I think nmergeIO . map (:[]) should do
Oh, you're right. Here are some thoughts.
You want the list you get back to only contain values in WHNF. This differs
from mergeIO co., which are simply evaluating the spine of the list, and
don't even look at the values.
I would also consider it bad style to be fully polymorphic in this
I would also consider it bad style to be fully polymorphic in this case, as
you require polymorphic seq, which is evil (though I don't have the space to
argue this right now :-). Unamb would be bad style, also, since your
semantics are nondeterministic and so you wouldn't meet the
Derek Elkins wrote:
Both are poorish style.
reader - forkIO $ forever $ do (nr', line) - readChan; when (nr /= nr') $
putStrLn hdl line
This is fine assuming you always want to re-enter the loop. If you want
to loop conditionally (which is most often the case), forever isn't
going to work,
On Sat, 2009-03-07 at 23:12 +0100, Martijn van Steenbergen wrote:
Derek Elkins wrote:
Both are poorish style.
reader - forkIO $ forever $ do (nr', line) - readChan; when (nr /= nr') $
putStrLn hdl line
This is fine assuming you always want to re-enter the loop. If you want
to loop
Derek Elkins wrote:
If you are doing something else, use something else. This makes it
clear that you -aren't- going to break out (non-exceptionally), i.e. the
control flow is more obvious in this code than in the other versions.
Oh yes, of course! I wasn't saying forever is bad; in fact I
Two questions:
a) This chat server implementation doesn't actually close the connection
as a real one would need to do. If you use forever is there a way to end
the loop so as to end the connection?
b) In Section 5 of this paper:
http://www.cs.yale.edu/~hl293/download/leak.pdf
Comparing
Personally I would not use fix. I don't think it improves readability.
-- Lennart
2009/3/5 Daryoush Mehrtash dmehrt...@gmail.com:
In this chat server implementation
http://www.haskell.org/haskellwiki/Implement_a_chat_server
forkIO is used with fix as in:
reader - forkIO $ fix $
2009/3/6 Daryoush Mehrtash dmehrt...@gmail.com:
Two questions:
a) This chat server implementation doesn't actually close the connection
as a real one would need to do. If you use forever is there a way to end
the loop so as to end the connection?
Yes, throw an exception and catch it from
On Fri, Mar 6, 2009 at 1:48 AM, Daryoush Mehrtash dmehrt...@gmail.comwrote:
Question: Do I need to worry about space leak if I am using the fix to
instead of the let?
If you need to worry about a space leak with fix, you need to worry about it
with let.
The reason arrows can tie the loop
In this chat server implementation
http://www.haskell.org/haskellwiki/Implement_a_chat_server
forkIO is used with fix as in:
reader - forkIO $
http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:.
fix $ http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v:.
On Thu, 2009-03-05 at 15:36 -0800, Daryoush Mehrtash wrote:
In this chat server implementation
http://www.haskell.org/haskellwiki/Implement_a_chat_server
forkIO is used with fix as in:
reader - forkIO $ fix $ \loop - do
(nr', line) - readChan chan'
when (nr /= nr') $
On Thu, 2009-03-05 at 16:12 -0800, Jonathan Cast wrote:
On Thu, 2009-03-05 at 15:36 -0800, Daryoush Mehrtash wrote:
In this chat server implementation
http://www.haskell.org/haskellwiki/Implement_a_chat_server
forkIO is used with fix as in:
reader - forkIO $ fix $ \loop - do
Quoth Jonathan Cast jonathancc...@fastmail.fm:
You can certainly use let:
reader - forkIO $ let loop = do
(nr', line) - readChan chan'
when (nr /= nr') $ hPutStrLn hdl line
loop
in loop
But the version with fix is clearer (at least to people who have fix in
their
On Thu, Mar 5, 2009 at 6:27 PM, Donn Cave d...@avvanta.com wrote:
Quoth Jonathan Cast jonathancc...@fastmail.fm:
You can certainly use let:
reader - forkIO $ let loop = do
(nr', line) - readChan chan'
when (nr /= nr') $ hPutStrLn hdl line
loop
in loop
On Fri, 2008-11-21 at 16:12 -0800, Ahn, Ki Yung wrote:
I am just curious about how cabal report works.
I recently figured out that there is a report command in cabal and it
reports the reports generated by --build-reports option when building a
package.
Is this because I don't have an
You only need an account for uploading packages. If you do not want to
have to enter your user name or password interactively when you run
cabal upload then you can put them in the config file:
username:
password:
That sounds like a very bad idea, and should not be encouraged!
Any compromised
On Sat, 2008-11-22 at 15:11 +, Claus Reinke wrote:
You only need an account for uploading packages. If you do not want to
have to enter your user name or password interactively when you run
cabal upload then you can put them in the config file:
username:
password:
That sounds
On Sat, Nov 22, 2008 at 03:11:34PM -, Claus Reinke wrote:
You only need an account for uploading packages. If you do not want to
have to enter your user name or password interactively when you run
cabal upload then you can put them in the config file:
username:
password:
That sounds
Any compromised uploader machine with stored passwords can
be used to upload compromising code, which will propagate to all
downloaders.
It doesn't really matter whether a compromised machine stores a password or
not. If you upload anything using a compromised machine, the attacker
has the
I am just curious about how cabal report works.
I recently figured out that there is a report command in cabal and it
reports the reports generated by --build-reports option when building a
package.
Is this because I don't have an account on Hackage yet, or because of
some other reasons?
And if
There is also the combinator approach of Text.Html, which
gives you a syntax similar to (3) but without abusing do:
(rootElt ! [xmlns http://www.w3.org/1999/xhtml;,
lang en-US xml:lang en-US]) $ concatXml
[head $ title $ text minimal
,body $ concatXml
[h1 $ text
http://hackage.haskell.org/trac/haskell-prime/wiki/DoAndIfThenElse says
(and my memory seems to agree) that GHC has been changed to accept
things like
readnums f n = do eof - hIsEOF f
if eof
then return n
else do l - hGetLine f
hi, im working ona project, and im having problem loading some code in
wxhaskell:
onOpen :: Frame a - TextCtrl b - MenuItem c - StatusField - IO ()
onOpen f sw mclose status = do mbfname - fileOpenDialog f False True Open
image fileTypescase
The indentation is not right; all the statements after the 'do' keyword need
to start exactly at the same column. In particular, the 'f' in fileContent
and 's' in set should be one below the other. And the 'return ()' also seems
to be displaced; perhaps you want that also exactly below the last
On Dec 9, 2007 10:07 AM, Daniel Fischer [EMAIL PROTECTED] wrote:
Interactive programmes without using IO? Cool :)
And how!
I think you misunderstood Lennart.
Thanks for checking. In this case, I think I understood Lennart fine and
that he was saying what you're saying.
Would you deny that
Conal,
I think TV etc. is fantastic stuff, but that mean that we cannot, say,
invoke an external program in Haskell until someone has figured out a
composable library for this?
I sincerely hope someone will, but the only way we have right now is the
ugly IO monad.
-- Lennart
On Dec 9, 2007
I think your real point is that some things we still haven't figured out how
to express functionally. Right? I would certainly agree with that part.
Perhaps you exaggerating when you wrote IO is important because you can't
write any real program without using it.
Cheers, - Conal
On Dec 9, 2007
Am Sonntag, 9. Dezember 2007 21:29 schrieb Conal Elliott:
I think your real point is that some things we still haven't figured out
how to express functionally. Right?
That's my point, at least. Currently, AFAIK, the only way to get input and
produce output is via the IO monad, so it is de
Thanks for the clarification.
AFAIK, the only way to get input and produce output is via the IO monad
Now you know something different, don't you? FRP, Pan, TV. Also
Grapefruit, functional forms, and others I'm not thinking of or don't know
about.
As for your example, mixing the IO with the
Maybe I'm exaggerating, but it's true for 96% of all programs. (96% is with
a :-))
I did not express anything that was meant to be a perpetual truth, only best
practice at the moment.
For a living I write programs that are almost without interaction with the
outside world. Still, I need a to
Hello!
I see from http://www.haskell.org/haskellwiki/Monads_as_computation#Do_notation
that
do { v - x ; stmts }
= x = \v - do { stmts }
However, look at this GHCi session:
Prelude let return' = return :: a - Maybe a
Prelude do {1 - return 1; return' ok}
Just ok
Prelude return 1 = \1 -
On Sat, Dec 08, 2007 at 02:59:16PM -0200, Felipe Lessa wrote:
Hello!
I see from
http://www.haskell.org/haskellwiki/Monads_as_computation#Do_notation
that
do { v - x ; stmts }
= x = \v - do { stmts }
However, look at this GHCi session:
Prelude let return' = return :: a - Maybe a
On Sat, Dec 08, 2007 at 03:28:58PM -0200, Felipe Lessa wrote:
On Dec 8, 2007 3:12 PM, Ilya Tsindlekht [EMAIL PROTECTED] wrote:
On Sat, Dec 08, 2007 at 02:59:16PM -0200, Felipe Lessa wrote:
Prelude do {1 - return 3; return' ok}
Nothing
Prelude return 3 = \1 - return' ok
***
hi
test :: Parser (Char,Char) test = do x - item item
y - item return (x,y)
How come this brings an error saying that after do {} it must end with an
expression.
Ryan
_
Get free
On Dec 8, 2007, at 21:38 , Ryan Bloor wrote:
test :: Parser (Char,Char)
test = do x - item
item
The second and subsequent lines are indented too much, so are read as
a continuation of the first; which, starting with x - , is not an
expression.
--
brandon s. allbery
On Dec 8, 2007, at 21:40 , Brandon S. Allbery KF8NH wrote:
On Dec 8, 2007, at 21:38 , Ryan Bloor wrote:
test :: Parser (Char,Char)
test = do x - item
item
The second and subsequent lines are indented too much, so are read
as a continuation of the first; which, starting
On Dec 9, 2007 12:42 AM, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote:
I neglected to say the proper indentation:
test = do x - item
item -- note, indented to match the token after
the do
y - item
return (x,y)
That is the best thing to
On Dec 9, 2007 1:01 AM, Ryan Bloor [EMAIL PROTECTED] wrote:
But what is the right way to indent...? It is so annoying, why does it
matter so much! :(
You may read http://en.wikibooks.org/wiki/Haskell/Indentation which
tries to explain in a very simple language.
--
Felipe.
Hi
I've probably asked about the do construct, if that's the right
label. Unfortunately I'm still not quite sure of its role and more
specifically its syntax. Something to do with generators perhaps? A
description plus some examples would be most gratefully received.
Thanks, Paul
On Dec 3, 2007 6:55 AM, PR Stanley [EMAIL PROTECTED] wrote:
Hi
I've probably asked about the do construct, if that's the right
label. Unfortunately I'm still not quite sure of its role and more
specifically its syntax. Something to do with generators perhaps? A
description plus some examples
Probably one should understand how to use monads before worrying about
the do-notation. Here are some references:
I don't totally agree. You can teach monads to beginners just fine
using the do-notation. Unsuprisingly its very much like teaching
monads using bind. You describe a two line
On 03 Dec 2007, at 13:25 , Tim Newsham wrote:
Probably one should understand how to use monads before worrying
about
the do-notation. Here are some references:
I don't totally agree. You can teach monads to beginners just fine
using the do-notation. Unsuprisingly its very much like
On Dec 3, 2007 1:09 PM, Denis Bueno [EMAIL PROTECTED] wrote:
I don't think I can conclude that there are *no* reasons to teach the
do-notation first. I just think that it is more instructive to teach
it later.
It's standard in mathematics teaching, when introducing a mathematical
structure
Another newbie question, but I can't seem to find any answers on the web...
Can someone tell me what's wrong with this?
import qualified System.Posix.Directory as PD
readdirAll :: PD.DirStream - IO [String]
readdirAll d =
do dir - PD.readDirStream d
if dir ==
then return []
On Nov 1, 2007, at 13:47 , David Carter wrote:
else rest - readdirAll d
You need another do here to use the - syntax.
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and
David Carter wrote:
readdirAll :: PD.DirStream - IO [String]
readdirAll d =
do dir - PD.readDirStream d
if dir ==
then return []
else rest - readdirAll d
return (dir:rest)
Compiling with GHC 6.6.1 gives me the not-very-useful message Parse
error in pattern,
On Fri, 2007-10-19 at 02:45 +0200, [EMAIL PROTECTED]
wrote:
PR Stanley writes:
One of the reasons I'm interested in Wikipedia and Wikibook is because
you're more likely to find Latex source code used for typesetting the
maths.
Latex is the one and only 100% tool right now.
A lot of
Henning Thielemann [EMAIL PROTECTED] writes:
Most proofs in mathematics use intuitive arguments, most proofs are not
formalized enough in order to be checked by machines. Ok, this can be
considered a deficiency of machine provers. But in the history there were
famous proofs which turned out
Paul Brown wrote:
On 10/17/07, PR Stanley [EMAIL PROTECTED] wrote:
Do you trust mathematical materials on Wikipedia?
I trust most of them to not be wrong, but I don't trust them to be right.
Mathematical concepts are bit like binary search -- getting the flavor
right isn't that
On Fri, 19 Oct 2007, Jules Bean wrote:
[EMAIL PROTECTED] wrote:
*PLEASE*, show me untrustworthy Wikipedia pages.
Any article on a disputed territory or open political dispute.
Most articles on a controversial philosophy.
Many articles on living people.
Articles on controversal topics
1 - 100 of 167 matches
Mail list logo