The same declaration.-

type Address = Int 
data Port = C | D deriving(Eq,Show) 
data Payload = UP[Char] | RTDP(Address,Port) deriving(Eq,Show) 
data Pkgtype = RTD | U deriving(Eq,Show)
type Pkg = (Pkgtype,Address,Payload) 
type Table = [(Address,Port)] 

update_table1::Table -> Pkg -> Table
update_table1 [] (t,d,y)  = [(t,d,y)]

Error is

Type error in explicitly typed binding
*** Term           : update_table1
*** Type           : Table -> Pkg -> [(Pkgtype,Int,Payload)]
*** Does not match : Table -> Pkg -> Table

Please kindly suggest, thanks in advance.





-- 
View this message in context: 
http://www.nabble.com/Please-help-from-a-newby-tf4740192.html#a13555338
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to