[Haskell-cafe] Inferred type is not general enough

Stefan Holdermans sholderm at students.cs.uu.nl
Thu Jul 8 03:34:54 EDT 2004


Ivan,

Oops ...

  SH> and write the following function, knowing that
  SH> TestPacket is an instance of Packet,
  SH> 
  SH>   getFoo        :: Packet -> Foo
  SH>   getFoo packet =  source packet .

Clearly, I meant to write

  getFoo :: TestPacket -> Foo

here.

Regards,

Stefan




More information about the Haskell-Cafe mailing list