| For example,
| 
|       module F(S,T) where
|       type S a = (a,a)
|       data T a = C a a
| 
| could have the interface:
| 
|       interface F where
|       type S a
|       data T a
|
| Are there any problems with this?


The main difficulty is deciding whether the signatures in the
interface should be abstract or concrete.  Suppose body of F was

        f (x,y) b = if b then x else y

Now, should the interface say:

        f :: S a -> a                   (a)
or
        f :: (a,a) -> a                 (b)

This is not insuperable.  Eg one might say (a) if you supply a signature,
with the defn of f, and (b) otherwise, but it is clearly an issue.

Simon

        

Reply via email to