From 464a54f0e5909fbc7f52f3842d6a05ad53965582 Mon Sep 17 00:00:00 2001 From: simonpj Date: Fri, 8 Dec 2000 09:46:16 +0000 Subject: [PATCH] [project @ 2000-12-08 09:46:16 by simonpj] Add documentation on -fno-monomorphism-restriction --- ghc/docs/users_guide/glasgow_exts.sgml | 64 +++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 2 deletions(-) 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 -- 1.7.10.4