From 07f465362b11aeb73aee34af77182ba986c54460 Mon Sep 17 00:00:00 2001 From: simonpj Date: Thu, 5 Oct 2000 15:33:03 +0000 Subject: [PATCH] [project @ 2000-10-05 15:33:03 by simonpj] Add a bit more documentation of generics --- ghc/docs/users_guide/glasgow_exts.sgml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ghc/docs/users_guide/glasgow_exts.sgml b/ghc/docs/users_guide/glasgow_exts.sgml index 7cb23c0..b52adc9 100644 --- a/ghc/docs/users_guide/glasgow_exts.sgml +++ b/ghc/docs/users_guide/glasgow_exts.sgml @@ -4279,6 +4279,22 @@ That is, just leave off the "where" clasuse. Of course, you can put in the where clause and over-ride whichever methods you please. + Using generics + + +To use generics you need to + + +Use the flag. + + +Import the module Generics from the lang package. +This import brings into scope the data types Unit, :*:, +and :+:. (You don't need this import if you don't mention these +types explicitly; for example, if you are simply giving instance declarations.) + + + Changes wrt the paper Note that the type constructors :+: and :*: -- 1.7.10.4