[Haskell-cafe] Could someone explain winhugs does not accept this
argument?
karle
ph_kittichai at yahoo.com
Fri Nov 2 18:58:56 EDT 2007
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 = Signal (Address,Port)
system inA inB = (outC,outD)
where
route = update_pr inA inB
s1 = lookup_pr route inA
s2 = lookup_pr route inB
(s3,s4) = unzipSY s1
(s5,s6) = unzipSY s2
s7 = add_list_pr s3 s5
s8 = add_list_pr s4 s6
outC = fifoSY s7
outD = fifoSY s8
lookup_pr::Signal Table->AbstExt Pkg->AbstExt Pkg
lookup_pr t (Prst(x,y,z))
|(delive_adr_A t == y && x == U) = (Prst(x,y,z))
|otherwise = look_if_RTD_pkG_A t (Prst(x,y,z))
the error message is
Type error in application
*** Expression : delive_adr_A t
*** Term : t
*** Type : Signal Table
*** Does not match : Signal (Int,Port)
--
View this message in context: http://www.nabble.com/Could-someone-explain-winhugs-does-not-accept-this-argument--tf4741195.html#a13557810
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
More information about the Haskell-Cafe
mailing list