on master help sign in
Add patch
commit5b60f584b5fea40e49b609f859d6038c77481e33 authorMichael Snoyman <michael@snoyman.com> dateThu 17 Apr 2014, 07:02 (13 years ago) parent1eaf203
1 file changed+1398
patching/patches/haskell-src-exts-1.15.0.patch+1398
patching/patches/haskell-src-exts-1.15.0.patchnew file+1398
@@ -0,0 +1,1398 @@
1+Only in orig: dist
2+diff -ru orig/haskell-src-exts.cabal new/haskell-src-exts.cabal
3+--- orig/haskell-src-exts.cabal 2014-04-17 07:02:07.071112593 +0300
4++++ new/haskell-src-exts.cabal 2014-04-17 07:02:00.000000000 +0300
5+@@ -1,123 +1,96 @@
6+-name: haskell-src-exts
7+-version: 1.15.0
8+-cabal-version: >=1.10
9+-build-type: Custom
10+-license: BSD3
11+-license-file: LICENSE
12+-maintainer: Niklas Broberg <niklas.broberg@chalmers.se>
13+-stability: Stable
14+-homepage: https://github.com/haskell-suite/haskell-src-exts
15+-synopsis: Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer
16+-description: Haskell-Source with Extensions (HSE, haskell-src-exts)
17+- is an extension of the standard haskell-src package,
18+- and handles most registered syntactic extensions to Haskell, including:
19+- .
20+- * Multi-parameter type classes with functional dependencies
21+- .
22+- * Indexed type families (including associated types)
23+- .
24+- * Empty data declarations
25+- .
26+- * GADTs
27+- .
28+- * Implicit parameters
29+- .
30+- * Template Haskell
31+- .
32+- and a few more. All extensions implemented in GHC are supported.
33+- Apart from these standard extensions,
34+- it also handles regular patterns as per the HaRP extension
35+- as well as HSX-style embedded XML syntax.
36+-category: Language
37+-author: Niklas Broberg
38+-tested-with: GHC ==6.10.2 GHC ==6.10.4 GHC ==6.12.3 GHC ==7.0.2
39+-data-dir: ""
40+-extra-source-files: CHANGELOG Test/examples/ArityMismatch.hs
41+- Test/examples/ArrowLayout.hs Test/examples/Attributes.hs
42+- Test/examples/BadStringLineBreak.hs Test/examples/BangPatterns.hs
43+- Test/examples/Bug.hs Test/examples/ByteStringUtils.hs
44+- Test/examples/ClassInstType.hs Test/examples/ConstraintKinds.hs
45+- Test/examples/CParser.hs Test/examples/CStyleLinePragmas.hs
46+- Test/examples/CxtWhitespace.hs Test/examples/DataHeadParen.hs
47+- Test/examples/DataKinds.hs Test/examples/Directory.hs
48+- Test/examples/DoRec.hs Test/examples/DoubleHashOp.hs
49+- Test/examples/EmptyAnn.hs Test/examples/EmptyContext.hs
50+- Test/examples/EmptyFunDepPremise.hs Test/examples/EmptyInstance.hs
51+- Test/examples/EmptyList.hs Test/examples/ExtraEndBrace.hs
52+- Test/examples/FamilyKindSig.hs Test/examples/FamilyVarid.hs
53+- Test/examples/FFIExtensions.hs Test/examples/FixityTests.hs
54+- Test/examples/ForallInInstance.hs Test/examples/ForeignImport.hs
55+- Test/examples/GadtDeriving.hs Test/examples/GADTRecord.hs
56+- Test/examples/GenericTree.hs Test/examples/GhcDeriving.hs
57+- Test/examples/GroupKeyword.hs Test/examples/HappyDoAction.hs
58+- Test/examples/HaskellParser.hs Test/examples/HexPrec.hs
59+- Test/examples/IfThenElseLayout.hs Test/examples/IllDataTypeDecl.hs
60+- Test/examples/IndentedWhereBlock.hs Test/examples/IndentedWhere.hs
61+- Test/examples/InfixParser.hs Test/examples/LambdaCase.hs
62+- Test/examples/LineOptionsPragma.hs Test/examples/MultiCtxt.hs
63+- Test/examples/MultiWayIf.hs Test/examples/NegPrimWordLiteral.hs
64+- Test/examples/NestedAsPat.hs Test/examples/NonDecreasing.hs
65+- Test/examples/NPlusK.hs Test/examples/ParallelListComp.hs
66+- Test/examples/ParenFunBind.hs
67+- Test/examples/PrimitiveIntHexLiteral.hs Test/examples/QQType.hs
68+- Test/examples/QualifiedDot.hs Test/examples/QuasiQuoteLines.hs
69+- Test/examples/QuasiQuoteOld.hs Test/examples/QuasiQuoteSplice.hs
70+- Test/examples/RCategory.lhs Test/examples/ReadP.hs
71+- Test/examples/RealGHC.lhs Test/examples/RecordInfixSelector.hs
72+- Test/examples/RelaxedDo.hs Test/examples/SCCPragmas.hs
73+- Test/examples/ScopedTypeVariables.hs
74+- Test/examples/SimpleDeriving.hs Test/examples/SingleClassAsst.hs
75+- Test/examples/SpecializeInstance.hs
76+- Test/examples/SpecializePhaseControl.hs
77+- Test/examples/TabWhitespace.hs Test/examples/Testing.hs
78+- Test/examples/THTypes.hs Test/examples/TupleSections.hs
79+- Test/examples/TypeFunctions.hs
80+- Test/examples/TypeOperatorAsVariable.hs
81+- Test/examples/TypeOperatorsTest.hs
82+- Test/examples/UnboxedSingleton.hs Test/examples/UnboxedTuples.hs
83+- Test/examples/Unicode.hs Test/examples/UnicodeSyntax.hs
84+- Test/examples/UnindentedPragmaClose.hs Test/examples/Unpack.hs
85+- Test/examples/WhereBlock.hs Test/failing.txt Test/printFail.txt
86+- Test/Runner.hs
87+-
88+-source-repository head
89+- type: git
90+- location: https://github.com/haskell-suite/haskell-src-exts.git
91+-
92+-library
93+- build-depends: array >=0.1 && <0.6, pretty >=1.0 && <1.2,
94+- cpphs >=1.3 && <1.19, base -any, ghc-prim <0.4
95+- exposed-modules: Language.Haskell.Exts Language.Haskell.Exts.Lexer
96+- Language.Haskell.Exts.Parser Language.Haskell.Exts.Pretty
97+- Language.Haskell.Exts.Syntax Language.Haskell.Exts.Extension
98+- Language.Haskell.Exts.Build Language.Haskell.Exts.Fixity
99+- Language.Haskell.Exts.Comments Language.Haskell.Exts.SrcLoc
100+- Language.Haskell.Exts.Annotated
101+- Language.Haskell.Exts.Annotated.Syntax
102+- Language.Haskell.Exts.Annotated.Fixity
103+- Language.Haskell.Exts.Annotated.Build
104+- Language.Haskell.Exts.Annotated.ExactPrint
105+- Language.Haskell.Exts.Annotated.Simplify
106+- exposed: True
107+- buildable: True
108+- build-tools: happy >=1.17
109+- default-language: Haskell98
110+- hs-source-dirs: src
111+- other-modules: Language.Haskell.Exts.ExtScheme
112+- Language.Haskell.Exts.ParseMonad Language.Haskell.Exts.ParseSyntax
113+- Language.Haskell.Exts.InternalLexer
114+- Language.Haskell.Exts.ParseUtils
115+- Language.Haskell.Exts.InternalParser
116+-
117+-test-suite test
118+- build-depends: base -any, haskell-src-exts <1.16,
119+- smallcheck >=1.0 && <1.2, tasty >=0.3 && <0.9,
120+- tasty-smallcheck <0.9, tasty-hunit <0.9, filepath <1.4,
121+- directory <1.3
122+- type: exitcode-stdio-1.0
123+- main-is: Runner.hs
124+- buildable: True
125+- default-language: Haskell2010
126+- hs-source-dirs: Test
127+- ghc-options: -threaded
128+-
129+\ No newline at end of file
130++Name: haskell-src-exts
131++Version: 1.15.0
132++License: BSD3
133++License-File: LICENSE
134++Build-Type: Simple
135++Author: Niklas Broberg
136++Maintainer: Niklas Broberg <niklas.broberg@chalmers.se>
137++Category: Language
138++Synopsis: Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer
139++Description: Haskell-Source with Extensions (HSE, haskell-src-exts)
140++ is an extension of the standard haskell-src package,
141++ and handles most registered syntactic extensions to Haskell, including:
142++ .
143++ * Multi-parameter type classes with functional dependencies
144++ .
145++ * Indexed type families (including associated types)
146++ .
147++ * Empty data declarations
148++ .
149++ * GADTs
150++ .
151++ * Implicit parameters
152++ .
153++ * Template Haskell
154++ .
155++ and a few more. All extensions implemented in GHC are supported.
156++ Apart from these standard extensions,
157++ it also handles regular patterns as per the HaRP extension
158++ as well as HSX-style embedded XML syntax.
159++Homepage: https://github.com/haskell-suite/haskell-src-exts
160++Stability: Stable
161++Tested-with: GHC==6.10.2, GHC==6.10.4, GHC==6.12.3, GHC==7.0.2
162++Build-Type: Custom
163++Cabal-Version: >= 1.10
164++
165++Extra-Source-Files:
166++ CHANGELOG
167++ Test/examples/*.hs
168++ Test/failing.txt
169++ Test/printFail.txt
170++ Test/Runner.hs
171++ Test/UnitTests.hs
172++
173++Library
174++ Default-language: Haskell98
175++ Build-Tools: happy >= 1.17
176++ Build-Depends: array >= 0.1, pretty >= 1.0, cpphs >= 1.3,
177++ base >= 4.5 && < 5,
178++ -- this is needed to access GHC.Generics on GHC 7.4
179++ ghc-prim
180++
181++ Exposed-modules: Language.Haskell.Exts,
182++ Language.Haskell.Exts.Lexer,
183++ Language.Haskell.Exts.Parser,
184++ Language.Haskell.Exts.Pretty,
185++ Language.Haskell.Exts.Syntax,
186++ Language.Haskell.Exts.Extension,
187++ Language.Haskell.Exts.Build,
188++ Language.Haskell.Exts.Fixity,
189++ Language.Haskell.Exts.Comments,
190++ Language.Haskell.Exts.SrcLoc,
191++
192++ Language.Haskell.Exts.Annotated,
193++ Language.Haskell.Exts.Annotated.Syntax,
194++ Language.Haskell.Exts.Annotated.Fixity,
195++ Language.Haskell.Exts.Annotated.Build,
196++ Language.Haskell.Exts.Annotated.ExactPrint,
197++ Language.Haskell.Exts.Annotated.Simplify
198++
199++ Other-modules: Language.Haskell.Exts.ExtScheme,
200++
201++ Language.Haskell.Exts.ParseMonad,
202++ Language.Haskell.Exts.ParseSyntax,
203++ Language.Haskell.Exts.InternalLexer,
204++ Language.Haskell.Exts.ParseUtils,
205++ Language.Haskell.Exts.InternalParser
206++ Hs-source-dirs: src
207++
208++Source-Repository head
209++ Type: git
210++ Location: https://github.com/haskell-suite/haskell-src-exts.git
211++
212++Test-Suite test
213++ type: exitcode-stdio-1.0
214++ hs-source-dirs: Test
215++ main-is: Runner.hs
216++ GHC-Options: -threaded
217++ Default-language: Haskell2010
218++ Build-depends: base < 5,
219++ haskell-src-exts,
220++ smallcheck >= 1.0,
221++ tasty >= 0.3,
222++ tasty-smallcheck,
223++ tasty-hunit,
224++ filepath,
225++ directory
226+diff -ru orig/src/Language/Haskell/Exts/Annotated/Syntax.hs new/src/Language/Haskell/Exts/Annotated/Syntax.hs
227+--- orig/src/Language/Haskell/Exts/Annotated/Syntax.hs 2014-04-17 07:02:06.927109238 +0300
228++++ new/src/Language/Haskell/Exts/Annotated/Syntax.hs 2014-04-17 07:02:00.000000000 +0300
229+@@ -1,4 +1,4 @@
230+-{-# LANGUAGE DeriveDataTypeable, DeriveFoldable, DeriveTraversable, DeriveGeneric #-}
231++{-# LANGUAGE DeriveDataTypeable, DeriveFoldable, DeriveTraversable, DeriveFunctor, DeriveGeneric #-}
232+ -----------------------------------------------------------------------------
233+ -- |
234+ -- Module : Language.Haskell.Exts.Annotated.Syntax
235+@@ -112,7 +112,7 @@
236+
237+ -- | The name of a Haskell module.
238+ data ModuleName l = ModuleName l String
239+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
240++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
241+
242+ -- | Constructors with special syntax.
243+ -- These names are never qualified, and always refer to builtin type or
244+@@ -125,7 +125,7 @@
245+ -- constructors @(,)@ etc, possibly boxed @(\#,\#)@
246+ | Cons l -- ^ list data constructor @(:)@
247+ | UnboxedSingleCon l -- ^ unboxed singleton tuple constructor @(\# \#)@
248+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
249++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
250+
251+ -- | This type is used to represent qualified variables, and also
252+ -- qualified constructors.
253+@@ -133,38 +133,38 @@
254+ = Qual l (ModuleName l) (Name l) -- ^ name qualified with a module name
255+ | UnQual l (Name l) -- ^ unqualified local name
256+ | Special l (SpecialCon l) -- ^ built-in constructor with special syntax
257+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
258++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
259+
260+ -- | This type is used to represent variables, and also constructors.
261+ data Name l
262+ = Ident l String -- ^ /varid/ or /conid/.
263+ | Symbol l String -- ^ /varsym/ or /consym/
264+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
265++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
266+
267+ -- | An implicit parameter name.
268+ data IPName l
269+ = IPDup l String -- ^ ?/ident/, non-linear implicit parameter
270+ | IPLin l String -- ^ %/ident/, linear implicit parameter
271+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
272++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
273+
274+ -- | Possibly qualified infix operators (/qop/), appearing in expressions.
275+ data QOp l
276+ = QVarOp l (QName l) -- ^ variable operator (/qvarop/)
277+ | QConOp l (QName l) -- ^ constructor operator (/qconop/)
278+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
279++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
280+
281+ -- | Operators appearing in @infix@ declarations are never qualified.
282+ data Op l
283+ = VarOp l (Name l) -- ^ variable operator (/varop/)
284+ | ConOp l (Name l) -- ^ constructor operator (/conop/)
285+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
286++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
287+
288+ -- | A name (/cname/) of a component of a class or data type in an @import@
289+ -- or export specification.
290+ data CName l
291+ = VarName l (Name l) -- ^ name of a method or field
292+ | ConName l (Name l) -- ^ name of a data constructor
293+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
294++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
295+
296+ -- | A complete Haskell source module.
297+ data Module l
298+@@ -176,16 +176,16 @@
299+ | XmlHybrid l (Maybe (ModuleHead l)) [ModulePragma l] [ImportDecl l] [Decl l]
300+ (XName l) [XAttr l] (Maybe (Exp l)) [Exp l]
301+ -- ^ a hybrid module combining an XML document with an ordinary module
302+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
303++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
304+
305+ -- | The head of a module, including the name and export specification.
306+ data ModuleHead l = ModuleHead l (ModuleName l) (Maybe (WarningText l)) (Maybe (ExportSpecList l))
307+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
308++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
309+
310+ -- | An explicit export specification.
311+ data ExportSpecList l
312+ = ExportSpecList l [ExportSpec l]
313+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
314++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
315+
316+ -- | An item in a module's export specification.
317+ data ExportSpec l
318+@@ -201,7 +201,7 @@
319+ -- a datatype exported with some of its constructors.
320+ | EModuleContents l (ModuleName l) -- ^ @module M@:
321+ -- re-export a module.
322+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
323++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
324+
325+ -- | An import declaration.
326+ data ImportDecl l = ImportDecl
327+@@ -214,7 +214,7 @@
328+ , importSpecs :: Maybe (ImportSpecList l)
329+ -- ^ optional list of import specifications.
330+ }
331+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
332++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
333+
334+ -- | An explicit import specification list.
335+ data ImportSpecList l
336+@@ -222,7 +222,7 @@
337+ -- A list of import specifications.
338+ -- The 'Bool' is 'True' if the names are excluded
339+ -- by @hiding@.
340+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
341++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
342+
343+ -- | An import specification, representing a single explicit item imported
344+ -- (or hidden) from a module.
345+@@ -236,14 +236,14 @@
346+ | IThingWith l (Name l) [CName l] -- ^ @T(C_1,...,C_n)@:
347+ -- a class imported with some of its methods, or
348+ -- a datatype imported with some of its constructors.
349+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
350++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
351+
352+ -- | Associativity of an operator.
353+ data Assoc l
354+ = AssocNone l -- ^ non-associative operator (declared with @infix@)
355+ | AssocLeft l -- ^ left-associative operator (declared with @infixl@).
356+ | AssocRight l -- ^ right-associative operator (declared with @infixr@)
357+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
358++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
359+
360+ -- | A top-level declaration.
361+ data Decl l
362+@@ -303,7 +303,7 @@
363+ -- ^ A SPECIALISE instance pragma
364+ | AnnPragma l (Annotation l)
365+ -- ^ An ANN pragma
366+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
367++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
368+
369+ -- | An annotation through an ANN pragma.
370+ data Annotation l
371+@@ -313,40 +313,40 @@
372+ -- ^ An annotation for a declared type.
373+ | ModuleAnn l (Exp l)
374+ -- ^ An annotation for the defining module.
375+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
376++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
377+
378+
379+ -- | A flag stating whether a declaration is a data or newtype declaration.
380+ data DataOrNew l = DataType l | NewType l
381+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
382++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
383+
384+ -- | The head of a type or class declaration.
385+ data DeclHead l
386+ = DHead l (Name l) [TyVarBind l]
387+ | DHInfix l (TyVarBind l) (Name l) (TyVarBind l)
388+ | DHParen l (DeclHead l)
389+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
390++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
391+
392+ -- | The head of an instance declaration.
393+ data InstHead l
394+ = IHead l (QName l) [Type l]
395+ | IHInfix l (Type l) (QName l) (Type l)
396+ | IHParen l (InstHead l)
397+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
398++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
399+
400+ -- | A deriving clause following a data type declaration.
401+ data Deriving l = Deriving l [InstHead l]
402+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
403++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
404+
405+ -- | A binding group inside a @let@ or @where@ clause.
406+ data Binds l
407+ = BDecls l [Decl l] -- ^ An ordinary binding group
408+ | IPBinds l [IPBind l] -- ^ A binding group for implicit parameters
409+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
410++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
411+
412+ -- | A binding of an implicit parameter.
413+ data IPBind l = IPBind l (IPName l) (Exp l)
414+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
415++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
416+
417+ -- | Clauses of a function binding.
418+ data Match l
419+@@ -360,7 +360,7 @@
420+ -- the right-hand side and an optional where clause.
421+ -- Note that there can be more than two arguments to a function declared
422+ -- infix, hence the list of pattern arguments.
423+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
424++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
425+
426+ -- | A single constructor declaration within a data type declaration,
427+ -- which may have an existential quantification binding.
428+@@ -368,7 +368,7 @@
429+ = QualConDecl l
430+ {-forall-} (Maybe [TyVarBind l]) {- . -} (Maybe (Context l))
431+ {- => -} (ConDecl l)
432+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
433++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
434+
435+ -- | Declaration of an ordinary data constructor.
436+ data ConDecl l
437+@@ -378,17 +378,17 @@
438+ -- ^ infix data constructor
439+ | RecDecl l (Name l) [FieldDecl l]
440+ -- ^ record constructor
441+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
442++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
443+
444+ -- | Declaration of a (list of) named field(s).
445+ data FieldDecl l = FieldDecl l [Name l] (BangType l)
446+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
447++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
448+
449+
450+ -- | A single constructor declaration in a GADT data type declaration.
451+ data GadtDecl l
452+ = GadtDecl l (Name l) (Type l)
453+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
454++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
455+
456+ -- | Declarations inside a class declaration.
457+ data ClassDecl l
458+@@ -400,7 +400,7 @@
459+ -- ^ declaration of an associated type synonym
460+ | ClsTyDef l (Type l) (Type l)
461+ -- ^ default choice for an associated type synonym
462+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
463++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
464+
465+ -- | Declarations inside an instance declaration.
466+ data InstDecl l
467+@@ -412,7 +412,7 @@
468+ -- ^ an associated data type implementation
469+ | InsGData l (DataOrNew l) (Type l) (Maybe (Kind l)) [GadtDecl l] (Maybe (Deriving l))
470+ -- ^ an associated data type implemented using GADT style
471+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
472++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
473+
474+ -- | The type of a constructor argument or field, optionally including
475+ -- a strictness annotation.
476+@@ -420,21 +420,21 @@
477+ = BangedTy l (Type l) -- ^ strict component, marked with \"@!@\"
478+ | UnBangedTy l (Type l) -- ^ non-strict component
479+ | UnpackedTy l (Type l) -- ^ unboxed component, marked with an UNPACK pragma
480+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
481++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
482+
483+ -- | The right hand side of a function or pattern binding.
484+ data Rhs l
485+ = UnGuardedRhs l (Exp l) -- ^ unguarded right hand side (/exp/)
486+ | GuardedRhss l [GuardedRhs l]
487+ -- ^ guarded right hand side (/gdrhs/)
488+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
489++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
490+
491+ -- | A guarded right hand side @|@ /stmts/ @=@ /exp/.
492+ -- The guard is a series of statements when using pattern guards,
493+ -- otherwise it will be a single qualifier expression.
494+ data GuardedRhs l
495+ = GuardedRhs l [Stmt l] (Exp l)
496+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
497++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
498+
499+ -- | A type qualified with a context.
500+ -- An unqualified type has an empty context.
501+@@ -453,7 +453,7 @@
502+ | TyInfix l (Type l) (QName l) (Type l) -- ^ infix type constructor
503+ | TyKind l (Type l) (Kind l) -- ^ type with explicit kind signature
504+ | TyPromoted l (Promoted l) -- ^ @'K@, a promoted data type (-XDataKinds).
505+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
506++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
507+
508+ -- | Bools here are True if there was a leading quote which may be
509+ -- left out. For example @'[k1,k2]@ means the same thing as @[k1,k2]@.
510+@@ -464,7 +464,7 @@
511+ | PromotedList l Bool [Promoted l]
512+ | PromotedTuple l [Promoted l]
513+ | PromotedUnit l
514+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
515++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
516+
517+ -- | Flag denoting whether a tuple is boxed or unboxed.
518+ data Boxed = Boxed | Unboxed
519+@@ -474,7 +474,7 @@
520+ data TyVarBind l
521+ = KindedVar l (Name l) (Kind l) -- ^ variable binding with kind annotation
522+ | UnkindedVar l (Name l) -- ^ ordinary variable binding
523+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
524++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
525+
526+ -- | An explicit kind annotation.
527+ data Kind l
528+@@ -486,14 +486,14 @@
529+ | KindApp l (Kind l) (Kind l) -- ^ @k1 k2@
530+ | KindTuple l [Kind l] -- ^ @'(k1,k2,k3)@, a promoted tuple
531+ | KindList l [Kind l] -- ^ @'[k1,k2,k3]@, a promoted list literal
532+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
533++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
534+
535+
536+ -- | A functional dependency, given on the form
537+ -- l1 l2 ... ln -> r2 r3 .. rn
538+ data FunDep l
539+ = FunDep l [Name l] [Name l]
540+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
541++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
542+
543+ -- | A context is a set of assertions
544+ data Context l
545+@@ -501,7 +501,7 @@
546+ | CxTuple l [Asst l]
547+ | CxParen l (Context l)
548+ | CxEmpty l
549+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
550++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
551+
552+ -- | Class assertions.
553+ -- In Haskell 98, the argument would be a /tyvar/, but this definition
554+@@ -512,7 +512,7 @@
555+ | InfixA l (Type l) (QName l) (Type l) -- ^ class assertion where the class name is given infix
556+ | IParam l (IPName l) (Type l) -- ^ implicit parameter assertion
557+ | EqualP l (Type l) (Type l) -- ^ type equality constraint
558+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
559++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
560+
561+ -- | /literal/
562+ -- Values of this type hold the abstract value of the literal, along with the
563+@@ -529,7 +529,7 @@
564+ | PrimDouble l Rational String -- ^ unboxed double literal
565+ | PrimChar l Char String -- ^ unboxed character literal
566+ | PrimString l String String -- ^ unboxed string literal
567+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
568++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
569+
570+ -- | Haskell expressions.
571+ data Exp l
572+@@ -601,18 +601,18 @@
573+
574+ -- LambdaCase
575+ | LCase l [Alt l] -- ^ @\case@ /alts/
576+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
577++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
578+
579+ -- | The name of an xml element or attribute,
580+ -- possibly qualified with a namespace.
581+ data XName l
582+ = XName l String -- <name ...
583+ | XDomName l String String -- <dom:name ...
584+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
585++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
586+
587+ -- | An xml attribute, which is a name-expression pair.
588+ data XAttr l = XAttr l (XName l) (Exp l)
589+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
590++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
591+
592+ -- | A template haskell bracket expression.
593+ data Bracket l
594+@@ -620,20 +620,20 @@
595+ | PatBracket l (Pat l) -- ^ pattern bracket: @[p| ... |]@
596+ | TypeBracket l (Type l) -- ^ type bracket: @[t| ... |]@
597+ | DeclBracket l [Decl l] -- ^ declaration bracket: @[d| ... |]@
598+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
599++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
600+
601+ -- | A template haskell splice expression
602+ data Splice l
603+ = IdSplice l String -- ^ variable splice: @$var@
604+ | ParenSplice l (Exp l) -- ^ parenthesised expression splice: @$(/exp/)@
605+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
606++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
607+
608+ -- | The safety of a foreign function call.
609+ data Safety l
610+ = PlayRisky l -- ^ unsafe
611+ | PlaySafe l Bool -- ^ safe ('False') or threadsafe ('True')
612+ | PlayInterruptible l -- ^ interruptible
613+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
614++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
615+
616+ -- | The calling convention of a foreign function call.
617+ data CallConv l
618+@@ -644,7 +644,7 @@
619+ | Jvm l
620+ | Js l
621+ | CApi l
622+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
623++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
624+
625+ -- | A top level options pragma, preceding the module header.
626+ data ModulePragma l
627+@@ -653,7 +653,7 @@
628+ -- ^ OPTIONS pragma, possibly qualified with a tool, e.g. OPTIONS_GHC
629+ | AnnModulePragma l (Annotation l)
630+ -- ^ ANN pragma with module scope
631+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
632++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
633+
634+ -- | Recognised tools for OPTIONS pragmas.
635+ data Tool = GHC | HUGS | NHC98 | YHC | HADDOCK | UnknownTool String
636+@@ -663,25 +663,25 @@
637+ data Activation l
638+ = ActiveFrom l Int
639+ | ActiveUntil l Int
640+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
641++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
642+
643+ -- | The body of a RULES pragma.
644+ data Rule l
645+ = Rule l String (Maybe (Activation l)) (Maybe [RuleVar l]) (Exp l) (Exp l)
646+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
647++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
648+
649+ -- | Variables used in a RULES pragma, optionally annotated with types
650+ data RuleVar l
651+ = RuleVar l (Name l)
652+ | TypedRuleVar l (Name l) (Type l)
653+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
654++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
655+
656+ -- | Warning text to optionally use in the module header of e.g.
657+ -- a deprecated module.
658+ data WarningText l
659+ = DeprText l String
660+ | WarnText l String
661+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
662++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
663+
664+
665+ -- | A pattern, to be matched against a value.
666+@@ -711,11 +711,11 @@
667+ | PXRPats l [RPat l] -- ^ XML regular list pattern
668+ | PQuasiQuote l String String -- ^ quasi quote pattern: @[$/name/| /string/ |]@
669+ | PBangPat l (Pat l) -- ^ strict (bang) pattern: @f !x = ...@
670+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
671++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
672+
673+ -- | An XML attribute in a pattern.
674+ data PXAttr l = PXAttr l (XName l) (Pat l)
675+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
676++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
677+
678+ -- | A regular pattern operator.
679+ data RPatOp l
680+@@ -725,7 +725,7 @@
681+ | RPPlusG l -- ^ @+!@ = 1 or more, greedy
682+ | RPOpt l -- ^ @?@ = 0 or 1
683+ | RPOptG l -- ^ @?!@ = 0 or 1, greedy
684+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
685++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
686+
687+ -- | An entity in a regular pattern.
688+ data RPat l
689+@@ -737,14 +737,14 @@
690+ | RPAs l (Name l) (RPat l) -- ^ linear variable binding, e.g. foo\@(1 | 2)
691+ | RPParen l (RPat l) -- ^ parenthesised pattern, e.g. (2*)
692+ | RPPat l (Pat l) -- ^ an ordinary pattern
693+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
694++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
695+
696+ -- | An /fpat/ in a labeled record pattern.
697+ data PatField l
698+ = PFieldPat l (QName l) (Pat l) -- ^ ordinary label-pattern pair
699+ | PFieldPun l (Name l) -- ^ record field pun
700+ | PFieldWildcard l -- ^ record field wildcard
701+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
702++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
703+
704+ -- | A statement, representing both a /stmt/ in a @do@-expression,
705+ -- an ordinary /qual/ in a list comprehension, as well as a /stmt/
706+@@ -758,7 +758,7 @@
707+ -- a guard expression
708+ | LetStmt l (Binds l) -- ^ local bindings
709+ | RecStmt l [Stmt l] -- ^ a recursive binding group for arrows
710+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
711++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
712+
713+ -- | A general /transqual/ in a list comprehension,
714+ -- which could potentially be a transform of the kind
715+@@ -770,19 +770,19 @@
716+ | GroupBy l (Exp l) -- ^ @then@ @group@ @by@ /exp/
717+ | GroupUsing l (Exp l) -- ^ @then@ @group@ @using@ /exp/
718+ | GroupByUsing l (Exp l) (Exp l) -- ^ @then@ @group@ @by@ /exp/ @using@ /exp/
719+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
720++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
721+
722+ -- | An /fbind/ in a labeled construction or update expression.
723+ data FieldUpdate l
724+ = FieldUpdate l (QName l) (Exp l) -- ^ ordinary label-expresion pair
725+ | FieldPun l (Name l) -- ^ record field pun
726+ | FieldWildcard l -- ^ record field wildcard
727+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
728++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
729+
730+ -- | An /alt/ alternative in a @case@ expression.
731+ data Alt l
732+ = Alt l (Pat l) (GuardedAlts l) (Maybe (Binds l))
733+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
734++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
735+
736+ -- | The right-hand sides of a @case@ alternative,
737+ -- which may be a single right-hand side or a
738+@@ -790,17 +790,17 @@
739+ data GuardedAlts l
740+ = UnGuardedAlt l (Exp l) -- ^ @->@ /exp/
741+ | GuardedAlts l [GuardedAlt l] -- ^ /gdpat/
742+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
743++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
744+
745+ -- | A guarded case alternative @|@ /stmts/ @->@ /exp/.
746+ data GuardedAlt l
747+ = GuardedAlt l [Stmt l] (Exp l)
748+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
749++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
750+
751+ -- | An alternative in a multiway @if@ expression.
752+ data IfAlt l
753+ = IfAlt l (Exp l) (Exp l)
754+- deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Generic)
755++ deriving (Eq,Ord,Show,Typeable,Data,Foldable,Traversable,Functor,Generic)
756+ -----------------------------------------------------------------------------
757+ -- Builtin names.
758+
759+@@ -882,454 +882,6 @@
760+ (=~=) :: (Annotated a, Eq (a ())) => a l1 -> a l2 -> Bool
761+ a =~= b = fmap (const ()) a == fmap (const ()) b
762+
763+-instance Functor ModuleName where
764+- fmap f (ModuleName l s) = ModuleName (f l) s
765+-
766+-instance Functor SpecialCon where
767+- fmap f sc = case sc of
768+- UnitCon l -> UnitCon (f l)
769+- ListCon l -> ListCon (f l)
770+- FunCon l -> FunCon (f l)
771+- TupleCon l b n -> TupleCon (f l) b n
772+- Cons l -> Cons (f l)
773+- UnboxedSingleCon l -> UnboxedSingleCon (f l)
774+-
775+-instance Functor QName where
776+- fmap f qn = case qn of
777+- Qual l mn n -> Qual (f l) (fmap f mn) (fmap f n)
778+- UnQual l n -> UnQual (f l) (fmap f n)
779+- Special l sc -> Special (f l) (fmap f sc)
780+-
781+-instance Functor Name where
782+- fmap f (Ident l s) = Ident (f l) s
783+- fmap f (Symbol l s) = Symbol (f l) s
784+-
785+-instance Functor IPName where
786+- fmap f (IPDup l s) = IPDup (f l) s
787+- fmap f (IPLin l s) = IPLin (f l) s
788+-
789+-instance Functor QOp where
790+- fmap f (QVarOp l qn) = QVarOp (f l) (fmap f qn)
791+- fmap f (QConOp l qn) = QConOp (f l) (fmap f qn)
792+-
793+-instance Functor Op where
794+- fmap f (VarOp l n) = VarOp (f l) (fmap f n)
795+- fmap f (ConOp l n) = ConOp (f l) (fmap f n)
796+-
797+-instance Functor CName where
798+- fmap f (VarName l n) = VarName (f l) (fmap f n)
799+- fmap f (ConName l n) = ConName (f l) (fmap f n)
800+-
801+-instance Functor Module where
802+- fmap f (Module l mmh ops iss dcls) =
803+- Module (f l) (fmap (fmap f) mmh) (map (fmap f) ops) (map (fmap f) iss) (map (fmap f) dcls)
804+- fmap f (XmlPage l mn os xn xas me es) =
805+- XmlPage (f l) (fmap f mn) (map (fmap f) os) (fmap f xn) (map (fmap f) xas) (fmap (fmap f) me) (map (fmap f) es)
806+- fmap f (XmlHybrid l mmh ops iss dcls xn xas me es) =
807+- XmlHybrid (f l) (fmap (fmap f) mmh) (map (fmap f) ops) (map (fmap f) iss) (map (fmap f) dcls)
808+- (fmap f xn) (map (fmap f) xas) (fmap (fmap f) me) (map (fmap f) es)
809+-
810+-instance Functor ModuleHead where
811+- fmap f (ModuleHead l mn mwt mexpl) =
812+- ModuleHead (f l) (fmap f mn) (fmap (fmap f) mwt) (fmap (fmap f) mexpl)
813+-
814+-instance Functor ExportSpecList where
815+- fmap f (ExportSpecList l ess) = ExportSpecList (f l) (map (fmap f) ess)
816+-
817+-instance Functor ExportSpec where
818+- fmap f es = case es of
819+- EVar l qn -> EVar (f l) (fmap f qn)
820+- EAbs l qn -> EAbs (f l) (fmap f qn)
821+- EThingAll l qn -> EThingAll (f l) (fmap f qn)
822+- EThingWith l qn cns -> EThingWith (f l) (fmap f qn) (map (fmap f) cns)
823+- EModuleContents l mn -> EModuleContents (f l) (fmap f mn)
824+-
825+-instance Functor ImportDecl where
826+- fmap f (ImportDecl l mn qual src pkg mmn mis) =
827+- ImportDecl (f l) (fmap f mn) qual src pkg (fmap (fmap f) mmn) (fmap (fmap f) mis)
828+-
829+-instance Functor ImportSpecList where
830+- fmap f (ImportSpecList l b iss) = ImportSpecList (f l) b (map (fmap f) iss)
831+-
832+-instance Functor ImportSpec where
833+- fmap f is = case is of
834+- IVar l n -> IVar (f l) (fmap f n)
835+- IAbs l n -> IAbs (f l) (fmap f n)
836+- IThingAll l n -> IThingAll (f l) (fmap f n)
837+- IThingWith l n cns -> IThingWith (f l) (fmap f n) (map (fmap f) cns)
838+-
839+-instance Functor Assoc where
840+- fmap f (AssocNone l) = AssocNone (f l)
841+- fmap f (AssocLeft l) = AssocLeft (f l)
842+- fmap f (AssocRight l) = AssocRight (f l)
843+-
844+-instance Functor Decl where
845+- fmap f decl = case decl of
846+- TypeDecl l dh t -> TypeDecl (f l) (fmap f dh) (fmap f t)
847+- TypeFamDecl l dh mk -> TypeFamDecl (f l) (fmap f dh) (fmap (fmap f) mk)
848+- DataDecl l dn mcx dh cds ders ->
849+- DataDecl (f l) (fmap f dn) (fmap (fmap f) mcx) (fmap f dh) (map (fmap f) cds) (fmap (fmap f) ders)
850+- GDataDecl l dn mcx dh mk gds ders ->
851+- GDataDecl (f l) (fmap f dn) (fmap (fmap f) mcx) (fmap f dh) (fmap (fmap f) mk) (map (fmap f) gds) (fmap (fmap f) ders)
852+- DataFamDecl l mcx dh mk -> DataFamDecl (f l) (fmap (fmap f) mcx) (fmap f dh) (fmap (fmap f) mk)
853+- TypeInsDecl l t1 t2 -> TypeInsDecl (f l) (fmap f t1) (fmap f t2)
854+- DataInsDecl l dn t cds ders -> DataInsDecl (f l) (fmap f dn) (fmap f t) (map (fmap f) cds) (fmap (fmap f) ders)
855+- GDataInsDecl l dn t mk gds ders -> GDataInsDecl (f l) (fmap f dn) (fmap f t) (fmap (fmap f) mk) (map (fmap f) gds) (fmap (fmap f) ders)
856+- ClassDecl l mcx dh fds mcds -> ClassDecl (f l) (fmap (fmap f) mcx) (fmap f dh) (map (fmap f) fds) (fmap (map (fmap f)) mcds)
857+- InstDecl l mcx ih mids -> InstDecl (f l) (fmap (fmap f) mcx) (fmap f ih) (fmap (map (fmap f)) mids)
858+- DerivDecl l mcx ih -> DerivDecl (f l) (fmap (fmap f) mcx) (fmap f ih)
859+- InfixDecl l a k ops -> InfixDecl (f l) (fmap f a) k (map (fmap f) ops)
860+- DefaultDecl l ts -> DefaultDecl (f l) (map (fmap f) ts)
861+- SpliceDecl l sp -> SpliceDecl (f l) (fmap f sp)
862+- TypeSig l ns t -> TypeSig (f l) (map (fmap f) ns) (fmap f t)
863+- FunBind l ms -> FunBind (f l) (map (fmap f) ms)
864+- PatBind l p mt rhs bs -> PatBind (f l) (fmap f p) (fmap (fmap f) mt) (fmap f rhs) (fmap (fmap f) bs)
865+- ForImp l cc msf s n t -> ForImp (f l) (fmap f cc) (fmap (fmap f) msf) s (fmap f n) (fmap f t)
866+- ForExp l cc s n t -> ForExp (f l) (fmap f cc) s (fmap f n) (fmap f t)
867+- RulePragmaDecl l rs -> RulePragmaDecl (f l) (map (fmap f) rs)
868+- DeprPragmaDecl l nss -> DeprPragmaDecl (f l) (map (wp f) nss)
869+- WarnPragmaDecl l nss -> WarnPragmaDecl (f l) (map (wp f) nss)
870+- InlineSig l b mact qn -> InlineSig (f l) b (fmap (fmap f) mact) (fmap f qn)
871+- InlineConlikeSig l mact qn -> InlineConlikeSig (f l) (fmap (fmap f) mact) (fmap f qn)
872+- SpecInlineSig l b mact qn ts -> SpecInlineSig (f l) b (fmap (fmap f) mact) (fmap f qn) (map (fmap f) ts)
873+- SpecSig l mact qn ts -> SpecSig (f l) (fmap (fmap f) mact) (fmap f qn) (map (fmap f) ts)
874+- InstSig l mcx ih -> InstSig (f l) (fmap (fmap f) mcx) (fmap f ih)
875+- AnnPragma l ann -> AnnPragma (f l) (fmap f ann)
876+- where wp f (ns, s) = (map (fmap f) ns, s)
877+-
878+-instance Functor Annotation where
879+- fmap f (Ann l n e) = Ann (f l) (fmap f n) (fmap f e)
880+- fmap f (TypeAnn l n e) = TypeAnn (f l) (fmap f n) (fmap f e)
881+- fmap f (ModuleAnn l e) = ModuleAnn (f l) (fmap f e)
882+-
883+-instance Functor DataOrNew where
884+- fmap f (DataType l) = DataType (f l)
885+- fmap f (NewType l) = NewType (f l)
886+-
887+-instance Functor DeclHead where
888+- fmap f (DHead l n tvs) = DHead (f l) (fmap f n) (map (fmap f) tvs)
889+- fmap f (DHInfix l tva n tvb) = DHInfix (f l) (fmap f tva) (fmap f n) (fmap f tvb)
890+- fmap f (DHParen l dh) = DHParen (f l) (fmap f dh)
891+-
892+-instance Functor InstHead where
893+- fmap f (IHead l qn ts) = IHead (f l) (fmap f qn) (map (fmap f) ts)
894+- fmap f (IHInfix l ta qn tb) = IHInfix (f l) (fmap f ta) (fmap f qn) (fmap f tb)
895+- fmap f (IHParen l ih) = IHParen (f l) (fmap f ih)
896+-
897+-instance Functor Deriving where
898+- fmap f (Deriving l ihs) = Deriving (f l) (map (fmap f) ihs)
899+-
900+-instance Functor Binds where
901+- fmap f (BDecls l decls) = BDecls (f l) (map (fmap f) decls)
902+- fmap f (IPBinds l ibs) = IPBinds (f l) (map (fmap f) ibs)
903+-
904+-instance Functor IPBind where
905+- fmap f (IPBind l ipn e) = IPBind (f l) (fmap f ipn) (fmap f e)
906+-
907+-instance Functor Match where
908+- fmap f (Match l n ps rhs bs) =
909+- Match (f l) (fmap f n) (map (fmap f) ps) (fmap f rhs) (fmap (fmap f) bs)
910+- fmap f (InfixMatch l a n ps rhs bs) =
911+- InfixMatch (f l) (fmap f a) (fmap f n) (map (fmap f) ps) (fmap f rhs) (fmap (fmap f) bs)
912+-
913+-instance Functor QualConDecl where
914+- fmap f (QualConDecl l mtvs mcx cd) = QualConDecl (f l) (fmap (map (fmap f)) mtvs) (fmap (fmap f) mcx) (fmap f cd)
915+-
916+-instance Functor ConDecl where
917+- fmap f (ConDecl l n bts) = ConDecl (f l) (fmap f n) (map (fmap f) bts)
918+- fmap f (InfixConDecl l ta n tb) = InfixConDecl (f l) (fmap f ta) (fmap f n) (fmap f tb)
919+- fmap f (RecDecl l n fds) = RecDecl (f l) (fmap f n) (map (fmap f) fds)
920+-
921+-instance Functor FieldDecl where
922+- fmap f (FieldDecl l ns t) = FieldDecl (f l) (map (fmap f) ns) (fmap f t)
923+-
924+-instance Functor GadtDecl where
925+- fmap f (GadtDecl l n t) = GadtDecl (f l) (fmap f n) (fmap f t)
926+-
927+-instance Functor ClassDecl where
928+- fmap f (ClsDecl l d) = ClsDecl (f l) (fmap f d)
929+- fmap f (ClsDataFam l mcx dh mk) = ClsDataFam (f l) (fmap (fmap f) mcx) (fmap f dh) (fmap (fmap f) mk)
930+- fmap f (ClsTyFam l dh mk) = ClsTyFam (f l) (fmap f dh) (fmap (fmap f) mk)
931+- fmap f (ClsTyDef l t1 t2) = ClsTyDef (f l) (fmap f t1) (fmap f t2)
932+-
933+-instance Functor InstDecl where
934+- fmap f id = case id of
935+- InsDecl l d -> InsDecl (f l) (fmap f d)
936+- InsType l t1 t2 -> InsType (f l) (fmap f t1) (fmap f t2)
937+- InsData l dn t cds ders
938+- -> InsData (f l) (fmap f dn) (fmap f t) (map (fmap f) cds) (fmap (fmap f) ders)
939+- InsGData l dn t mk gds ders
940+- -> InsGData (f l) (fmap f dn) (fmap f t) (fmap (fmap f) mk) (map (fmap f) gds) (fmap (fmap f) ders)
941+--- InsInline l b mact qn -> InsInline (f l) b (fmap (fmap f) mact) (fmap f qn)
942+-
943+-instance Functor BangType where
944+- fmap f (BangedTy l t) = BangedTy (f l) (fmap f t)
945+- fmap f (UnBangedTy l t) = UnBangedTy (f l) (fmap f t)
946+- fmap f (UnpackedTy l t) = UnpackedTy (f l) (fmap f t)
947+-
948+-instance Functor Rhs where
949+- fmap f (UnGuardedRhs l e) = UnGuardedRhs (f l) (fmap f e)
950+- fmap f (GuardedRhss l grhss) = GuardedRhss (f l) (map (fmap f) grhss)
951+-
952+-instance Functor GuardedRhs where
953+- fmap f (GuardedRhs l ss e) = GuardedRhs (f l) (map (fmap f) ss) (fmap f e)
954+-
955+-instance Functor Type where
956+- fmap f t = case t of
957+- TyForall l mtvs mcx t -> TyForall (f l) (fmap (map (fmap f)) mtvs) (fmap (fmap f) mcx) (fmap f t)
958+- TyFun l t1 t2 -> TyFun (f l) (fmap f t1) (fmap f t2)
959+- TyTuple l b ts -> TyTuple (f l) b (map (fmap f) ts)
960+- TyList l t -> TyList (f l) (fmap f t)
961+- TyApp l t1 t2 -> TyApp (f l) (fmap f t1) (fmap f t2)
962+- TyVar l n -> TyVar (f l) (fmap f n)
963+- TyCon l qn -> TyCon (f l) (fmap f qn)
964+- TyParen l t -> TyParen (f l) (fmap f t)
965+- TyInfix l ta qn tb -> TyInfix (f l) (fmap f ta) (fmap f qn) (fmap f tb)
966+- TyKind l t k -> TyKind (f l) (fmap f t) (fmap f k)
967+- TyPromoted l p -> TyPromoted (f l) (fmap f p)
968+-
969+-instance Functor TyVarBind where
970+- fmap f (KindedVar l n k) = KindedVar (f l) (fmap f n) (fmap f k)
971+- fmap f (UnkindedVar l n) = UnkindedVar (f l) (fmap f n)
972+-
973+-instance Functor Kind where
974+- fmap f (KindStar l) = KindStar (f l)
975+- fmap f (KindBang l) = KindBang (f l)
976+- fmap f (KindFn l k1 k2) = KindFn (f l) (fmap f k1) (fmap f k2)
977+- fmap f (KindParen l k) = KindParen (f l) (fmap f k)
978+- fmap f (KindVar l n) = KindVar (f l) (fmap f n)
979+- fmap f (KindApp l k1 k2) = KindFn (f l) (fmap f k1) (fmap f k2)
980+- fmap f (KindTuple l ks) = KindTuple (f l) (map (fmap f) ks)
981+- fmap f (KindList l ks) = KindList (f l) (map (fmap f) ks)
982+-
983+-instance Functor FunDep where
984+- fmap f (FunDep l ns1 ns2) = FunDep (f l) (map (fmap f) ns1) (map (fmap f) ns2)
985+-
986+-instance Functor Context where
987+- fmap f (CxSingle l asst) = CxSingle (f l) (fmap f asst)
988+- fmap f (CxTuple l assts) = CxTuple (f l) (map (fmap f) assts)
989+- fmap f (CxParen l ctxt) = CxParen (f l) (fmap f ctxt)
990+- fmap f (CxEmpty l) = CxEmpty (f l)
991+-
992+-instance Functor Asst where
993+- fmap f asst = case asst of
994+- ClassA l qn ts -> ClassA (f l) (fmap f qn) (map (fmap f) ts)
995+- InfixA l ta qn tb -> InfixA (f l) (fmap f ta) (fmap f qn) (fmap f tb)
996+- IParam l ipn t -> IParam (f l) (fmap f ipn) (fmap f t)
997+- EqualP l t1 t2 -> EqualP (f l) (fmap f t1) (fmap f t2)
998+-
999+-instance Functor Literal where
1000+- fmap f lit = case lit of
1001+- Char l c rw -> Char (f l) c rw
1002+- String l s rw -> String (f l) s rw
1003+- Int l i rw -> Int (f l) i rw
1004+- Frac l r rw -> Frac (f l) r rw
1005+- PrimInt l i rw -> PrimInt (f l) i rw
1006+- PrimWord l i rw -> PrimWord (f l) i rw
1007+- PrimFloat l r rw -> PrimFloat (f l) r rw
1008+- PrimDouble l r rw -> PrimDouble (f l) r rw
1009+- PrimChar l c rw -> PrimChar (f l) c rw
1010+- PrimString l s rw -> PrimString (f l) s rw
1011+-
1012+-instance Functor Exp where
1013+- fmap f e = case e of
1014+- Var l qn -> Var (f l) (fmap f qn)
1015+- IPVar l ipn -> IPVar (f l) (fmap f ipn)
1016+- Con l qn -> Con (f l) (fmap f qn)
1017+- Lit l lit -> Lit (f l) (fmap f lit)
1018+- InfixApp l e1 qop e2 -> InfixApp (f l) (fmap f e1) (fmap f qop) (fmap f e2)
1019+- App l e1 e2 -> App (f l) (fmap f e1) (fmap f e2)
1020+- NegApp l e -> NegApp (f l) (fmap f e)
1021+- Lambda l ps e -> Lambda (f l) (map (fmap f) ps) (fmap f e)
1022+- Let l bs e -> Let (f l) (fmap f bs) (fmap f e)
1023+- If l ec et ee -> If (f l) (fmap f ec) (fmap f et) (fmap f ee)
1024+- Case l e alts -> Case (f l) (fmap f e) (map (fmap f) alts)
1025+- Do l ss -> Do (f l) (map (fmap f) ss)
1026+- MDo l ss -> MDo (f l) (map (fmap f) ss)
1027+- Tuple l bx es -> Tuple (f l) bx (map (fmap f) es)
1028+- TupleSection l bx mes -> TupleSection (f l) bx (map (fmap (fmap f)) mes)
1029+- List l es -> List (f l) (map (fmap f) es)
1030+- Paren l e -> Paren (f l) (fmap f e)
1031+- LeftSection l e qop -> LeftSection (f l) (fmap f e) (fmap f qop)
1032+- RightSection l qop e -> RightSection (f l) (fmap f qop) (fmap f e)
1033+- RecConstr l qn fups -> RecConstr (f l) (fmap f qn) (map (fmap f) fups)
1034+- RecUpdate l e fups -> RecUpdate (f l) (fmap f e) (map (fmap f) fups)
1035+- EnumFrom l e -> EnumFrom (f l) (fmap f e)
1036+- EnumFromTo l ef et -> EnumFromTo (f l) (fmap f ef) (fmap f et)
1037+- EnumFromThen l ef et -> EnumFromThen (f l) (fmap f ef) (fmap f et)
1038+- EnumFromThenTo l ef eth eto -> EnumFromThenTo (f l) (fmap f ef) (fmap f eth) (fmap f eto)
1039+- ListComp l e qss -> ListComp (f l) (fmap f e) (map (fmap f) qss)
1040+- ParComp l e qsss -> ParComp (f l) (fmap f e) (map (map (fmap f)) qsss)
1041+- ExpTypeSig l e t -> ExpTypeSig (f l) (fmap f e) (fmap f t)
1042+- VarQuote l qn -> VarQuote (f l) (fmap f qn)
1043+- TypQuote l qn -> TypQuote (f l) (fmap f qn)
1044+- BracketExp l br -> BracketExp (f l) (fmap f br)
1045+- SpliceExp l sp -> SpliceExp (f l) (fmap f sp)
1046+- QuasiQuote l sn se -> QuasiQuote (f l) sn se
1047+-
1048+- XTag l xn xas me es -> XTag (f l) (fmap f xn) (map (fmap f) xas) (fmap (fmap f) me) (map (fmap f) es)
1049+- XETag l xn xas me -> XETag (f l) (fmap f xn) (map (fmap f) xas) (fmap (fmap f) me)
1050+- XPcdata l s -> XPcdata (f l) s
1051+- XExpTag l e -> XExpTag (f l) (fmap f e)
1052+- XChildTag l es -> XChildTag (f l) (map (fmap f) es)
1053+-
1054+- CorePragma l s e -> CorePragma (f l) s (fmap f e)
1055+- SCCPragma l s e -> SCCPragma (f l) s (fmap f e)
1056+- GenPragma l s n12 n34 e -> GenPragma (f l) s n12 n34 (fmap f e)
1057+-
1058+- Proc l p e -> Proc (f l) (fmap f p) (fmap f e)
1059+- LeftArrApp l e1 e2 -> LeftArrApp (f l) (fmap f e1) (fmap f e2)
1060+- RightArrApp l e1 e2 -> RightArrApp (f l) (fmap f e1) (fmap f e2)
1061+- LeftArrHighApp l e1 e2 -> LeftArrHighApp (f l) (fmap f e1) (fmap f e2)
1062+- RightArrHighApp l e1 e2 -> RightArrHighApp (f l) (fmap f e1) (fmap f e2)
1063+-
1064+- LCase l alts -> LCase (f l) (map (fmap f) alts)
1065+-
1066+-instance Functor XName where
1067+- fmap f (XName l s) = XName (f l) s
1068+- fmap f (XDomName l sd sn) = XDomName (f l) sd sn
1069+-
1070+-instance Functor XAttr where
1071+- fmap f (XAttr l xn e) = XAttr (f l) (fmap f xn) (fmap f e)
1072+-
1073+-instance Functor Bracket where
1074+- fmap f (ExpBracket l e) = ExpBracket (f l) (fmap f e)
1075+- fmap f (PatBracket l p) = PatBracket (f l) (fmap f p)
1076+- fmap f (TypeBracket l t) = TypeBracket (f l) (fmap f t)
1077+- fmap f (DeclBracket l ds) = DeclBracket (f l) (map (fmap f) ds)
1078+-
1079+-instance Functor Splice where
1080+- fmap f (IdSplice l s) = IdSplice (f l) s
1081+- fmap f (ParenSplice l e) = ParenSplice (f l) (fmap f e)
1082+-
1083+-instance Functor Safety where
1084+- fmap f (PlayRisky l) = PlayRisky (f l)
1085+- fmap f (PlaySafe l b) = PlaySafe (f l) b
1086+- fmap f (PlayInterruptible l) = PlayInterruptible (f l)
1087+-
1088+-instance Functor CallConv where
1089+- fmap f (StdCall l) = StdCall (f l)
1090+- fmap f (CCall l) = CCall (f l)
1091+- fmap f (CPlusPlus l) = CPlusPlus (f l)
1092+- fmap f (DotNet l) = DotNet (f l)
1093+- fmap f (Jvm l) = Jvm (f l)
1094+- fmap f (Js l) = Js (f l)
1095+- fmap f (CApi l) = CApi (f l)
1096+-
1097+-instance Functor ModulePragma where
1098+- fmap f (LanguagePragma l ns) = LanguagePragma (f l) (map (fmap f) ns)
1099+- fmap f (OptionsPragma l mt s) = OptionsPragma (f l) mt s
1100+- fmap f (AnnModulePragma l ann) = AnnModulePragma (f l) (fmap f ann)
1101+-
1102+-instance Functor Activation where
1103+- fmap f (ActiveFrom l k) = ActiveFrom (f l) k
1104+- fmap f (ActiveUntil l k) = ActiveUntil (f l) k
1105+-
1106+-instance Functor Rule where
1107+- fmap f (Rule l s mact mrvs e1 e2) =
1108+- Rule (f l) s (fmap (fmap f) mact) (fmap (map (fmap f)) mrvs) (fmap f e1) (fmap f e2)
1109+-
1110+-instance Functor RuleVar where
1111+- fmap f (RuleVar l n) = RuleVar (f l) (fmap f n)
1112+- fmap f (TypedRuleVar l n t) = TypedRuleVar (f l) (fmap f n) (fmap f t)
1113+-
1114+-instance Functor WarningText where
1115+- fmap f (DeprText l s) = DeprText (f l) s
1116+- fmap f (WarnText l s) = WarnText (f l) s
1117+-
1118+-instance Functor Pat where
1119+- fmap f p = case p of
1120+- PVar l n -> PVar (f l) (fmap f n)
1121+- PLit l lit -> PLit (f l) (fmap f lit)
1122+- PNeg l p -> PNeg (f l) (fmap f p)
1123+- PNPlusK l n k -> PNPlusK (f l) (fmap f n) k
1124+- PInfixApp l pa qn pb -> PInfixApp (f l) (fmap f pa) (fmap f qn) (fmap f pb)
1125+- PApp l qn ps -> PApp (f l) (fmap f qn) (map (fmap f) ps)
1126+- PTuple l bx ps -> PTuple (f l) bx (map (fmap f) ps)
1127+- PList l ps -> PList (f l) (map (fmap f) ps)
1128+- PParen l p -> PParen (f l) (fmap f p)
1129+- PRec l qn pfs -> PRec (f l) (fmap f qn) (map (fmap f) pfs)
1130+- PAsPat l n p -> PAsPat (f l) (fmap f n) (fmap f p)
1131+- PWildCard l -> PWildCard (f l)
1132+- PIrrPat l p -> PIrrPat (f l) (fmap f p)
1133+- PatTypeSig l p t -> PatTypeSig (f l) (fmap f p) (fmap f t)
1134+- PViewPat l e p -> PViewPat (f l) (fmap f e) (fmap f p)
1135+- PRPat l rps -> PRPat (f l) (map (fmap f) rps)
1136+- PXTag l xn pxas mp ps -> PXTag (f l) (fmap f xn) (map (fmap f) pxas) (fmap (fmap f) mp) (map (fmap f) ps)
1137+- PXETag l xn pxas mp -> PXETag (f l) (fmap f xn) (map (fmap f) pxas) (fmap (fmap f) mp)
1138+- PXPcdata l s -> PXPcdata (f l) s
1139+- PXPatTag l p -> PXPatTag (f l) (fmap f p)
1140+- PXRPats l rps -> PXRPats (f l) (map (fmap f) rps)
1141+- PQuasiQuote l sn st -> PQuasiQuote (f l) sn st
1142+- PBangPat l p -> PBangPat (f l) (fmap f p)
1143+-
1144+-instance Functor PXAttr where
1145+- fmap f (PXAttr l xn p) = PXAttr (f l) (fmap f xn) (fmap f p)
1146+-
1147+-instance Functor RPatOp where
1148+- fmap f (RPStar l) = RPStar (f l)
1149+- fmap f (RPStarG l) = RPStarG (f l)
1150+- fmap f (RPPlus l) = RPPlus (f l)
1151+- fmap f (RPPlusG l) = RPPlusG (f l)
1152+- fmap f (RPOpt l) = RPOpt (f l)
1153+- fmap f (RPOptG l) = RPOptG (f l)
1154+-
1155+-instance Functor RPat where
1156+- fmap f rp = case rp of
1157+- RPOp l rp rop -> RPOp (f l) (fmap f rp) (fmap f rop)
1158+- RPEither l rp1 rp2 -> RPEither (f l) (fmap f rp1) (fmap f rp2)
1159+- RPSeq l rps -> RPSeq (f l) (map (fmap f) rps)
1160+- RPGuard l p ss -> RPGuard (f l) (fmap f p) (map (fmap f) ss)
1161+- RPCAs l n rp -> RPCAs (f l) (fmap f n) (fmap f rp)
1162+- RPAs l n rp -> RPAs (f l) (fmap f n) (fmap f rp)
1163+- RPParen l rp -> RPParen (f l) (fmap f rp)
1164+- RPPat l p -> RPPat (f l) (fmap f p)
1165+-
1166+-instance Functor PatField where
1167+- fmap f (PFieldPat l qn p) = PFieldPat (f l) (fmap f qn) (fmap f p)
1168+- fmap f (PFieldPun l n) = PFieldPun (f l) (fmap f n)
1169+- fmap f (PFieldWildcard l) = PFieldWildcard (f l)
1170+-
1171+-instance Functor Stmt where
1172+- fmap f (Generator l p e) = Generator (f l) (fmap f p) (fmap f e)
1173+- fmap f (Qualifier l e) = Qualifier (f l) (fmap f e)
1174+- fmap f (LetStmt l bs) = LetStmt (f l) (fmap f bs)
1175+- fmap f (RecStmt l ss) = RecStmt (f l) (map (fmap f) ss)
1176+-
1177+-instance Functor QualStmt where
1178+- fmap f (QualStmt l s) = QualStmt (f l) (fmap f s)
1179+- fmap f (ThenTrans l e) = ThenTrans (f l) (fmap f e)
1180+- fmap f (ThenBy l e1 e2) = ThenBy (f l) (fmap f e1) (fmap f e2)
1181+- fmap f (GroupBy l e) = GroupBy (f l) (fmap f e)
1182+- fmap f (GroupUsing l e) = GroupUsing (f l) (fmap f e)
1183+- fmap f (GroupByUsing l e1 e2) = GroupByUsing (f l) (fmap f e1) (fmap f e2)
1184+-
1185+-instance Functor FieldUpdate where
1186+- fmap f (FieldUpdate l qn e) = FieldUpdate (f l) (fmap f qn) (fmap f e)
1187+- fmap f (FieldPun l n) = FieldPun (f l) (fmap f n)
1188+- fmap f (FieldWildcard l) = FieldWildcard (f l)
1189+-
1190+-instance Functor Alt where
1191+- fmap f (Alt l p gs bs) = Alt (f l) (fmap f p) (fmap f gs) (fmap (fmap f) bs)
1192+-
1193+-instance Functor GuardedAlts where
1194+- fmap f (UnGuardedAlt l e) = UnGuardedAlt (f l) (fmap f e)
1195+- fmap f (GuardedAlts l galts) = GuardedAlts (f l) (map (fmap f) galts)
1196+-
1197+-instance Functor GuardedAlt where
1198+- fmap f (GuardedAlt l ss e) = GuardedAlt (f l) (map (fmap f) ss) (fmap f e)
1199+-
1200+-instance Functor Promoted where
1201+- fmap f (PromotedInteger l int raw) = PromotedInteger (f l) int raw
1202+- fmap f (PromotedString l str raw) = PromotedString (f l) str raw
1203+- fmap f (PromotedCon l b qn) = PromotedCon (f l) b (fmap f qn)
1204+- fmap f (PromotedList l b ps) = PromotedList (f l) b (map (fmap f) ps)
1205+- fmap f (PromotedTuple l ps) = PromotedTuple (f l) (map (fmap f) ps)
1206+- fmap f (PromotedUnit l) = PromotedUnit (f l)
1207+-
1208+-instance Functor IfAlt where
1209+- fmap f (IfAlt l e1 e2) = IfAlt (f l) (fmap f e1) (fmap f e2)
1210+-
1211+ -----------------------------------------------------------------------------
1212+ -- Reading annotations
1213+
1214+@@ -1825,6 +1377,7 @@
1215+ RightArrHighApp l e1 e2 -> RightArrHighApp (f l) e1 e2
1216+
1217+ LCase l alts -> LCase (f l) alts
1218++ MultiIf l alts -> MultiIf (f l) alts
1219+
1220+
1221+ instance Annotated XName where
1222+diff -ru orig/src/Language/Haskell/Exts/Annotated.hs new/src/Language/Haskell/Exts/Annotated.hs
1223+--- orig/src/Language/Haskell/Exts/Annotated.hs 2014-04-17 07:02:06.927109238 +0300
1224++++ new/src/Language/Haskell/Exts/Annotated.hs 2014-04-17 07:02:00.000000000 +0300
1225+@@ -127,6 +127,7 @@
1226+ case classifyLanguage e of
1227+ UnknownLanguage _ -> Right $ classifyExtension e
1228+ lang -> Left lang
1229++ readExt Symbol {} = error "readExt: Symbol"
1230+
1231+ extractLang = extractLang' Nothing []
1232+
1233+diff -ru orig/src/Language/Haskell/Exts/ParseSyntax.hs new/src/Language/Haskell/Exts/ParseSyntax.hs
1234+--- orig/src/Language/Haskell/Exts/ParseSyntax.hs 2014-04-17 07:02:06.927109238 +0300
1235++++ new/src/Language/Haskell/Exts/ParseSyntax.hs 2014-04-17 07:02:00.000000000 +0300
1236+@@ -1,3 +1,4 @@
1237++{-# LANGUAGE DeriveFunctor #-}
1238+ {-# OPTIONS_HADDOCK hide #-}
1239+ module Language.Haskell.Exts.ParseSyntax where
1240+
1241+@@ -96,13 +97,13 @@
1242+
1243+ -- LambdaCase
1244+ | LCase l [Alt l] -- ^ @\case@ /alts/
1245+- deriving (Eq,Show)
1246++ deriving (Eq,Show,Functor)
1247+
1248+ data PFieldUpdate l
1249+ = FieldUpdate l (QName l) (PExp l)
1250+ | FieldPun l (Name l)
1251+ | FieldWildcard l
1252+- deriving (Eq,Show)
1253++ deriving (Eq,Show,Functor)
1254+
1255+ data ParseXAttr l = XAttr l (XName l) (PExp l)
1256+ deriving (Eq,Show)
1257+@@ -170,6 +171,7 @@
1258+ RightArrHighApp l e1 e2 -> l
1259+
1260+ LCase l alts -> l
1261++ MultiIf l alts -> l
1262+
1263+ amap f e = case e of
1264+ Var l qn -> Var (f l) qn
1265+@@ -233,76 +235,7 @@
1266+ RightArrHighApp l e1 e2 -> RightArrHighApp (f l) e1 e2
1267+
1268+ LCase l alts -> LCase (f l) alts
1269+-
1270+-instance Functor PExp where
1271+- fmap f e = case e of
1272+- Var l qn -> Var (f l) (fmap f qn)
1273+- IPVar l ipn -> IPVar (f l) (fmap f ipn)
1274+- Con l qn -> Con (f l) (fmap f qn)
1275+- Lit l lit -> Lit (f l) (fmap f lit)
1276+- InfixApp l e1 qop e2 -> InfixApp (f l) (fmap f e1) (fmap f qop) (fmap f e2)
1277+- App l e1 e2 -> App (f l) (fmap f e1) (fmap f e2)
1278+- NegApp l e -> NegApp (f l) (fmap f e)
1279+- Lambda l ps e -> Lambda (f l) (map (fmap f) ps) (fmap f e)
1280+- Let l bs e -> Let (f l) (fmap f bs) (fmap f e)
1281+- If l ec et ee -> If (f l) (fmap f ec) (fmap f et) (fmap f ee)
1282+- Case l e alts -> Case (f l) (fmap f e) (map (fmap f) alts)
1283+- Do l ss -> Do (f l) (map (fmap f) ss)
1284+- MDo l ss -> MDo (f l) (map (fmap f) ss)
1285+- TupleSection l bx mes -> TupleSection (f l) bx (map (fmap (fmap f)) mes)
1286+- List l es -> List (f l) (map (fmap f) es)
1287+- Paren l e -> Paren (f l) (fmap f e)
1288+- RecConstr l qn fups -> RecConstr (f l) (fmap f qn) (map (fmap f) fups)
1289+- RecUpdate l e fups -> RecUpdate (f l) (fmap f e) (map (fmap f) fups)
1290+- EnumFrom l e -> EnumFrom (f l) (fmap f e)
1291+- EnumFromTo l ef et -> EnumFromTo (f l) (fmap f ef) (fmap f et)
1292+- EnumFromThen l ef et -> EnumFromThen (f l) (fmap f ef) (fmap f et)
1293+- EnumFromThenTo l ef eth eto -> EnumFromThenTo (f l) (fmap f ef) (fmap f eth) (fmap f eto)
1294+- ParComp l e qsss -> ParComp (f l) (fmap f e) (map (map (fmap f)) qsss)
1295+- ExpTypeSig l e t -> ExpTypeSig (f l) (fmap f e) (fmap f t)
1296+-
1297+- AsPat l n e -> AsPat (f l) (fmap f n) (fmap f e)
1298+- WildCard l -> WildCard (f l)
1299+- IrrPat l e -> IrrPat (f l) (fmap f e)
1300+- PostOp l e op -> PostOp (f l) (fmap f e) (fmap f op)
1301+- PreOp l op e -> PreOp (f l) (fmap f op) (fmap f e)
1302+- ViewPat l e1 e2 -> ViewPat (f l) (fmap f e1) (fmap f e2)
1303+- SeqRP l es -> SeqRP (f l) (map (fmap f) es)
1304+- GuardRP l e ss -> GuardRP (f l) (fmap f e) (map (fmap f) ss)
1305+- EitherRP l e1 e2 -> EitherRP (f l) (fmap f e1) (fmap f e2)
1306+- CAsRP l n e -> CAsRP (f l) (fmap f n) (fmap f e)
1307+- BangPat l e -> BangPat (f l) (fmap f e)
1308+-
1309+- VarQuote l qn -> VarQuote (f l) (fmap f qn)
1310+- TypQuote l qn -> TypQuote (f l) (fmap f qn)
1311+- BracketExp l br -> BracketExp (f l) (fmap f br)
1312+- SpliceExp l sp -> SpliceExp (f l) (fmap f sp)
1313+- QuasiQuote l sn se -> QuasiQuote (f l) sn se
1314+-
1315+- XTag l xn xas me es -> XTag (f l) (fmap f xn) (map (fmap f) xas) (fmap (fmap f) me) (map (fmap f) es)
1316+- XETag l xn xas me -> XETag (f l) (fmap f xn) (map (fmap f) xas) (fmap (fmap f) me)
1317+- XPcdata l s -> XPcdata (f l) s
1318+- XExpTag l e -> XExpTag (f l) (fmap f e)
1319+- XChildTag l es -> XChildTag (f l) (map (fmap f) es)
1320+- XRPats l es -> XRPats (f l) (map (fmap f) es)
1321+-
1322+- CorePragma l s e -> CorePragma (f l) s (fmap f e)
1323+- SCCPragma l s e -> SCCPragma (f l) s (fmap f e)
1324+- GenPragma l s n12 n34 e -> GenPragma (f l) s n12 n34 (fmap f e)
1325+-
1326+- Proc l p e -> Proc (f l) (fmap f p) (fmap f e)
1327+- LeftArrApp l e1 e2 -> LeftArrApp (f l) (fmap f e1) (fmap f e2)
1328+- RightArrApp l e1 e2 -> RightArrApp (f l) (fmap f e1) (fmap f e2)
1329+- LeftArrHighApp l e1 e2 -> LeftArrHighApp (f l) (fmap f e1) (fmap f e2)
1330+- RightArrHighApp l e1 e2 -> RightArrHighApp (f l) (fmap f e1) (fmap f e2)
1331+-
1332+- LCase l alts -> LCase (f l) (map (fmap f) alts)
1333+-
1334+-
1335+-instance Functor PFieldUpdate where
1336+- fmap f (FieldUpdate l qn e) = FieldUpdate (f l) (fmap f qn) (fmap f e)
1337+- fmap f (FieldPun l n) = FieldPun (f l) (fmap f n)
1338+- fmap f (FieldWildcard l) = FieldWildcard (f l)
1339++ MultiIf l alts -> MultiIf (f l) alts
1340+
1341+ instance Annotated PFieldUpdate where
1342+ ann (FieldUpdate l qn e) = l
1343+diff -ru orig/src/Language/Haskell/Exts/Pretty.hs new/src/Language/Haskell/Exts/Pretty.hs
1344+--- orig/src/Language/Haskell/Exts/Pretty.hs 2014-04-17 07:02:06.927109238 +0300
1345++++ new/src/Language/Haskell/Exts/Pretty.hs 2014-04-17 07:02:00.000000000 +0300
1346+@@ -716,7 +716,23 @@
1347+ -- prettyPrec _ (TyPred asst) = pretty asst
1348+ prettyPrec _ (TyInfix a op b) = myFsep [pretty a, ppQNameInfix op, pretty b]
1349+ prettyPrec _ (TyKind t k) = parens (myFsep [pretty t, text "::", pretty k])
1350++ prettyPrec _ (TyPromoted p) = pretty p
1351+
1352++instance Pretty Promoted where
1353++ pretty p =
1354++ case p of
1355++ PromotedInteger n -> integer n
1356++ PromotedString s -> doubleQuotes $ text s
1357++ PromotedCon hasQuote qn ->
1358++ addQuote hasQuote $ pretty qn
1359++ PromotedList hasQuote list ->
1360++ addQuote hasQuote $ bracketList . punctuate comma . map pretty $ list
1361++ PromotedTuple list ->
1362++ addQuote True $ parenList $ map pretty list
1363++ PromotedUnit -> addQuote True $ text "()"
1364++ where
1365++ addQuote True doc = char '\'' <> doc
1366++ addQuote False doc = doc
1367+
1368+ instance Pretty TyVarBind where
1369+ pretty (KindedVar var kind) = parens $ myFsep [pretty var, text "::", pretty kind]
1370+@@ -1689,3 +1705,4 @@
1371+ prettyPrec _ (P.TyPred _ asst) = pretty asst
1372+ prettyPrec _ (P.TyInfix _ a op b) = myFsep [pretty a, ppQNameInfix (sQName op), pretty b]
1373+ prettyPrec _ (P.TyKind _ t k) = parens (myFsep [pretty t, text "::", pretty k])
1374++ prettyPrec _ (P.TyPromoted _ p) = pretty $ sPromoted p
1375+diff -ru orig/src/Language/Haskell/Exts.hs new/src/Language/Haskell/Exts.hs
1376+--- orig/src/Language/Haskell/Exts.hs 2014-04-17 07:02:06.847107375 +0300
1377++++ new/src/Language/Haskell/Exts.hs 2014-04-17 07:02:00.000000000 +0300
1378+@@ -125,6 +125,7 @@
1379+ case classifyLanguage e of
1380+ UnknownLanguage _ -> Right $ classifyExtension e
1381+ lang -> Left lang
1382++ readExt Symbol {} = error "readExt: Symbol"
1383+
1384+ extractLang = extractLang' Nothing []
1385+
1386+@@ -141,4 +142,4 @@
1387+ f x = x
1388+
1389+ delit :: String -> String -> String
1390+-delit fn = if ".lhs" `isSuffixOf` fn then unlit fn else id
1391+\ No newline at end of file
1392++delit fn = if ".lhs" `isSuffixOf` fn then unlit fn else id
1393+Only in new/Test/examples: IndentedTopLevelWhere.hs
1394+Only in new/Test/examples: QuasiQuoteToplevel.hs
1395+Only in orig/Test/examples: RCategory.lhs
1396+Only in orig/Test/examples: RealGHC.lhs
1397+Only in new/Test/examples: RecordPuns.hs
1398+Only in new/Test: UnitTests.hs