[Haskell-cafe] TChan implementation: Why TVarList

Joel Reymont joelr1 at gmail.com
Tue Dec 6 06:27:44 EST 2005


Why did you guys implement TChan on top of your own TVarList instead  
of a regular list?

-- | 'TChan' is an abstract type representing an unbounded FIFO channel.
data TChan a = TChan (TVar (TVarList a)) (TVar (TVarList a))

type TVarList a = TVar (TList a)
data TList a = TNil | TCons a (TVarList a)

	Thanks, Joel


More information about the Haskell-Cafe mailing list