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)
'
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]
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
.
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
, 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
)
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
(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
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
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
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
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
.
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
.
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
:-)
--
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
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
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 -
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
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
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
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
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)
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
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
23 matches
Mail list logo