From: simonpj Date: Fri, 8 Dec 2000 09:46:16 +0000 (+0000) Subject: [project @ 2000-12-08 09:46:16 by simonpj] X-Git-Tag: Approximately_9120_patches~3166 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=464a54f0e5909fbc7f52f3842d6a05ad53965582;p=ghc-hetmet.git [project @ 2000-12-08 09:46:16 by simonpj] Add documentation on -fno-monomorphism-restriction --- diff --git a/ghc/docs/users_guide/glasgow_exts.sgml b/ghc/docs/users_guide/glasgow_exts.sgml index b5e4c67..cbe282b 100644 --- a/ghc/docs/users_guide/glasgow_exts.sgml +++ b/ghc/docs/users_guide/glasgow_exts.sgml @@ -139,6 +139,64 @@ program), you may wish to check if there are libraries that provide a . + +Language variations + + + There are several flags that control what variation of the language are permitted. +Leaving out all of them gives you standard Haskell 98. + + + + +: + +This simultaneously enables all of the extensions to Haskell 98 described in this +chapter, except where otherwise noted. + + + +: + + Switch off the Haskell 98 monomorphism restriction. Independent of the +flag. + + + +, + , + : + + See . +Only relevant if you also use . + + + + +: + + See . +Only relevant if you also use . + + + + + : + + See . +Only relevant if you also use . + + + + : + + See . +Independent of . + + + + + Unboxed types and primitive operations @@ -1897,7 +1955,7 @@ class like this: - + Instance declarations @@ -4244,6 +4302,8 @@ An example will give the idea: + import Generics + class Bin a where toBin :: a -> [Int] fromBin :: [Int] -> (a, [Int]) @@ -4262,7 +4322,7 @@ An example will give the idea: This class declaration explains how toBin and fromBin work for arbitrary data types. They do so by giving cases for unit, product, and sum, -which are defined thus: +which are defined thus in the library module Generics: data Unit = Unit