-- an abstract data type
data Key = forall a. NewKey (a, a -> Int)

instance Show Key where
	 show (NewKey (x,y)) = "<key>"

-- an operation on this type
getKey :: Key -> Int 
getKey (NewKey(x,f)) = f x 

keys = [ NewKey (4, id),  NewKey ([1,2,3], length) ]

t = map getKey keys

x = case (head keys) of (NewKey (y,z)) -> y
