From: simonpj Date: Fri, 16 Nov 2001 15:33:53 +0000 (+0000) Subject: [project @ 2001-11-16 15:33:53 by simonpj] X-Git-Tag: Approximately_9120_patches~566 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=2ce9f3af8a25f0ff3488a14ae2883111447f1c9c;hp=744e19bed0a862b6fc0fcf00ee754433c3279489;p=ghc-hetmet.git [project @ 2001-11-16 15:33:53 by simonpj] Correct docs about SPECIALIZE instance; MERGE TO STABLE --- diff --git a/ghc/docs/users_guide/glasgow_exts.sgml b/ghc/docs/users_guide/glasgow_exts.sgml index da5c497..20d164d 100644 --- a/ghc/docs/users_guide/glasgow_exts.sgml +++ b/ghc/docs/users_guide/glasgow_exts.sgml @@ -2627,12 +2627,17 @@ i2d (I# i) = D# (int2Double# i) -- uses Glasgow prim-op directly Same idea, except for instance declarations. For example: -instance (Eq a) => Eq (Foo a) where { ... usual stuff ... } - -{-# SPECIALIZE instance Eq (Foo [(Int, Bar)] #-} +instance (Eq a) => Eq (Foo a) where { + {-# SPECIALIZE instance Eq (Foo [(Int, Bar)]) #-} + ... usual stuff ... + } - -Compatible with HBC, by the way. +The pragma must occur inside the where part +of the instance declaration. + + +Compatible with HBC, by the way, except perhaps in the placement +of the pragma.