Hello,
I see now what you meant, thanks for the explanation.
I find the argument a bit disturbing, as it seems to imply that
it is OK for the compiler to produce code without any context switches
at all
(after all none of the context swicthes are guaranteed to happen :-).
I guess this is not true
Hello,
Ben Rudiak-Gould wrote:
...
I would say that the law holds in one direction and not the other.
It's safe to replace
do x <- readSTRef r
y <- readSTRef r
with
do x <- readSTRef r
let y = x
but not the other way around.
How can things be equal the one way and not the other?
lWorld", and so
the computation
could not be runSTed.
-Iavor
Graham Klyne wrote:
At 10:38 08/11/04 -0800, Iavor S. Diatchki wrote:
... Now the above law already doesn't hold when all GHC extensions
are used,
as when concurrency is present we cannot assume that nobody modified
Hello,
Just wanted to point out that the suggested idea is not quite correct.
(well that has to be quantiifed a bit, see bellow)
Krasimir Angelov wrote:
--- Ben Rudiak-Gould
<[EMAIL PROTECTED]> wrote:
This is solved by merging the IO and ST monads,
something that ought to
be done anyway:
ty
hello,
John Goerzen wrote:
Hello,
As I'm investigating Haskell, it's occured to me that most of the
Haskell tutorials out there have omitted something that was quite
prominent in the OCaml material I had read: making functions properly
tail-recursive.
The OCaml compiler was able to optimize tail-re
hello,
the types IO(IO ()) and IO() are not the same.
think of a value of type "IO a" as a _program_ that when executed
will return a result of type "a" (and while executing may print some
stuff to the screen).
now consider these types:
putStrLn :: String -> IO ()
this is a _pure function_ which
hello,
Fergus Henderson wrote:
On 10-Sep-2004, Cale Gibbard <[EMAIL PROTECTED]> wrote:
Just in case it's not what you're referring to,
http://www.haskell.org/ghc/docs/latest/html/libraries/index.html
together with the Haskell report
http://www.haskell.org/onlinereport/
generally does the trick
hello,
i was thinking of higher-order functions, which i think complicate things
(i might be wrong though :-)
for example:
fix :: (a -> a) -> a
is ploymorphic, but is it a natural tranformation?
i belive it is in fact a di-natural transformation.
-iavor
On Jun 29, 2004, at 6:46 PM, I
hi,
just a few silly remarks...
[EMAIL PROTECTED] wrote:
For two functors F, G: C -> D, there is a natural transformation tau
from F to G, if for every object a in C, there is morphism tau[a]: F(a)
-> G(a) in D.
In Haskell, natural transformations are polymorphic functions, tau :: f
a -> g a. For e
hello,
Greg Morrisett wrote:
Iavor S. Diatchki wrote:
what would be cool is to have a place where
one has many versions of the same program, but each written in the
"most natural"
way for the particular language --- a kind of "rosetta stone" for
programming languages.
hello,
according to the report there should be no connection between modules
and files, and one should be able to have multiple modules in a file,
and even a single module in multiple files. however none of the
implementations
support that, so in effect there is 1-1 correspondence between modules
hi ron,
here are the relations between the two formulations of monads:
(using haskell notation)
map f m = m >>= (return . f)
join m = m >>= id
m >>= f = join (fmap f m)
there are quite a few general concepts that you need
to understand in what sense monads are monoids, but
to unde
hi,
i have thought about things like that, but the qualification
Type.Constructor does
not seem particularly useful. you can achieve the same by using "_", e.g
data A = A_X | A_Y
data B = B_X | B_Y
alternatively (at least for non-recursilve datatypes) anonymous sums
(ala TREX's records)
could wo
hello,
this is an attempt to give an answer to someone who is new to Haskell.
the answer to your question is: no, there is no way to "catch" _|_,
as that would mean that we can solve the halting problem.
a piece of advice, especially while you are new to haskell ---
don't worry too much about _|_.
ork with computations that manipulate state, but can also
raise exceptions?
-iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OH
type
constructor" instead of just a "constructor" in its error message? Or
perhaps it could simply say "type"?
-kzm
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and
type
v -> (t->t) -> (w->w)
for some type w of class Space.
Any help much appreciated.
Is there any kind of tutorial introduction to "forall" out there?
Cheers,
Theo Norvell
___
Haskell-Cafe mailing list
[EMAIL PRO
atterns been made obsolete?
-iavor
--
==========
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
with its behaviour, or one can make the code lazy,
but then is some situations it will leak.
just my 2 stotinki.
iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at
fe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
r opening file"
The user gets a message like
Fail: user error
Reason: Error opening file
which is confusing to the user, because it the user's fault. Is there some
other way that it is recommended one fail? Or should I be catching
userErrors at the top level and failing with my own erro
(4 - 0)))
foldl groups things to the left, while foldr groups them to the right.
hope this helped
bye
iavor
--
==========
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU
fact we have it implemented in one of
the projects i am currently working on. hopefully one day GHC will also
dispense with the hi-boot files.
bye
iavor
--
======
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science an
ormers, one that comes to mind is
"Monad Transformers and Modular Interpreters"
by Sheng Liang, Paul Hudak, and Mark P. Jones
hope this helped
bye
iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Sci
ation for computations in the
environment monad, so in my mind the above two definitions are pretty
much the same.
bye
iavor
--
======
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| Sch
ll module system.
unfortunatelly with the Haskell module system approach you soon run into
recursive modules (when objects depend on each other) and this is not
well supported by Haskell implementations at the moment.
bye
iavor
--
======
| Iavor S. Diatchk
of the records in the list actually matters.
bye
iavor
--
==========
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http:
rkshop
i think).
bye
iavor
--
==========
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http:
28 matches
Mail list logo