Mircea Draghicescu writes:
> 
> panic! (the `impossible' happened):
>         tfun
> 
 ... 
> It comes from:
> 
>               let r = read::(String -> Int) rel
> 

Thanks for reporting the bug; it is caused by indecision in the
compiler as to who should catch the error in your one-liner :)
The 1.3 parser identifies `(String -> Int) rel' as being a valid type
expression (the `type' production in the Haskell report, Section B.4,
allows this...). The subsequent reader pass does not like the shape of
that type expression and cries out "tfun"! To make the above code
parse, move the open parenthesis to the front of `read', and you
should be away, `panic'-less.

Handled more gracefully in the next release,

--Sigbjorn

BTW, similar panics can be had if you construct silly type expressions
like: 

  foo :: (a,b) c
  bar :: (a -> b) c
  etc :: [a] b

Reply via email to