The High-Assurance Systems Programming (HASP) project at Portland
State University in Portland, OR, USA, has openings for *two*
post-doctoral researchers to help design, develop, and apply a new
strongly typed, pure functional language for systems programming.
The Habit language derives from
Hi Thomas,
The specific problem you describe has a simple solution using
multiple parameter classes with syntactic sugar for functional
notation instead of type families [1]:
class AddressOf h a | h - a, a - h -- bijections
class HeaderOf a h | a - h, h - a
instance HeaderOf (AddressOf h)
Don Stewart wrote:
Which suggests that $ was already in the 1.0 report going to SIGPLAN.
Perhaps Paul or Simon could shed light on it? Anyone have the 1.0 report
lying around to check if it was in earlier?
As far as Haskell is concerned, the first report-ed occurrence
of the $ operator was in
Martin Sulzmann wrote:
We're also looking for (practical) examples of multi-range functional
dependencies
class C a b c | c - a b
Notice that there are multiple (two) parameters in the range of the FD.
It's tempting to convert the above to
class C a b c | c - a, c - b
but this yields a
The surprising thing about this example is the fact that
the definition of foo is accepted, and not the fact that
the definition of foo' is rejected. At least in Manuel's
equivalent program using functional dependencies, both
functions have ambiguous types, and hence both would be
rejected. It
sense to report the ambiguity at the
point where bar is defined, instead of deferring that error to
places where it is used, like the definition of bar'. (The latter
is what I mean by delayed ambiguity checking.)
Hope that helps,
Mark
Tom Schrijvers wrote:
On Mon, 7 Apr 2008, Mark P Jones wrote
Barney Hilken wrote:
I totally disagree. The great strength of Haskell is that, whenever
important design decisions have been made, the primary consideration has
not been practicality, but generality and mathematical foundation. When
the Haskell committee first started work, many people said
[Redirecting to haskell-cafe]
Ben Franksen wrote:
TREX seems to be generally agreed to be too complicated to implement and
explain.
What evidence do you have for this? Speaking as somebody who
implemented Trex for Hugs (and who also witnessed Ben Gaster
build an independent implementation),
Hi All,
Here are my responses to the recent messages, starting with some
summary comments:
- I agree with Martin that the condition I posted a few days ago is
equivalent to the *refined* weak coverage condition in your
paper. The refined tag here is important---I missed it the
first time
[Sorry, I guess this should have been in the cafe ...]
Simon Peyton-Jones wrote:
The trouble is that
a) the coverage condition ensures that everything is well behaved
b) but it's too restrictive for some uses of FDs, notably the MTL library
c) there are many possibilities for more generous
Simon Peyton-Jones wrote:
| I am quite intrigued at the behaviour examplified in the attached module.
| It's true I am a newbie and probably don't quite get the whole consequence
| spectrum of -fallow-undecidable-instances, but why providing that dummy
| instance (commented out) get the thing to
Hi Peter,
| I´m progarmming a parser for functional programs. Now
| I want to implement the infixL and infixR feature to increase
| the readability of the code. I would be very glad if anyone
| can send me some information about the implementation of
| this feature of the Haskell parser or where
| We at GHC HQ agree, and for future extensions we'll move to
| using separate options to enable them rather than lumping
| everything into -fglasgow-exts. This is starting to happen
| already: we have -farrows, -fwith, -fffi (currently implied
| by -fglasgow-exts).
|
| Of course, if we
Hi Alistair,
| I've just debugged a program that used a case expression, but
| where I was trying to match on constants rather than literals.
| Here's a contrived example:
|
| module Main where
| one = 1
| two = 2
|
| test n =
| case n of
| one - one
| two -
Hi Norman,
| [looking for papers about type classes ...]
| * Of all the many articles on the topic, which few might you
| recommend for beginners?
I wonder if my notes on Functional Programming with Overloading and
Higher-Order Polymorphism will be useful? You can find them at:
| I would like to use hGetContents just to retrieve the list of
| the lines of a file, but if I code a function like:
|
| linesFromFile :: FilePath - IO [String]
| linesFromFile f = do
| h - openFile f ReadMode
| l - hGetContents h
| hClose h
| return (lines l)
|
| I
Hi Mark,
| I have just implemented the function penultimax which takes a list
| of positive integers and produces the penultimate maximum, that is,
| the next biggest integer in the list after the maximum. Eg:
|
| penultimax [15,7,3,11,5] = 11
To your three implementations, let me add another
Hi Martin,
| The issue I want to raise is whether constructor classes are
| redundant in the presence of FDs
No, they are not comparable.
Let fds = functional dependencies
ccs = constructor classes
Example of something you can do with ccs but not fds:
data Fix f = In (f (Fix f))
| Hugs and GHC (but not NHC) erroneously accept the following:
|
| class Foo a where
| f :: Eq a = a - Bool
This behavior of Hugs is intentional, and is documented as a non-bug
on the Hugs web pages: (right at the end)
http://cvs.haskell.org/Hugs/pages/bugsandfeatures.htm
I don't
| Usually, I wouldn't make such a fuss, but here documents are really
| not some new and experimental feature. They're an old hat, and a
| very useful hat. The only question is how to integrate them into the
| rest of Haskell.
At a time when many developers pay careful attention to
Hi Simon,
The one parameter scheme that you've described breaks down if you want
to generalize further and allow something like:
class RefMonad r m where
new :: a - m (r a)
read :: r a - m a
write :: r a - a - m ()
instance RefMonad IORef IO where ...
instance RefMonad
| On Tue, Jan 29, 2002 at 07:36:56AM -0800, Simon Peyton-Jones wrote:
| The Haskell Report says of n+k patterns:
|
| A n+k pattern can only be matched against a value in
| the class Integral.
|
| This seems far too strong. All that is needed are Ord (for the =)
| and Num (for - and
Hi Liyang,
| On Mon, Jan 14, 2002 at 12:39:48AM -0800, Mark P Jones wrote:
| Hugs uses single precision by default because the implementation
| using double precision relies on a hack whose behavior is not
| assured in any way by the C language in which it is implemented.
|
| I found
Hi Adrian,
| Ah, now I see the issue seems to be closeley related to
| full lazy lambda lifting.
That's right ...
| Do (should) Haskell compilers do this, as a general rule?
| It all seems bit vague to me :-(
I don't think they do, and I'm not sure they should
because the transformation can,
Hi Dave,
| Note that I'd recommend getting some clarification about this from either
| the current hugs team or Mark Jones (who are probably reading this list),
| as I can vaguely recall a couple of times over the last few years where
| Mark Jone has said `Hugs should not be used for serious
Hi Adrian,
| If I have defined a function like this..
| f args = blah args
| it could be re-written..
| f = blah
|
| I had always assumed the internal representation of
| these 2 definitions would be identical (and should
| yield identical code), but it appears that isn't so
| (with
Hi Marcin,
| There's no solid technical reason for this, but Haskell doesn't allow
| it at the moment because there isn't an easy way to name an instance
| declaration.
|
| There is another problem: even if we created a syntax to name them,
| if they would not be exported by default then
| Simon Peyton-Jones. The implementation of functional
| programming languages. Prentice-Hall, 1987
|
| is this book could be made available online ? cos on amazon it seems
| out of print.
|
| This book is already on-line at
|
|
| 2.2. Identifiers can use small and large Unicode letters ...
If we're picking on the report's handling of Unicode, here's
another minor quibble to add to the list. In describing the
lexical syntax of operator symbols, the report uses:
varsym- (symbol {symbol | :})_reservedop
symbol
Hi David,
| Can anyone shed some light on the following error? Thanks in advance.
|
| isSorted :: Ord a = [a] - Bool
| isSorted [] = True
| isSorted [x] = True
| isSorted (x1:x2:xs)
| | x1 = x2 = isSorted (x2:xs)
| | otherwise = False
I'm branching away from your question, but
Hi Jeff,
| Without delving too deeply into your example, it looks like
| you've bumped into a known bug in Hugs implementation of
| functional dependencies. You should try GHCI if you can - it
| doesn't suffer from this bug.
Are there any plans to fix the bug in Hugs? (And is there
Hi Simon!
| This is the message that Marcin referred to, proposing a change in
| the semantics of scoped type variables. I may just go ahead and
| implement it in GHC. (The implementation is easy: delete a couple
| of lines; and I guess the same is so for Hugs. The question is whether
| it's
| Marcin Kowalczyk ([EMAIL PROTECTED]) writes:
| I would like to replace with and dlet with let. But SimonPJ
| said he won't do it in ghc unless Hugs does it too, and Mark P Jones
| said he won't do it in Hugs now (without deep reasons: no
| people/hours to do that, and no plans to release
Dear All,
| 1) What is a fundep?
Fundeps are "functional dependencies", which have long been used to
specify constraints on the tables used in relational databases. In
the current context, people are using "fundeps" to refer to the way
that this idea has been adapted to work with multiple
| [One way to compile polymorphic code is to inline all uses of
| polymorphic values...]
|
| It would require to keep bodies of all polymorphic functions in
| a form allowing instantiation in different modules. For example
| ghc already requires too much memory (even a hundred MB for large
|
Hi Bernie,
You ask why Haskell infers kinds for datatypes in dependency order.
As you point out, if Haskell tried instead to infer kinds for all of
the datatypes in a program at the same time, then it would sometimes
accept programs that are currently rejected. For example:
|data C x = Foo
| I am finding functional dependencies confusing. (I suspect I am
| not alone.) Should the following code work?
|
| class HasConverter a b | a - b where
|convert :: a - b
|
| instance (HasConverter a b,Show b) = Show a where
|show value = show (convert value)
It's a separate issue.
Hi Marcin,
| In particular, should the following be legal:
|
| class C a b c | a - b c
| instance C [a] b b
| f:: C [a] b c = a
| f = undefined
|
| ghc panics and Hugs rejects it.
No, it is not legal. Even if you delete the definition of f, the code
is still not legal because the class and
| I think you can simplify the example. Given
|
| class HasFoo a b | a - b where
| foo :: a - b
| instance HasFoo Int Bool where ...
|
| Is this legal?
| f :: HasFoo Int b = Int - b
| f x = foo x
The theoretical foundation for functional dependencies goes back
Hi Elke,
| A possible (though probably unusual) characterization
| of list data structures is three functions
|
| nil :: List a
| cons:: a - List a - List a
| forlist :: b - (a - List a - b) - List a - b
|
| The implementation I'm interested in (one without
|
| Actually, the July2000 release hasn't been noted on
| http://haskell.org/hugs -- is there somewhere else I should be looking
| to keep track of it?
There is/was no July 2000 release of Hugs; Jeff put out a snapshot
from the CVS archive for the convenience of Redhat 7.0 users and
used the July
Hi Tom,
Thanks for an interesting example!
| For this code (an example from the Combined Binding Groups section of
| Mark Jones's "Typing Haskell in Haskell"):
|
| f :: Eq a = a - Bool
| f x = (x == x) || g True
| g y = (y = y) || f True
|
| Haskell infers the type:
| g ::
Hi Koen,
| If Show were not a super class of Num, the following program
| would generate an error:
|
| main = print 42
|
| If Eq were not a super class, the following program would
| not work:
|
| main = print (if 42 == 42 then "koe" else "apa")
|
| These programs are all fixed by
Hi Zhanyong,
| In Haskell, instances of a type class can only be well-formed type
| constructors ...
| Note there is no type constructor abstraction.
|
| In practice, I found this rule too restrictive.
There are good reasons for the restrictions that were alluded to in
my constructor classes
Richard,
| for almost a year now, it has been on my list of things to do to read
| thih. for reasons too detailed to get into now, except to say that I
| still use a 486 computer (sans printer) at home, I find reading dvi, ps
| and pdf inconvenient and tend to postpone reading them whereas I
Hi Koen,
I think that literate programming is a great idea, but I don't
think Haskell does it justice. I'll suggest a simple solution
to your problem at the end of this message. You can skip there
now if you want ... or else read on while I rant about this some
more and describe what seems to
[Let's take any further correspondence on this over into Hugs-bugs,
or at least into haskell-cafe ... thanks!]
| When I try to load the parser generated by Happy for a modest-sized
| language into Hugs I get:
|
| Too many variables (16000) in type checker
|
| I'm running Hugs 98 on a Power
Hi Kirstin,
| Surely this is obvious, but I cannot figure out how to properly deal with
| class constraints and monads. For instance, when trying
|
| instance Monad Set.Set where
| xs = f = Set.unionSet (Set.map f xs)
| return x = Set.single x
| fail s = Set.empty
|
|
| The attached file is accepted by GHC 4.08 and Hugs 98.
Here is what was in the attached file:
module Foo where
class A a where
foo :: a value - ()
class A a = B a where
toList :: a value - [value]
| However if you remove the declaration of "foo" (and for Hugs,
| the
| does type-checking remain decidable (in general) for overlapping instances
| (:+o in hugs)?
Type checking in Hugs (with -98, at least) isn't decidable,
either with or without overlapping instances! But decidability
could be recovered by placing stronger syntactic requirements
on the form of
Hi Sigbjorn,
| Here's a Prelude inconsistency that's been irking me once
| in a while for a loong time - today it came up again, so here goes:
|
| unlines ["a","b"] == "a\nb\n"
| unwords ["a","b"] == "a b"
|
| [... unwords adds space between items, not at the beginning or end;
|
Hi Marcin,
| module M where
|
| class Seq s a | s - a where
| m :: Seq s b = (a - b) - s a - s b
This combination of constructor classes and functional dependencies
looks very odd! The dependency says that, if you pick a particular
implementation s of sequences, then there will be at most
Hi Matt,
The problem you describe is not uncommon. It's been a restriction
with constructor classes since they were first introduced. In fact
it's actually the key to making constructor classes tractable. You
might find that the following back issue from the Haskell list gives
you some more
| 1) Hugs's error messages don't qualify names, so they become
| very difficult to read when you use this convention.
| ...
| ... #1 is the least important in theory, since it's fixable and
| implementation-dependent, but turned out for me to be the most
| important in practice; Hugs'
Hi Jeff,
| You can write the section (+ x) to specify a function to add `x' to
| something. That's great, then you need to specify a function for
| subtracting `x' from something.
This is why the "subtract" function is included in the Prelude:
Prelude map (subtract 1) [1..10]
Hi Andrew,
| Hey all.. I was wondering if somebody might offer me some assistance in
| trying to debug some code I wrote to check whether a tree is a binary
| search tree.. For some reason it always comes back as false! :( Thanks
| much!
One of the great things about functional programming is
Hi Sergey,
| In what way the Haskell implementations may use the GMP library?
| (GNU Multi-Precision integers ?)
Hugs 98 doesn't use gmp at all. For legal reasons (later rendered
irrelevant by changes to the Hugs license), Hugs used it's own
implementation of multi-precision integers.
| And
| ... Keith's comments:
| ...
| remind me of a Mark Jones idea from a few years ago (PEPM'94; Lisp
| Symbolic Computation 8, 3, 1995) to use partial evaluation to achieve
| overloading without dictionary arguments.
|
| Is this idea sitting on a back burner somewhere or was it abandoned due
| to
| In that regard, I think the biggest problems remaining are the lack of a
| standard "fast" string type, and some remaining warts in hugs. These are
| maybe easiest to see when you do something like "strace -c" on a hugs
| program and the comparable perl program. So, in my naive version of
|
I'd like to respond to recent comments about `strange' newtype
definitions. Definitions like
newtype Void = Void Void
or variants using mutual recursion are, in my opinion, entirely
reasonable (even if they are perhaps almost as entirely useless
in practice). I don't really think it has
| Both simulations run fine for small values of
| counter "n" but fail badly when "n" becomes big,
| 40,000 say. I happened to have a presentation
| on the subject of Hawk about two months ago, and
| the audience was not much impressed when they saw
| Hugs
Your example suggests that update was, perhaps, not the best choice
of terminology!
| data Foo a = Foo { foo :: a
|, bar :: Int
|} deriving Show
|
| up s t = s { foo = t }
|
| Now, what should the type of the function 'up' be?
|
| up :: Foo a - a - Foo a
|
Hi John,
| This is a "bug" in hugs.
|
| To illustrate the problem, the next floating point number after
| 5.0 is 5.0047,
| which hugs also prints as 5.0. One might argue that to display it
| as 5.005 would
| be misleading, since this number is the closest representable to
|
Simon Marlow writes:
| All known Haskell compilers implement the IO type as a function type,
| something like (World - (World, a)). You can think of the monad
| as just a convenient way to hide the passing around of the world token.
|
| And because it is abstract, compilers are free to
Hi Keith,
| Type inference for Haskell (as described in Mark Jones' paper _Typing
| Haskell In Haskell_ and as performed by GHC) requires first splitting
| groups of let bindings into strongly-connected components. It then
| assumes that all binders in such a component will be generalised
| Is there a way to make platform/vendor independent development
| tools for Haskell?
Of course! That's what a number of us have been doing for some time. But
platform/vendor specific tools, such as a plugin for Visual Studio or a new
editing mode for Emacs, are also valuable, especially if
Hi Michael,
| "...type synonyms must be fully applied". I think the above
| example is a valid objection to this.
I'll append some text that I wrote on a previous occasion when somebody
asked why type synonyms couldn't be partially applied. I hope that it
will help to explain why the
Hi Alex,
| Here's some of the threatened examples:
|
| data OrdFuncExist = OE (Ord a = Char - a)
| data OrdListExist = OLE (Ord a = [a])
Perhaps this is a GHC/Hugs difference, but the syntax that you've
used here isn't permitted in Hugs ... and in old versions where it
might have been
Hi Alex,
| Here's some of the threatened examples:
|
| data OrdFuncExist = OE (Ord a = Char - a)
| data OrdListExist = OLE (Ord a = [a])
Perhaps this is a GHC/Hugs difference, but the syntax that you've
used here isn't permitted in Hugs ... and in old versions where it
might have been
Sven,
You've already heard from nhc, hbc, and ghc, so here's the
perspective from Hugs-land to complete your set.
| What is the rationale for the second condition, i.e. why is no
| defaulting done when a user-defined class is involved? Example:
Defaulting is one of those places where Haskell
Hi Joachim,
| AsmGofer is an extension of TkGofer. TkGofer is an extension of
| Gofer in order to support graphical user interfaces. Gofer is a
| subset of Haskell.
I'd like to urge you to consider making the AsmGofer distribution
more publicly available. I was shocked to find that I couldn't
The source code for the current version of `Typing Haskell in Haskell'
is now available from: http://www.cse.ogi.edu/~mpj/thih/ It is, of
course, written in Haskell 98, and has been tested and developed using
Hugs 98.
For those who don't know, `Typing Haskell in Haskell' is an attempt to
| As Haskell has the standard functions fst, snd to decompose (a,b),
| maybe, it worths to provide also
| tuple31, tuple31, tuple31,
| ...
| tuple51, tuple52, tuple53, tuple54, tuple55
|
| for the tuples of n =
| * stToIO . This is often necessary for programs that do
|stateful things as well as IO. A few years ago, having read
|all relevant papers, I was very perplexed by the problem of
|doing stateful things and IO at the same time. Eventually I
|realised it is not possible to nest
Hi Fermin,
| Should redundant dependencies trigger an error or a warning? I'd
| say that if I'm writing some haskell code, I wouldn't mind if a
| redundancy is flagged as an error; most likely, it'd take a short
| time to fix. However, if someone is generating haskell automatically
| (maybe
In a previous message, I wrote:
| Some folks out there want to use Haskell to write real programs. For
| them, there's Haskell 98.
To which Alex replied:
| To be clear, I am not an academic researcher. I develop real world
| web sites. I would really like to use Haskell for this process,
Hi Heribert,
Thanks for your feedback!
| at the end of section 2 of http://www.cse.ogi.edu/~mpj/fds.html you
| might want to mention that there is a "standard" work-around whenever a
| type constructor is needed but not available: Introduce a newtype.
Yes, an in fact this idea is mentioned at
To those who use or know about random numbers and Haskell:
A couple of months ago, John Hughes sent me mail about a problem that
he had uncovered with the implementation of the Random library in Hugs.
He had been using the "split" function in an attempt to generate a
stream of random number
[Simon mentioned my work on `functional dependencies' in one of his
messages a couple of days ago, so I thought I'd better post an
explanation!]
A couple of months ago, I developed and implemented an extension to
Hugs that has the potential to make multiple parameter type classes
more useful.
Hi Heribert,
| The idea is that for every class assertion in the type of a variable,
| the variable gets an additional parameter that will be instantiated by a
| value representing the appropriate instance declaration. These values
| are tuples (let's call them "instance tuples") containing
| -
Hi Havoc,
Thanks for your comments about Haskell, which Manuel forward to the
Haskell list. Of the many points that you raised, one on which I
can offer some good news is the following:
| One concern that I have is the Artistic license on Hugs; this might make
| it hard to embed Hugs in other
| I have a little problem with the "getArgs" function in Hugs/GHC.
| Something like
|
| import System
|
| main = do argv - getArgs
| print argv
|
| prints "[]" (the empty list) and not the list of arguments.
| Since this is definitely not the right behaviour, I must be
| Actually, I have fond memories of Algol compilers that gave error
| messages pretty much as comprehensible as those above. I guess the
| problem is that Haskell compilers are prepared by people who have more
| pressing tasks than repeating old work on user friendly error messages
| :-(
Jon's
| Ok my last post was a bit of a silly question on my behalf, but this
| has be stumped.
|
| data BTree Integer = Leaf Integer | Node Integer (BTree Integer) (BTree Integer)
| ...
| can anyone tell me why I get this error when I compile this.
| ERROR "Btree.hs" (line 2): Illegal left hand side
Hi Alex,
| Out of curiosity, how big is the user community? How many downloads of
| the software? How many are on this list?
I don't know the answers to any of these, but I think you're implying
"very small", and I'm sure you're right. Perhaps you're also suggesting
that our community is too
Over the past few months, I've been putting together a type checker for
Haskell that is also written in Haskell. One of the goals of this
project was to obtain a program that was clear and concise enough to serve:
- As a formal specification of the Haskell 98 type system;
- As a testbed for
| Is this why the PDF version of the Haskell report looks so strange? On my
| system (Win98 and Acrobat Reader 4.0) it looks like the baseline
| oscillates up and down between each letter. I find it very difficult to
| read.
I made a pdf version of the Haskell report using pdflatex; fans of
pdf
I would like some clarification about the circumstances under which defaults
are applied. The relevant section of the Haskell report is on P49, and
reads
as follows (the annotations are mine):
"In situations where an ambiguous type is discovered, an ambiguous type
variable is defaultable if
Hi George,
I believe that punning was taken out of Haskell 98 because of some (IMO,
mistaken) concerns about renaming. If memory serves me, somebody
had complained that punning `broke alpha-renaming'. For example, you
can't treat (\x - C{x}) as being equivalent to (\y - C{y}) ... which
all
Hi Simon,
| I'm a bit unsure about the wording of the proposed copyright notice, which
| a few people have asked for. Who owns the copyright? For lack of better
| I have nominated the editors, myself and John Hughes, but given very
| free-wheeling permission to reproduce the report. I hope
| To me, it seems unsatisfactory to have a solution to this pure
| list problem with auxiliary functions relying on integers.
| It turns out to be a nice exercise to implement
|
| diagonalise :: [[a]] - [a]
|
| without any reference to numbers.
Here's my definition of an integer free
Hi Simon (again!)
| I just uncovered a couple of strange cases in the Haskell lexical syntax.
| If you're not especially bothered about such things, don't bother to read
| on!
|
| Quick quiz: how many Haskell lexemes are represented by the following
| sequences of characters?
|
| 1)
Let me define some terms. If pi and pi' are two class constraints,
then we say that pi and pi' are overlapping if S(pi) = S'(pi') for
some substitutions S and S'. Thus C Int and C [a] do not overlap,
but C (a,Int) and C (Bool, a) do overlap.
As it says in the Hugs manual, overlapping instances
Hi Hugo,
| I would like to know whether haskell compilers (hugs, hbc and lmlc) are
| fuly y2k compliant. Can anyone fill me in on this?
My understanding is that none of the current Haskell implementors
can afford to answer a question like this because none of us have
the developer, support, or
ECTED]
Send email to [EMAIL PROTECTED] to subscribe to the
hugs-bugs list.
The home page for Hugs is at http://www.haskell.org/hugs.
--
Hugs 98 is Copyright (c) Mark P Jones, Alastair Reid and the Yale Ha
It wasn't your main question, but I'd like to respond to one point that
you raised:
| (Works with ghc. Doesn't work with Hugs because of incompatible Random
| module (?).)
The Haskell 98 Random library changed quite significantly, and we didn't
get to do anything about it before the last
Hi Phil!
| (Mark says it was very tricky to implement what Hugs does)
|
| I can't imagine why. Perhaps Mark can explain?
I should clarify. Arranging for constraints that appear in the types of
constructors to show up whenever that constructor is used --- whether in
an application or a
| The biggest one is that I would like to be able to make [(ix,el)], [Pair
| ix el], and Array ix el all members of a Find class while should look
| something like this:
|
| class Find c ix el where
| find :: ix - c - Maybe el
|
| without having to define a new type or introducing the
I've seen a couple of messages now about Simon's proposal for
a RULES mechanism in Haskell, but it's clear that I've missed
several of the messages, including the original proposal. I
suspect this is a result of recent changes in the way that the
list is handled, which should be resolved by now.
| Is this legal Haskell 98 Code:
|
| module Test where
|
| class A a where
| foo :: a - a
|
| class (A a) = B a where
| boo :: a - a
|
| foo a = a
|
| GHC compiles it just fine but the latest vesion of Hugs98 gives me
| ERROR "test.hs" (line 10): No member "foo" in class "B"
|
| So
1 - 100 of 122 matches
Mail list logo