X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=docs%2Fusers_guide%2Fglasgow_exts.xml;h=d23da182cdc59426f858f42662e5e9c687fa26cb;hp=31206017e7b76cc6b7ff0fa4b12e0de7fee36ddf;hb=6e0f552430600d95768c1668b6d458c71a52f2d4;hpb=5eb2190d2aebc6e1a11780a43d31cbc7e831dd78 diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml index 3120601..d23da18 100644 --- a/docs/users_guide/glasgow_exts.xml +++ b/docs/users_guide/glasgow_exts.xml @@ -2353,6 +2353,16 @@ otherwise is a generalised data type ( +As with other type signatures, you can give a single signature for several data constructors. +In this example we give a single signature for T1 and T2: + + data T a where + T1,T2 :: a -> T a + T3 :: T a + + + + The type signature of each constructor is independent, and is implicitly universally quantified as usual. Different constructors may have different universally-quantified type variables