Am Freitag, 6. Juni 2003 09:15 schrieb Simon Peyton-Jones:
I forget whether I've aired this on the list, but I'm seriously thinking
that we should change 'forall' to 'exists' in existential data constructors
like this one. One has to explain 'forall' every time. But we'd lose a
keyword.
Or
I forget whether I've aired this on the list, but I'm seriously thinking
that we should change 'forall' to 'exists' in existential data constructors
like this one. One has to explain 'forall' every time. But we'd lose a
keyword.
exists (like forall in ghc only) could be used independently in a
On 2003-06-06 at 08:15BST Simon Peyton-Jones wrote:
I forget whether I've aired this on the list, but I'm
seriously thinking that we should change 'forall' to
'exists' in existential data constructors like this one.
You did mention it, and there were several replies. I'd
characterise them as
Ketil Z. Malde wrote:
I have a function declared as:
anova2 :: (Fractional c, Ord b)
= [a-b] - (a-c) - [a] - [Anova1 c]
where the first parameter is a list of classifiers. I could simplify
it, I guess, to something like
classify :: Eq b = [a-b] - [a] - [[[a]]]
I don't properly understand this either, but as it happens I was looking at
this in the GHC user guide only yesterday...
[[
:
MkFoo :: forall a. a - (a - Bool) - Foo
Nil :: Foo
Notice that the type variable a in the type of MkFoo does not appear in the
data type itself, which is plain
On Wed, Jun 04, 2003 at 02:46:59PM +0200, [EMAIL PROTECTED] wrote:
Now I want to print part of the record. What I would like to do is the
following
putStrLn $ concatMap show [a,c,d]
!!! bang !!!
So what I actually do is
putStrLn $ concat [show a, show c, show d]
Works, but a
Yes, this would work, thanks.
But let me extent my question: what if all the types would be in a
class FakeClass which has function specialID :: a - ID and
I would like to do
foo $ map specialID [a,b,c,d]
?
___
Haskell mailing list
[EMAIL PROTECTED]
On Wed, Jun 04, 2003 at 04:43:10PM +0200, [EMAIL PROTECTED] wrote:
Yes, this would work, thanks.
But let me extent my question: what if all the types would be in a
class FakeClass which has function specialID :: a - ID and
I would like to do
foo $ map specialID [a,b,c,d]
?
Well, in
Now, obviously, the problem is that fst and snd, being passed in a
list, needs to be of the same type; this complicates classifying a
list of type [(Int,Bool)], for instance¹.
I have a similar problem.
Say I have a record:
data Rec = Rec { a :: Int, b :: Type1, c :: Type2, d :: Type3, ... }