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