Re: haskell operator precedence

1997-03-18 Thread Wolfgang Lux
recedence. Your script wouldn't be legal if you had written infix 0 `foo` infix 0 `bar` and this will be rejected by Hugs as it should. Regards Wolfgang Wolfgang Lux WZH Heidelberg, IBM Germany Phone: +49-6221-59-4546Fax: +49-6221-59-3500 Internet: [EMAIL PROTECTED] Office: mazvm01(lux)

Re: Directory manipulation in Haskell 98

2000-09-22 Thread Wolfgang Lux
' implementation of this module is very incomplete. Regards Wolfgang -- Wolfgang Lux Phone: +49-251-83-38263 Institut fuer Wirtschaftinformatik FAX: +49-251-83-38259 Universitaet Muenster Email: [EMAIL PROTECTED]

Re: infelicity in module imports

2001-07-04 Thread Wolfgang Lux
import A hiding (f) will bring A.f into scope and thus A.f is ambiguous! Regards Wolfgang -- Wolfgang Lux Phone: +49-251-83-38263 Institut fuer Wirtschaftinformatik FAX: +49-251-83-38259 Universitaet Muenster Email: [EMAIL PROTECTED

Re: infelicity in module imports

2001-07-04 Thread Wolfgang Lux
. Yes, I agree that this is quite strange (and the keyword hiding is quite misleading in this case). Probably, it is the best idea to remove the restriction that hiding clauses apply only to unqualified names from the report as you and Simon are suggesting. Regards Wolfgang -- Wolfgang Lux

Re: infelicity in module imports

2001-07-12 Thread Wolfgang Lux
, for an unqualified import the unqualified names are brought into scope too. Regards Wolfgang -- Wolfgang Lux Phone: +49-251-83-38263 Institut fuer Wirtschaftinformatik FAX: +49-251-83-38259 Universitaet Muenster Email: [EMAIL PROTECTED

Re: infelicity in module imports

2001-07-12 Thread Wolfgang Lux
) import qualified A() hiding (p,q) import qualified A(x,y) hiding (p,q) both not legal Regards Wolfgang -- Wolfgang Lux Phone: +49-251-83-38263 Institut fuer Wirtschaftinformatik FAX: +49-251-83-38259 Universitaet Muenster Email: [EMAIL

Another question wrt hiding imports

2001-07-12 Thread Wolfgang Lux
(without its type) in an export specification. Wolfgang -- Wolfgang Lux Phone: +49-251-83-38263 Institut fuer Wirtschaftinformatik FAX: +49-251-83-38259 Universitaet Muenster Email: [EMAIL PROTECTED

Re: Another question wrt hiding imports

2001-07-12 Thread Wolfgang Lux
in this or any another data type) is sufficient to make this clear. (But maybe I was particularly dumb in this case). Wolfgang -- Wolfgang Lux Phone: +49-251-83-38263 Institut fuer Wirtschaftinformatik FAX: +49-251-83-38259 Universitaet Muenster Email

Re: Fixity declarations

2001-07-12 Thread Wolfgang Lux
of locally bound operator names in this way. Hmmm, unless I overlooked something your example is syntacally not valid by the grammar given in appendix B.4 of the Haskell 98 report. Operators in patterns can be used only with an infix syntax. Wolfgang -- Wolfgang Lux Phone

Re: Dealing with implementation differences

2001-07-17 Thread Wolfgang Lux
for the implmentation differences. But in this particular you should better read the (library) report and simply import the Char module (from where isAscii should be exported -- Hugs still exports it from the Prelude though it shouldn't). Wolfgang -- Wolfgang Lux Phone

Re: lexical description problem in language report?

2001-07-24 Thread Wolfgang Lux
a different version of the report, but in my copy and also in the version on Simon PJ's web-pages section 2.4 (in the last paragraph) and appendix B include productions for the qualified identifiers. Wolfgang -- Wolfgang Lux Phone: +49-251-83-38263 Institut fuer

Minor inconsistency in the report wrt to qualified names

2001-07-24 Thread Wolfgang Lux
. Wolfgang -- Wolfgang Lux Phone: +49-251-83-38263 Institut fuer Wirtschaftinformatik FAX: +49-251-83-38259 Universitaet Muenster Email: [EMAIL PROTECTED] ___ Haskell mailing list [EMAIL PROTECTED

Re: More feedback on Haskell 98 modules from the Programatica Team

2001-08-08 Thread Wolfgang Lux
. Wolfgang -- Wolfgang Lux Phone: +49-251-83-38263 Institut fuer Wirtschaftinformatik FAX: +49-251-83-38259 Universitaet Muenster Email: [EMAIL PROTECTED] ___ Haskell mailing list [EMAIL PROTECTED

Re: Scope of imported names

2001-10-22 Thread Wolfgang Lux
:-) -- Wolfgang Lux Phone: +49-251-83-38263 Institut fuer Wirtschaftinformatik FAX: +49-251-83-38259 Universitaet Muenster Email: [EMAIL PROTECTED] ___ Haskell mailing list [EMAIL PROTECTED] http

Re: Scope of imported names

2001-10-22 Thread Wolfgang Lux
is rarely more than few lines long and thus more easily comprehensible) than for a whole module. Wolfgang -- Wolfgang Lux Phone: +49-251-83-38263 Institut fuer Wirtschaftinformatik FAX: +49-251-83-38259 Universitaet Muenster Email: [EMAIL

Re: In search of: [a-b] - a - [b]

2003-06-20 Thread Wolfgang Lux
Christian Sievers wrote: This is a case where I'd prefer a list comprehension: flist fs a = [ f a | f - fs ] (and this could be a monad comprehension, if Haskell still had them...) And it still has them, you just have to get accustomed to the slightly different syntax :-) flist fs a = do f -

Re: The madness of implicit parameters: cured?

2003-08-04 Thread Wolfgang Lux
Ben Rudiak-Gould wrote: [...] The final straw was: Prelude let ?x = 1 in let g = ?x in let ?x = 2 in g 1 Prelude let ?x = 1 in let g () = ?x in let ?x = 2 in g () 2 This is insanity. I can't possibly use a language feature which behaves in such a non-orthogonal way. Well, this is

Re: [Haskell] return?

2004-04-30 Thread Wolfgang Lux
John Meacham wrote: you can make things somewhat better with this construct foo = do baz if cond then return bar else do bua bam Except that this is invalid according to the Haskell report. In note 1 in section 9.3 (Layout), the report explicitly states that A

Re: [Haskell] readList oddity

2004-10-21 Thread Wolfgang Lux
Am 21.10.2004 um 09:55 schrieb Johannes Waldmann: turns out that check1 and check2 work, but check0 will not (I thought it would). The implementation (in the Prelude) seems to think that ] (in check0) could possibly be the beginning of a list element. This is just a problem of non-deterministic

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

2005-09-08 Thread Wolfgang Lux
Frederik Eaton wrote: I want the type system to be able to do automatic lifting of monads, i.e., since [] is a monad, I should be able to write the following: and have it interpreted as do {a-[1,2]; b-[3,4]; return (a+b)}. Are you sure that this is the interpretation you have in mind? The

Re: [Haskell] Haskell 98 syntax question

2007-01-10 Thread Wolfgang Lux
Sascha Böhme wrote: Hello, referring to the Haskell 98 report as available in the Internet, I have a short question. Section 4.1.3 (Syntax of Class Assertions and Contexts) contains the rule: class - qtycls tyvar | qtycls ( tyvar atype1 ... atypen ) (n=1) Is there a (simple)

Re: [Haskell] Type Lambdas in Gofer

2007-07-31 Thread Wolfgang Lux
Jim Apple wrote: data Rec f = In (f (Rec f)) type P f a = f (Rec f, a) mapP :: Functor f = (a - b) - P f a - P f b mapP g = fmap (\(x,a) - (x, g a)) instance Functor f = Functor (P f) where fmap = mapP Why did Gofer have this power while Haskell does not? Haskell does have the same

Re: Simple compiler question

2001-07-26 Thread Wolfgang Lux
compiler, but it supports entering definitions as well: let { f x = x + x }; f :: (Prelude.Num a) = a - a f 3; 6 Wolfgang -- Wolfgang Lux Phone: +49-251-83-38263 Institut fuer Wirtschaftinformatik FAX: +49-251-83-38259 Universitaet Muenster