Re: [Haskell] Hierarchical module namespace extension not sufficiently flexible

2004-12-17 Thread Iavor S. Diatchki
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

Re: [Haskell] Do the libraries define S' ?

2004-07-07 Thread Iavor S. Diatchki
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 ->

Re: [Haskell] Re: comment on language shootout

2004-06-18 Thread 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 where

Re: [Haskell] Implicit parameters

2004-06-09 Thread Iavor S. Diatchki
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 ->

[Haskell] hirarchical module system qualifiers

2004-04-07 Thread Iavor S. Diatchki
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"

Re: [Haskell] Mixing monadic and non-monadic functions

2004-03-23 Thread Iavor S. Diatchki
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

[Haskell] Re: DData revision /equivalence vs equality

2004-03-17 Thread Iavor S. Diatchki
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

Re: AW: [Haskell] Hugs Nov2003 X Nov2002

2004-03-16 Thread Iavor S. Diatchki
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

[Haskell] natural numbers

2004-03-04 Thread Iavor S. Diatchki
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 -- ===

[Haskell] definition of intersperse

2004-03-02 Thread Iavor S. Diatchki
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

Re: [Haskell] RE: Hugs/GHC incompatibility

2004-02-03 Thread Iavor S. Diatchki
overhead should come from. [...] Simon Wolfgang ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell -- ====== | Iavor S. Diatchki, Ph.D. student

Re: Hugs/GHC incompatibility

2004-01-21 Thread Iavor S. Diatchki
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

Re: Hugs/GHC incompatibility

2004-01-21 Thread Iavor S. Diatchki
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

overlapping instances and modules

2004-01-13 Thread Iavor S. Diatchki
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

Re: How to best add logging/debugging code?

2003-11-18 Thread Iavor S. Diatchki
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 |

Re: when is defaulting supposed to occur?

2003-10-25 Thread Iavor S. Diatchki
tp://www.haskell.org/mailman/listinfo/haskell -- ====== | Iavor S. Diatchki, Ph.D. student | | Department of Computer Science and Engineering | | School of OGI at OHSU

Re: Haskell help!

2003-03-25 Thread Iavor S. Diatchki
res or mutation. -- ========== | Iavor S. Diatchki, Ph.D. student | | Department of Computer Science and Engineering | | School of OGI at OHSU | | http://www.cse.og

Re: Haskell help!

2003-03-25 Thread Iavor S. Diatchki
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-")

Re: recursive modules in Haskell

2003-03-19 Thread Iavor S. Diatchki
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

Re: Context not part of a function definition?

2003-03-18 Thread Iavor S. Diatchki
2E9 A131 01B9 1C7A DBCA CB5E ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell -- == | Iavor S. Diatchki, Ph.D. student

Re: recursive modules in Haskell

2003-03-17 Thread Iavor S. Diatchki
ile clunky, do the job. S -- ====== | Iavor S. Diatchki, Ph.D. student | | Department of Computer Science and Engineering | | School of OGI at OHSU | | http://

Re: recursive modules in Haskell

2003-03-12 Thread Iavor S. Diatchki
sive modules". bye iavor -- ========== | Iavor S. Diatchki, Ph.D. student | | Department of Computer Science and Engineering | | School of OGI at OHSU | | ht

Re: Problem with hierarchical libraries.

2003-03-11 Thread Iavor S. Diatchki
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

Re: Persistant (as in on disk) data

2003-03-07 Thread Iavor S. Diatchki
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 -- =====

Problem with hierarchical libraries.

2003-03-07 Thread Iavor S. Diatchki
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

Persistant (as in on disk) data

2003-03-04 Thread Iavor S. Diatchki
:: 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

Re: Parsec: GHC /= Hugs?

2003-03-04 Thread Iavor S. Diatchki
) 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

Re: typing query

2003-02-21 Thread Iavor S. Diatchki
___ 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

Re: Interesting Read (fwd)

2003-02-19 Thread Iavor S. Diatchki
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

Re: silly questions about 'seq'

2003-02-12 Thread Iavor S. Diatchki
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.

Re: avoiding cost of (++)

2003-01-16 Thread Iavor S. Diatchki
s." -Dijkstra | www.isi.edu/~hdaume ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell -- == | Iavor S. Diatchki, Ph.D. student | |

Report and web site

2002-11-12 Thread Iavor S. Diatchki
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

Re: want better error msg with Class Read

2002-11-07 Thread Iavor S. Diatchki
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

Re: Module re-exportation weekend puzzler

2002-11-06 Thread Iavor S. Diatchki
k this formulation is better. bye iavor -- ====== | Iavor S. Diatchki, Ph.D. student | | Department of Computer Science and Engineering | | School of OGI at OHSU

Re: Module re-exportation weekend puzzler

2002-11-05 Thread Iavor S. 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 >| >

Re: Main.main naming convention

2002-09-11 Thread Iavor S. Diatchki
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

Re: State monads don't respect the monad laws in Haskell

2002-05-14 Thread Iavor S. Diatchki
>>main=do >> time1 <- getCPUTime >> w <- return $! calcSomething >> time2 <- getCPUTime > > ... > > J.A. > > ___ > Haskell mailing list > [EMAIL PROTECTED] > http://www.haskell.org/ma

Re: what does fixST do?

2002-02-10 Thread Iavor S. Diatchki
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

functional dependencies

2002-02-03 Thread Iavor S. Diatchki
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

Re: Another H'98 Report query

2002-01-31 Thread Iavor S. Diatchki
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

Re: Another H'98 Report query

2002-01-31 Thread Iavor S. Diatchki
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

punning in GHC?

2001-12-26 Thread Iavor S. Diatchki
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

hiding imports

2001-12-04 Thread Iavor S. Diatchki
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

Re: Haskell 98 Revised

2001-12-04 Thread Iavor S. Diatchki
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

Re: not naming modules Main

2001-11-16 Thread Iavor S. Diatchki
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 -- ===

Re: Scope of imported names

2001-10-23 Thread Iavor S. Diatchki
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

Re: rank 2-polymorphism and type checking

2001-10-23 Thread Iavor S. 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 Engineerin

Re: Haskell 98 Report: October release

2001-10-02 Thread Iavor S. Diatchki
, 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

Re: Haskell98 undefinedness

2001-09-12 Thread Iavor S. Diatchki
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

Re: Haskell98 undefinedness (exports of modules)

2001-09-11 Thread Iavor S. 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 altoge