[Haskell-cafe] difference between type and newtype
mailing_list at istitutocolli.org
Fri Aug 25 15:27:55 EDT 2006
Il Fri, Aug 25, 2006 at 07:52:35PM +0100, Neil Mitchell ebbe a scrivere:
> >why mkT is a type constructor and mkT1 seems not to be?
> In what way is mkT a type constructor? In this program only T1 is a
> type constructor, as far as I can see.
read my sentence as
"why T is a type constructor and T1 seems not to be?"
look at the types:
mkT 2 5 will return
(2,5) whose type is "T a"
mkT1 2 5
(2,5) whose type is "(a,b)".
they return the same stuff with different types. Onle myT will return a
type of type "T a".
More information about the Haskell-Cafe