[Haskell-cafe] Please help from a newby

Andrew Wagner wagner.andrew at gmail.com
Fri Nov 2 16:33:27 EDT 2007


> type Pkg = (Pkgtype,Address,Payload)
> type Table = [(Address,Port)]
>
> update_table1::Table -> Pkg -> Table
> update_table1 [] (t,d,y)  = [(t,d,y)]

The problem is that your function's type signature says it's returning
a Table, which is a [(Address,Port)], but it's actually returning a
[(Pkgtype,Address,Payload)]


More information about the Haskell-Cafe mailing list