More Haskell Blue Sky: Partial Type Annotations

2002-04-11 Thread Ashley Yakeley
I sometimes come across a situation when I only want to provide a _partial_ type annotation, perhaps because the full type has some variable unified with some variable in some other type annotation, or something. For instance: f :: forall a. [a] - [a] - [a] f x y = g x where g [] = y

Re: More Haskell Blue Sky: Partial Type Annotations

2002-04-11 Thread John Meacham
I actually have wanted a similar thing at times, the proposal I had in mind was a bit less drastic, simply allow '_' in type signatures which will unify with any arbitrary type. that way you can give any function the type f :: _ - _ or if you just want to resstrict part of the type you could say