> 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)]