[Haskell-cafe] The "type & data" constructor confused me !

z_axis z_axis at 163.com
Thu Jan 13 04:03:10 CET 2011


data Layout a = forall l. (LayoutClass l a, Read (l a)) => Layout (l a)

readsLayout :: Layout a -> String -> [(Layout a, String)]
readsLayout (Layout l) s = [(Layout (asTypeOf x l), rs) | (x, rs) <- reads
s]

Why is the first parameter of readsLayout "(Layout l)" not "Layout (l a)" ?

Sincerely!


-----
e^(π.i) + 1 = 0
-- 
View this message in context: http://haskell.1045720.n5.nabble.com/The-type-data-constructor-confused-me-tp3339226p3339226.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.



More information about the Haskell-Cafe mailing list