forall quantifier

Markus.Schnell@infineon.com Markus.Schnell@infineon.com
Wed, 4 Jun 2003 14:46:59 +0200


> 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=B9.

I have a similar problem.
Say I have a record:
> data Rec =3D Rec { a :: Int, b :: Type1, c :: Type2, d :: Type3, ... =
}
> rec =3D Rec { a =3D 1, b =3D ... }

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=20
> putStrLn $ concat [show a, show c, show d]

Works, but a little bit clumsy, especially with long lists.
Is there a nice solution?

Markus