Hello,
Duncan Coutts wrote:
...
So while we would like to be able for users to do this:
import Graphics.UI.Gtk
... Button.setLabel ...
I don't think you can do things like this with the current module system.
One possible extension that might solve this problem is to allow partial
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?
I
this optimiziation in such situations.
I think the law holds then, as I think no reference can escape to
concurrent threads,
as if they did their region parameter would become RealWorld, and so
the computation
could not be runSTed.
-Iavor
Graham Klyne wrote:
At 10:38 08/11/04 -0800, Iavor S
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:
hi,
the foldr definition can be fixed by putting a ~ on the pattern in 'select'.
-iavor
Remi Turk wrote:
On Sun, Oct 31, 2004 at 06:37:20PM +0100, Lemming wrote:
I encountered that the implementation of 'partition' in GHC 6.2.1 fails
on infinite lists:
partition :: (a - Bool) - [a] -
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
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, Iavor S. Diatchki
hi,
of course it is not a _language_ shootout, but rather _language
implementation_ shootout
(actually not even that..., and yes, i agree that some of the tests are
silly, or even non-sensical, e.g. list processing)
it still has some interesting results though. for example it points out
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.
The ICFP programming contest
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
hi,
i don't think this is a bug, and this is a situation where it matters
if you use ($) or parens. the same probelm occurs when you work
with polymorohism, rank-2 and above, e.g. when you use runST.
the problem occurs because ($) has a monomorphic (non-overloaded)
type:
($) :: (a - b) - (a - b)
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
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
hello,
i have been using the hirarchical module system quite a bit lately,
and i often find myself writing things like:
import Syntax.Core.Struct as Struct
import Utils.Set as Set
etc.
this is not a big bother, but it leads to clutter, and a few times i got
errors,
becasue i forgot to add the as
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 _|_.
hi,
at some level you are right that some more syntactic sugar
and stuff could make monads more atracitve. for the time
being here is how i'd write what you want bellow:
f # m = liftM f m
mx === my = liftM2 (==) m1 m2
assertBool fail $ (length # someFunc a) === (length # someFunc b)
at
hi ,
this is an interesting discussion and i agree that in general instances
of Eq should be equality, but what do people mean by real equality?
probably the most reasonable interpretation is some sort of
observational equivalance, i.e. if two things are equal we should always
be able to replace
hi,
i believe you should use
fromIntegral :: (Integral a, Num b) = a - b
Since Int is in the Integral class, and Float is in the Num class
this should do exactly the job you need.
For the other functions that were not working --- they were moved to
the Char module, so you need to add import Char
for it.
if that is not too much work could we have that in the library? i think
it would be very useful.
(i am trying to generate demand :-)
it would also be useful to have finite natural numbers, ala C's
unsigned int.
-iavor
--
==
| Iavor S
?
-iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu/~diatchki
:: a - [a] - [a]
intersperse _ [] = []
intersperse sep (x:xs) = x : rest
where rest [] = []
rest xs = sep : intersperse sep xs
bye
iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science
.
[...]
Simon
Wolfgang
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department
simply say type?
-kzm
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu/~diatchki
there?
Cheers,
Theo Norvell
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department
, the value at that
index is undefined.
Could this be fixed?
Wolfgang
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
--
==
| Iavor S. Diatchki, Ph.D. student
:
On 2004.01.21 15:03, Iavor S. Diatchki wrote:
hi,
not that it matters, but i think commonly when specifications say
that something is undefined, that means that the behaviour can be whatever,
i.e. the implementors can do what they like. this is not to be confused
with the entity undefined defined
of `obs'': obs' = get
this seems to indicate that the second instance is being used,
but i cannot figure out why. am i doing something silly here?
-iavor
ps: i am not on the GHC users list so please cc me if you replay there
--
==
| Iavor S. Diatchki
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu/~diatchki
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
).
it is more docuemnted then the current one, but otherwise it is very
similar.
bye
iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU
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 error message?
--
==
| Iavor S. Diatchki, Ph.D. student
designer doesn't explicitly add error support, the monad still
supports errors.
Jon Cast
___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
==
| Iavor S
S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu/~diatchki
(--mad, compu)
Main printSeq mad snowball
(mad, sno)
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu
.
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu/~diatchki
of the simons can give
us a more definitive answer on that.
bye
iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu/~diatchki
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu/~diatchki
be mapped to in the file system (e.g. _)
i like the first one better. what does GHC do in this situation?
bye
iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU
efficient possible library. But (the possibility of an) efficient
implementation has to be a goal, just not the only goal. If GHC can't
use it directly for interface files, so be it.
Simon
--
==
| Iavor S. Diatchki, Ph.D. student
identify which of the two you think is doing something wrong and
report it as a bug.
bye
iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU
here the String is the name of the file where to store/load the data.
so is there such a thing already, and if not would it be difficult to
add to say GHC?
bye
iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu/~diatchki
information to evaluate haskell programs, so
i don't think there is a problem there.
hope this helped, and sorry for the long email
bye
iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering
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 |
| http
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 and Engineering
/mailman/listinfo/haskell
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu/~diatchki
mind the above two definitions are pretty
much the same.
bye
iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu
mind the above two definitions are pretty
much the same.
bye
iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu
hi,
now that the report is pretty much stable, are there any plans of
putting it on the Haskell web site?
bye
iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu/~diatchki
Hi,
Simon Peyton-Jones wrote:
Folks
Another minor H98 glitch.
Are you saying that you think the report doesn't fully define the
meaning of the module system, or just that difficult to understand and
needs to be clarified?
Consider this:
| module D (module Char) where
| { import
flgas of GHC.
bye
iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu/~diatchki
.
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. Diatchki, Ph.D. student
.
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI
hi,
check out levent's page at:
http://www.cse.ogi.edu/~erkok/rmb/
bye
iavor
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
hello,
there seems to be a difference between the way superclasses are handled in
GHC and Hugs, and it would be nice if one of the choices was selected
(i am not sure what other implementations do). here is what i mean:
class C a b | a - b
class C a b = D a
vs.
class C a b | a - b
class C a
hi
On Thursday 31 January 2002 03:53 am, Malcolm Wallace wrote:
I see no reason to disallow duplicates at the subordinate level if
they are permitted otherwise.
Well, disallowing duplicates here may improve error detection,
catching some unintentional typos and cut-and-paste errors.
hi again,
On Thursday 31 January 2002 10:18 am, Malcolm Wallace wrote:
disallowing all duplicates seems tricky. is there a duplicate here:
module A (f, module M) where
import M(f)
Yes, there is a duplicate here. Strangely enough, hbc does not report
this as an error, even though it
hi there,
i just discovered that GHC does not support punning with the -fglasgow-exts
option. is there another flag to turn this on or has it been completely
removed? if so could we have it back - i really like the feature (in
patterns anyways) and use it (hugs -98 supports it). i don't
hello,
it seems that if the qualified names in instance declarations are removed,
the qualified methods (data constructors) in exports ought to be removed as
well. example: currently in Haskell one may write
module M ( P.C(Q.f) ) where
import qualified P
import qualified Q
...
qualifying the
hello,
i was wondering if there was a reasong why hiding imports have different
semantics from importing imports and exports. what i mean is, if one
writes:
module A(T) where
data T = T
only the type constructor T is exported. simillarly if i write:
module A where
data T = T
module B where
://www.haskell.org/mailman/listinfo/haskell
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu/~diatchki
hi
test :: (forall t . (forall a . t a) - t b) - b - b
i am not an expert on this, but isnt this rank 3?
bye
iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu/~diatchki
not refer
to the same entity.
bye
iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.ogi.edu/~diatchki
hello,
although i don't think the report explicitly mentions it,
i think the interpretations should be the same as with imports,
namely that the export specs are comulative.
with this interpretation, i'd say that C is exported, as
the first B, just exports {B}, and B(..) exports {B,C},
so
68 matches
Mail list logo