GHC 6.6
October 2006GHC 6.6Mailing list: GHC 6.6 releasedRelease notes for GHC 6.6
New features:
BangPatterns
- The :main command in GHCi
- GADTs can now use record syntax and deriving clauses.
This version support postfix operators.Postfix operators in GHC 6.6 The documentation notes: “Since this extension goes beyond Haskell 98, it should really be enabled by a flag; but in fact it is enabled all the time.” This will be done later when GHC 6.10.1 adds the PostfixOperators
language extension.
This version makes some changesScoped type variables in GHC 6.6 to how scoped type variables work.
- Scoped type variables are now rigid.Git commit including a length message about changes to scoped type variables
- Result type signaturesGit commit removing result type signatures are no longer supported.
Introduced the LANGUAGE
pragma for enabling language extensions.
- Prior to this version, the only way to enable language extensions was to use a compiler flag; for example, to enable scoped type variables, you would either invoke the
ghc
executable with the-fscoped-type-variables
flag or add{-# OPTIONS_GHC -fscoped-type-variables #-}
to Haskell source file. Now you also have the option of enabling the extension by adding{-# LANGUAGE ScopedTypeVariables #-}
to a Haskell source file.Extensions supported by the LANGUAGE pragma in GHC 6.6 - Complete list of extensions that can be enabled by the
LANGUAGE
pragma as of this GHC version:Arrows
,BangPatterns
,ContextStack
,CPP
,EmptyDataDecls
,ExistentialQuantification
,ExtensibleRecords
,FlexibleContexts
,FlexibleInstances
,ForeignFunctionInterface
,FunctionalDependencies
, GeneralizedNewtypeDeriving,Generics
,HereDocuments
,ImplicitParams
,IncoherentInstances
,InlinePhase
,MultiParamTypeClasses
,NamedFieldPuns
, NoImplicitPrelude, NoMonomorphismRestriction,OverlappingInstances
,ParallelListComp
,PatternGuards
,PolymorphicComponents
,Rank2Types
,RankNTypes
,RecursiveDo
,RestrictedTypeSynonyms
, ScopedTypeVariables, TemplateHaskell,TypeSynonymInstances
,UndecidableInstances
- The
-X
flag still did not exist; this will appear in GHC 6.8.1.
This GHC version corresponds to base
version 2.1, which introduced some significant new features.
This is where we first see Applicative functors,Commit introducing ApplicativeCommit introducing Alternative as described by Applicative programming with effects, with the addition of three new modules (will later be incorporated into Prelude
in GHC 7.10.1):
Control.Applicative
Control.Applicative in GHC 6.6 — Includes theApplicative
andAlternative
classes, as well as theConst
and ZipList newtypes.Data.Foldable
Data.Foldable in GHC 6.6 — Defines theFoldable
class and many handy functions that are still in use today.Data.Traversable
Data.Traversable in GHC 6.6 — Defines theTraversable
class and a few extra functions. This module is quite small and still remains mostly unchanged from its first appearance.
Other new additions to base
:
Data.ByteString
,Data.ByteString in GHC 6.6 which would soon be moved frombase
into a separatebytestring
package in GHC 6.8.1Data.Fixed
Data.Fixed in GHC 6.6Data.Sequence
Data.Sequence in GHC 6.6