| Michael suggested
| 
|  f :: [a] -> c
|  f xs = if len > fromInteger 3 then len else 0
|       where
|         len :: c
|         len = length xs
| 
| This relies on the 'c' from the type signature scoping over
| the definition, which is on alternative notation for scoped
| type variables.

Hmm, interesting.  Perhaps we need to allow type annotations on
left hand sides as well as embedded in patterns:

  f xs :: c = ...

I know it looks a bit ugly ... add a few more parens and it
starts to remind me of Pascal! :-)

All the best,
Mark



Reply via email to