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
qualifie
hi,
you can use the reader (environment monad) for this.
combineTest c t1 t2 = liftM2 c t1 t2
lately i have been using 2 combinators to do things like that (thanks to
Thomas Hallgren for showing me this):
-- a nicer name for fmap (or liftM if one prefers)
(#) :: Functor f => (a -> b) -> f a ->
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
where
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 ->
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"
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)
a
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 replac
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
or 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
--
===
inition:
intersperse :: 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 |
| Dep
overhead should come from.
[...]
Simon
Wolfgang
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
--
======
| Iavor S. Diatchki, Ph.D. student
asel wrote:
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 &quo
the same index, 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. Dia
lly here?
-iavor
ps: i am not on the GHC users list so please cc me if you replay there
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering
cvs
(fptools/libraries/monads).
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 |
tp://www.haskell.org/mailman/listinfo/haskell
--
======
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU
res or mutation.
--
==========
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.og
Main> printSeq hatter saturn
("hatter", "saatur")
Main> printSeq mad saturn
("mad", "saa")
Main> printSeq hate hatter
("hat-e", "hatte")
Main> printSeq snowball icecream
("snowb-all", "icecream-")
er SCC, but perhaps one 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
2E9 A131 01B9 1C7A DBCA CB5E
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
--
==
| Iavor S. Diatchki, Ph.D. student
ile clunky, do the
job.
S
--
======
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://
sive modules".
bye
iavor
--
==========
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| ht
le
name aliases)
* say what should single quote 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 Scie
d platforms is much more important than having the
most 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
--
=====
the hirarchical name space this is even more the case. and for
example C programers never specify the name of the current file within
the file. why do we want to do it?
just wondering
iavor
--
======
| Iavor S. Diatchki, Ph.D. student
:: t -> String -> IO ()
load :: String -> IO t
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. Diatch
) you
should 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 o
___
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
est proven theorem in
Haskell. and people just keep on proving it :-)
bye
iavor
--
==
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| h
ow how to
place it in WHNF...
well, one doesn't need type 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.
s." -Dijkstra | www.isi.edu/~hdaume
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
--
==
| Iavor S. Diatchki, Ph.D. student |
|
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 at
d by Read.
bye
iavor
--
==========
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU |
| http://www.cse.og
k this formulation is better.
bye
iavor
--
======
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU
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
>| >
s a lot it may be a good idea to use the
-odir -hidir flgas of GHC.
bye
iavor
--
==========
| Iavor S. Diatchki, Ph.D. student |
| Department of Computer Science and Engineering |
| School of OGI at OHSU
>>main=do
>> time1 <- getCPUTime
>> w <- return $! calcSomething
>> time2 <- getCPUTime
>
> ...
>
> J.A.
>
> ___
> Haskell mailing list
> [EMAIL PROTECTED]
> http://www.haskell.org/ma
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
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
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-pas
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 par
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
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 m
computers| [EMAIL PROTECTED]
> than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume
>
> _______
> Haskell mailing list
> [EMAIL PROTECTED]
> http://www.haskell.org/mailman/listinfo/haskell
--
===
t for the extra condition,
theer would be an export clash, as the name "f" may refer to either
to the "f" defined in A, or the one imported from B.
hope this helps.
bye
iavor
--
==
| Iavor S. Diatchki, Ph
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 Engineerin
, since
> there is no unqualified entity f in scope, and g and B.g do 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
hello,
On Wed, Sep 12, 2001 at 08:51:20AM -0700, Sigbjorn Finne wrote:
>
> So, it's not considered an error if you do something
> like
>
> module A ( B(C), ...some other stuff..., B(D) ) where
> ...
> data B = C | D
>
> but C and D is exported. Is the extra flexibility of
> allowing du
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 altoge
50 matches
Mail list logo