Ticket #3290: ParseResult_instances.patch

File ParseResult_instances.patch, 33.8 KB (added by YitzGale, 6 years ago)

Add Functor, Applicative, Monad, and Monoid instances for ParseResult in haskell-src.

Line 
1Thu Jun 11 00:35:27 IDT 2009  Yitzchak Gale <[email protected]>
2  * Add Functor, Applicative, Monad, and Monoid instances for ParseResult.
3
4New patches:
5
6[Add Functor, Applicative, Monad, and Monoid instances for ParseResult.
7Yitzchak Gale <[email protected]>**20090610213527
8 Ignore-this: ab9acc4dab5b3fbf57043cdf1ae91e4f
9] {
10hunk ./Language/Haskell/ParseMonad.hs 29
11        ) where
12 
13 import Language.Haskell.Syntax(SrcLoc(..))
14+import Control.Applicative
15+import Data.Monoid
16 
17 -- | The result of a parse.
18 data ParseResult a
19hunk ./Language/Haskell/ParseMonad.hs 40
20                                -- source location, with an error message.
21        deriving Show
22 
23+instance Functor ParseResult where
24+  fmap f (ParseOk x)           = ParseOk $ f x
25+  fmap f (ParseFailed loc msg) = ParseFailed loc msg
26+
27+instance Applicative ParseResult where
28+  pure = ParseOk
29+  ParseOk f           <*> x = f <$> x
30+  ParseFailed loc msg <*> _ = ParseFailed loc msg
31+
32+instance Monad ParseResult where
33+  return = ParseOk
34+  ParseOk x           >>= f = f x
35+  ParseFailed loc msg >>= _ = ParseFailed loc msg
36+
37+instance Monoid m => Monoid (ParseResult m) where
38+  mempty = ParseOk mempty
39+  ParseOk x `mappend` ParseOk y = ParseOk $ x `mappend` y
40+  ParseOk _ `mappend` err       = err
41+  err       `mappend` _         = err -- left-biased
42+
43 -- internal version
44 data ParseStatus a = Ok ParseState a | Failed SrcLoc String
45        deriving Show
46}
47
48Context:
49
50[TAG 1.0.1.3
51Don Stewart <[email protected]>**20081011213948]
52[Bump to 1.0.1.3
53Don Stewart <[email protected]>**20081011213940]
54[TAG 6.10 branch has been forked
55Ian Lynagh <[email protected]>**20080919123439]
56[restrict to base-3 to get it compiling with GHC 6.10
57Simon Marlow <[email protected]>**20080902094126]
58[Fix Lexer so that we can parse Unicode symbols in operators
59Andrea Vezzosi <[email protected]>**20080727042022]
60[TAG GHC 6.8.3 release
61Ian Lynagh <[email protected]>**20080619124351]
62[TAG 2008-06-06
63Ian Lynagh <[email protected]>**20080605235624]
64[TAG 1.0.1.2 release
65Ian Lynagh <[email protected]>**20080604122927]
66[Bump version number to 1.0.1.2
67Ian Lynagh <[email protected]>**20080604120906]
68[fix a typo spotted by Oren Ben-Kiki <[email protected]>
69Simon Marlow <[email protected]>**20080528141703
70 
71 -      checkChar n | n <= 0x01FFFF = return (chr (fromInteger n))
72 +      checkChar n | n <= 0x10FFFF = return (chr (fromInteger n))
73]
74[Small documentation fix
75Roel van Dijk <[email protected]>**20080206005829]
76[TAG GHC 6.8.1 release
77Ian Lynagh <[email protected]>**20071110011105]
78[TAG 1.0.1.1 release
79Ian Lynagh <[email protected]>**20071110010955]
80[Bump version number
81Ian Lynagh <[email protected]>**20071027124835]
82[Use configurations to allow building with ghc-6.4, 6.6, 6.8
83Duncan Coutts <[email protected]>**20071018173459
84 Specify build-type: Simple
85]
86[Add dep on array
87Ian Lynagh <[email protected]>**20070805200257]
88[--configure-option and --ghc-option are now provided by Cabal
89Ross Paterson <[email protected]>**20070604115935]
90[add nhc98-options: field to .cabal file
91[email protected]**20070528123209]
92[old nhc98 Makefiles now obsolete
93[email protected]**20070525134608]
94[haskell-src package acquires a dependency on pretty
95[email protected]**20070524164331]
96[remove Makefile.inc (only affects nhc98)
97[email protected]**20070320120645]
98[Remove Makefile and package.conf.in (used in the old GHC build system)
99Ian Lynagh <[email protected]>**20070524145747]
100[TAG GHC 6.6.1 release
101Ian Lynagh <[email protected]>**20070428195851]
102[TAG 1.0.1 release
103Ian Lynagh <[email protected]>**20070428195728]
104[TAG GHC 6.6.1 release
105Ian Lynagh <[email protected]>**20070424113929]
106[TAG Version 1.0.1
107Ian Lynagh <[email protected]>**20070424113849]
108[Bump version to 1.0.1
109Ian Lynagh <[email protected]>**20070422195207]
110[Follow Cabal changes in Setup.*hs
111Ian Lynagh <[email protected]>**20070418121335]
112[Fix -Wall warnings
113Ian Lynagh <[email protected]>**20070411012231]
114[Make Setup.hs suitable for building in a GHC tree
115Ian Lynagh <[email protected]>**20070407174138]
116[another attempt at function bindings (#1252)
117Ross Paterson <[email protected]>**20070329132248]
118[fix pretty printing of function bindings (fixes #1252)
119Ross Paterson <[email protected]>**20070328224529]
120[Bump nhc98 stack size for Language/Haskell/Parser.hs
121[email protected]**20070301153114]
122[Stop prettyprint case alternatives getting pushed too far to the right
123Ian Lynagh <[email protected]>**20070217210145
124 Patch from [email protected] in trac #1143.
125]
126[support foreign declarations
127Ross Paterson <[email protected]>**20061109124611]
128[Move ParseUtils into exposed-modules, in haskell-src
129Don Stewart <[email protected]>**20060912130421
130 
131 The haskell-src package.conf.in and .cabal file were out of sync.  In
132 the .cabal file Language.Haskell.ParseUtils was hidden, while it was
133 exposed in the package.conf file.
134 
135 This patch exposes ParseUtils in the .cabal file too - fixing programs
136 that use ParseUtils on systems (like gentoo) where the libraries are
137 built the cabal way.
138 
139 Thanks to dcoutts for clarifying, and gour and kolmodin on #haskell for
140 pestering.
141 
142]
143[add boilerplate Setup.hs
144Ross Paterson <[email protected]>**20060928231443]
145[note CPP extension
146Ross Paterson <[email protected]>**20060908233707]
147[TAG Initial conversion from CVS complete
148John Goerzen <[email protected]>**20060112154131]
149[[project @ 2005-12-23 09:15:03 by ross]
150ross**20051223091503
151 trim import
152]
153[TAG arity-anal-branch-point
154Unknown tagger**20060111184530]
155[TAG ghc-assoc-branch-point
156Unknown tagger**20060111184530]
157[TAG cmm-merge2
158Unknown tagger**20060111184530]
159[[project @ 2005-03-23 14:34:20 by ross]
160ross**20050323143420
161 add license files for individual packages
162]
163[[project @ 2005-03-14 22:42:23 by ross]
164ross**20050314224223
165 spell out the import of Data.Char to avoid clashes with new names
166]
167[TAG nhc98-1-18-release
168Unknown tagger**20060111184527]
169[[project @ 2005-02-18 15:06:45 by simonmar]
170simonmar**20050218150645
171 Rename fields in InstalledPackageInfo for consistency with
172 PackageDescription & buildInfo:
173 
174  extra-libs (extraLibraries) --> extra-libraries (extraLibraries)
175  extra-cc-opts (extraCcOpts) --> cc-options (ccOptions)
176  extra-ld-opts (extraLdOpts) --> ld-options (ldOptions)
177  extra-hugs-opts (extraHugsOpts) --> hugs-options (hugsOptions)
178  extra-frameworks (extraFrameworks) --> frameworks (frameworks)
179]
180[[project @ 2005-02-13 10:53:14 by malcolm]
181malcolm**20050213105314
182 Eliminate more explicit dependencies in Makefiles: use hmake to
183 create the bootstrapping .hc files, as well as the ordinary .o files.
184]
185[[project @ 2005-02-11 01:55:56 by ross]
186ross**20050211015556
187 track syntax changes:
188 
189 * add License-File and Synopsis fields
190 
191 * rename Hidden-Fields as Other-Fields
192 
193 These files are used only by Hugs, but are also useful as examples.
194]
195[TAG ghc-6-4-branch-point
196Unknown tagger**20060111184524]
197[[project @ 2005-02-02 10:59:16 by malcolm]
198malcolm**20050202105916
199 Build all package sources using hmake.  The inaccurate and ever-changing
200 Makefile dependencies can now all be thrown away, hurrah!
201]
202[[project @ 2005-01-20 14:22:27 by simonmar]
203simonmar**20050120142227
204 Fill in the haddock-interfaces and haddock-html fields in the
205 package.conf files.
206 
207 To do this I had to make some changes:
208 
209   - haddock-interfaces requires the value of $(datadir).  We can't
210     just plug this in, because $(datadir) might change at install-time
211     (eg. a Windows installer can be placed anywhere, as can a Unix
212     binary .tar.gz distribution).  The current trick is for the
213     compiler to splice in the value of $libdir in package.conf at
214     runtime.  So we could extend this mechanism and tell the compiler
215     the value of $datadir via a command-line option, but that seems
216     ugly.
217 
218     On Windows, $datadir==$libdir, so we don't need any changes:
219     package.conf still uses $libdir, and a Windows installation is
220     independent of its absolute location.  Even 'make install' on
221     Windows should have this property.
222 
223     On Unix:
224        - for 'make install' and in-place execution, we just use
225           absolute paths in package.conf
226 
227        - for a binary dist, we generate a package.conf that refers
228          to $libdir and $datadir, and splice in the values at
229          install-time (distrib/Makefile-bin.in).
230 
231   - Also, I renamed $libdir to $topdir to more closely reflect its
232     actual meaning.  This is somewhat malicious in that it will flush
233     out all those clients using $libdir when they really shouldn't
234     be :-)
235]
236[[project @ 2005-01-13 00:06:25 by ross]
237ross**20050113000625
238 Setup.description -> <package>.cabal
239]
240[[project @ 2005-01-11 16:04:30 by simonmar]
241simonmar**20050111160430
242 Use OPTIONS_GHC instead of OPTIONS
243]
244[[project @ 2005-01-06 13:50:32 by ross]
245ross**20050106135032
246 doc tweak
247]
248[[project @ 2005-01-05 18:02:19 by ross]
249ross**20050105180219
250 localize compiler options
251]
252[[project @ 2005-01-05 17:45:47 by ross]
253ross**20050105174547
254 add package description
255]
256[[project @ 2005-01-04 17:18:59 by ross]
257ross**20050104171859
258 treat special variables as ordinary when qualified (e.g. M.as)
259]
260[TAG pluggable-1-branch-point
261Unknown tagger**20060111184513]
262[[project @ 2004-11-26 16:22:10 by simonmar]
263simonmar**20041126162210
264 Further integration with the new package story.  GHC now supports
265 pretty much everything in the package proposal.
266 
267   - GHC now works in terms of PackageIds (<pkg>-<version>) rather than
268     just package names.  You can still specify package names without
269     versions on the command line, as long as the name is unambiguous.
270 
271   - GHC understands hidden/exposed modules in a package, and will refuse
272     to import a hidden module.  Also, the hidden/eposed status of packages
273     is taken into account.
274 
275   - I had to remove the old package syntax from ghc-pkg, backwards
276     compatibility isn't really practical.
277 
278   - All the package.conf.in files have been rewritten in the new syntax,
279     and contain a complete list of modules in the package.  I've set all
280     the versions to 1.0 for now - please check your package(s) and fix the
281     version number & other info appropriately.
282 
283   - New options:
284 
285        -hide-package P    sets the expose flag on package P to False
286        -ignore-package P  unregisters P for this compilation
287 
288        For comparison, -package P sets the expose flag on package P
289         to True, and also causes P to be linked in eagerly.
290 
291         -package-name is no longer officially supported.  Unofficially, it's
292        a synonym for -ignore-package, which has more or less the same effect
293        as -package-name used to.
294 
295        Note that a package may be hidden and yet still be linked into
296        the program, by virtue of being a dependency of some other package.
297        To completely remove a package from the compiler's internal database,
298         use -ignore-package.
299 
300        The compiler will complain if any two packages in the
301         transitive closure of exposed packages contain the same
302         module.
303 
304        You *must* use -ignore-package P when compiling modules for
305         package P, if package P (or an older version of P) is already
306         registered.  The compiler will helpfully complain if you don't.
307        The fptools build system does this.
308 
309    - Note: the Cabal library won't work yet.  It still thinks GHC uses
310      the old package config syntax.
311 
312 Internal changes/cleanups:
313 
314    - The ModuleName type has gone away.  Modules are now just (a
315      newtype of) FastStrings, and don't contain any package information.
316      All the package-related knowledge is in DynFlags, which is passed
317      down to where it is needed.
318 
319    - DynFlags manipulation has been cleaned up somewhat: there are no
320      global variables holding DynFlags any more, instead the DynFlags
321      are passed around properly.
322 
323    - There are a few less global variables in GHC.  Lots more are
324      scheduled for removal.
325 
326    - -i is now a dynamic flag, as are all the package-related flags (but
327      using them in {-# OPTIONS #-} is Officially Not Recommended).
328 
329    - make -j now appears to work under fptools/libraries/.  Probably
330      wouldn't take much to get it working for a whole build.
331]
332[[project @ 2004-09-08 15:13:20 by ross]
333ross**20040908151320
334 remove unneeded #includes of ghcconfig.h
335]
336[[project @ 2004-08-31 09:02:26 by ross]
337ross**20040831090226
338 document limitations
339]
340[[project @ 2004-08-31 09:02:02 by ross]
341ross**20040831090202
342 minor non-functional cleanup of type printing
343]
344[[project @ 2004-08-13 13:29:08 by simonmar]
345simonmar**20040813132908
346 Changes required be merge of backend-hacking-branch.  Mostly config.h
347 ==> ghcconfig.h.
348]
349[[project @ 2004-07-01 18:16:05 by panne]
350panne**20040701181605
351 More heap/stack adjustments when building via hbc. I thought I had
352 fixed this, but nhc98's "touch"-based build system is giving me a
353 really hard time... >:-(
354]
355[[project @ 2004-07-01 13:25:09 by malcolm]
356malcolm**20040701132509
357 Revert from common heap/stack options to per-package options.  Since
358 hbc's runtime requirements are on occasion so much larger ghc/nhc98,
359 break out EXTRA_HBC_FLAGS as a separate variable.
360]
361[[project @ 2004-06-29 19:10:47 by panne]
362panne**20040629191047
363 Centralized compiler differences for requesting additional heap/stack in a
364 single place. Only tested for bootstrapping via hbc, and this needs 170M heap
365 for Language/Haskell/Parser.hs. There seems to be a "small" space leak here...
366 :-]
367]
368[[project @ 2004-06-25 00:51:30 by ralf]
369ralf**20040625005130
370 Derive Typeable and Data for all datatypes in Language/Haskell/Syntax.hs.
371 Use conditional compilation so that this lib still compiles with hugs.
372]
373[[project @ 2004-06-19 09:47:22 by malcolm]
374malcolm**20040619094722
375 Export runL as a subordinate of Lex.
376]
377[[project @ 2004-05-27 16:41:14 by malcolm]
378malcolm**20040527164114
379 Simplify search path.
380]
381[[project @ 2004-04-28 06:04:57 by ross]
382ross**20040428060457
383 note precondition on indents
384]
385[[project @ 2004-03-31 13:31:56 by ross]
386ross**20040331133156
387 docs
388]
389[[project @ 2004-03-01 17:21:54 by malcolm]
390malcolm**20040301172154
391 Increase stacksize.
392]
393[[project @ 2004-03-01 13:54:19 by malcolm]
394malcolm**20040301135420
395 Plumb the haskell-src package into the nhc98 libraries build.
396]
397[[project @ 2004-02-28 17:53:37 by panne]
398panne**20040228175338
399 More IncludeExampleDirsInBuild support. Cleaned things up a bit on the way.
400]
401[[project @ 2004-01-15 15:01:28 by ross]
402ross**20040115150128
403 no longer needed
404]
405[[project @ 2004-01-15 14:43:19 by igloo]
406igloo**20040115144322
407 Split Template Haskell out to its own package and update docs and tests.
408]
409[[project @ 2004-01-05 15:15:27 by igloo]
410igloo**20040105151527
411 Use pprint rather than show . ppr to get String representations of TH
412 datastructures. Also moved pprint out of the class as we never want to
413 override it.
414]
415[[project @ 2004-01-05 12:25:58 by ross]
416ross**20040105122558
417 remove redundant parentheses on constructor type arguments
418]
419[[project @ 2004-01-05 09:36:05 by simonpj]
420simonpj**20040105093605
421 Add a Show instance for Doc
422]
423[[project @ 2004-01-04 01:48:04 by igloo]
424igloo**20040104014807
425 Split the pretty-printer out - pprint will now give you pretty much
426 anything you are likely to want to pretty-print as a String. For a Doc
427 you need (to_HPJ_Doc . ppr), which could be made nicer if it is widely
428 used.
429 
430 Also took the opportunity to do a bit of module renaming and fixed the
431 odd typo here and there.
432]
433[[project @ 2003-11-21 21:10:53 by ross]
434ross**20031121211053
435 fix for special symbols
436]
437[[project @ 2003-11-21 18:39:55 by moran]
438moran**20031121183956
439 Remove handwritten instances of Show for HsName and its relatives, using
440 derived ones instead.  This means that Show can be used to generate Haskell
441 which itself manipulates values of the types in Language.Haskell.Syntax.  It's
442 also arguably cleaner to use derived Show instances when you have Pretty to
443 use if you need readable renderings.
444 
445 Merge to STABLE?
446]
447[[project @ 2003-11-21 12:40:03 by ross]
448ross**20031121124003
449 remove unused fn
450]
451[[project @ 2003-11-15 22:31:16 by panne]
452panne**20031115223116
453 Decouple packages a bit more again: The prologue of the combined index is now
454 generated via shell magic from the package prologues. As a nice side effect,
455 some autoconf magic is gone, so configure.ac is effectively empty now (but not
456 for long... :-)
457]
458[[project @ 2003-11-11 11:54:28 by simonmar]
459simonmar**20031111115428
460 Fix module name (was just TH).
461]
462[[project @ 2003-11-11 11:50:53 by simonmar]
463simonmar**20031111115053
464 Convert to use Haddock 0.6's combined contents/index functionality for
465 the hierarchical library docs.
466 
467 HEADS UP: you need Haddock 0.6 in order to run 'make html' in
468 fptools/libraries now.
469]
470[[project @ 2003-11-10 15:32:44 by simonmar]
471simonmar**20031110153244
472 Change the documentation title from "Haskell Core Libraries" to "Haskell Hierarchical Libraries".
473]
474[[project @ 2003-11-07 08:22:13 by simonpj]
475simonpj**20031107082213
476 Remove no-longer-wanted THInternals.hs
477]
478[[project @ 2003-11-06 17:56:20 by ross]
479ross**20031106175620
480 Hugs only: track the moving TH modules.
481 
482 How about calling these GHC.something?
483]
484[[project @ 2003-11-06 17:10:00 by simonpj]
485simonpj**20031106171001
486 ------------------------------------
487        Major increment for Template Haskell
488        ------------------------------------
489 
490 1.  New abstract data type "Name" which appears where String used to be.
491     E.g.       data Exp = VarE Name | ...
492 
493 2.  New syntax 'x and ''T, for quoting Names.  It's rather like [| x |]
494     and [t| T |] respectively, except that
495 
496        a) it's non-monadic:  'x :: Name
497        b) you get a Name not an Exp or Type
498 
499 3.  reify is an ordinary function
500        reify :: Name -> Q Info
501     New data type Info which tells what TH knows about Name
502 
503 4.  Local variables work properly.  So this works now (crashed before):
504        f x = $( [| x |] )
505 
506 5.  THSyntax is split up into three modules:
507 
508   Language.Haskell.TH          TH "clients" import this
509 
510   Language.Haskell.TH.THSyntax data type declarations and internal stuff
511 
512   Language.Haskell.TH.THLib    Support library code (all re-exported
513                                by TH), including smart constructors and
514                                pretty printer
515 
516 6.  Error reporting and recovery are in (not yet well tested)
517 
518        report :: Bool {- True <=> fatal -} -> String -> Q ()
519        recover :: Q a -> Q a -> Q a
520 
521 7.  Can find current module
522 
523        currentModule :: Q String
524 
525 
526 Much other cleaning up, needless to say.
527]
528[[project @ 2003-10-30 10:02:32 by ross]
529ross**20031030100232
530 exclude Language.Haskell.TH.THInternals from Hugs
531]
532[[project @ 2003-10-30 09:35:28 by simonpj]
533simonpj**20031030093528
534 Add first bits of THInternals
535]
536[TAG ghc-6-2-branch-point
537Unknown tagger**20060111184421]
538[[project @ 2003-09-05 21:21:09 by igloo]
539igloo**20030905212109
540 Derive Eq for the TH types, as discussed on the list.
541]
542[[project @ 2003-08-15 15:53:01 by igloo]
543igloo**20030815155301
544 Add support for splicing in foreign exports.
545]
546[[project @ 2003-08-05 17:20:26 by ross]
547ross**20030805172026
548 change some imports from haskell98 to base
549]
550[[project @ 2003-08-01 12:47:14 by ross]
551ross**20030801124714
552 refine imports
553]
554[TAG ghc-6-0-OpenGL-merge3
555Unknown tagger**20060111184416]
556[[project @ 2003-07-14 10:46:42 by ross]
557ross**20030714104642
558 add Sven's small driver as an example/tester
559]
560[[project @ 2003-07-13 11:48:11 by ross]
561ross**20030713114811
562 If the token following 'where' etc is offside, insert {} as required
563 by the Report.  (fixes a bug reported by Hal Daume)
564 
565 to STABLE, I think.
566]
567[[project @ 2003-07-02 10:33:26 by simonpj]
568simonpj**20030702103326
569 Improve rule for lifting strings
570]
571[[project @ 2003-06-26 14:06:22 by igloo]
572igloo**20030626140622
573 Add a MonadIO instance for Q
574]
575[[project @ 2003-06-08 18:12:26 by igloo]
576igloo**20030608181226
577 Introduce a ListP for consistency with ListE. Splicing in something with
578 a list pattern now works too.
579 
580 Added various list tests.
581]
582[[project @ 2003-06-07 11:20:49 by ross]
583ross**20030607112049
584 Add $($(HcFlavour)_HAPPY_OPTS) to HAPPY_OPTS, where HcFlavour defaults to GHC.
585 Packages may GHC_HAPPY_OPTS if they don't want -agc with ghc.
586]
587[[project @ 2003-06-06 16:22:44 by igloo]
588igloo**20030606162244
589 Add Lift Bool instance.
590 
591 Hmmm, could do this slightly nicer in the stage 3 build.
592]
593[[project @ 2003-06-06 16:04:25 by igloo]
594igloo**20030606160425
595 Template Haskell Renamings as described in
596 http://www.haskell.org/pipermail/template-haskell/2003-May/000110.html
597]
598[[project @ 2003-05-22 22:25:23 by igloo]
599igloo**20030522222523
600 Given ideas being discussed elsewhere as well as the renaming issue I
601 think "provisional" is a bit optimistic.
602 
603 Please merge to 6.0.
604]
605[[project @ 2003-05-21 23:40:10 by igloo]
606igloo**20030521234010
607 Rename and reorder the internals for unique ids etc. Also fixed a couple
608 of THSyntax names.
609]
610[[project @ 2003-05-21 18:07:23 by igloo]
611igloo**20030521180723
612 The Great Renaming. I hope I've kept everything in sync - and all the tests
613 pass. Now datatypes follow the
614 
615 data Foo = <a kind of Foo>Foo
616          | <another kind of Foo>Foo
617 
618 convention and the smart constructors can be uniformly created by
619 lowercasing the first letter of the constructor.
620]
621[TAG ghc-6-0-branch-point
622Unknown tagger**20060111184402]
623[[project @ 2003-05-21 02:58:40 by igloo]
624igloo**20030521025840
625 Added support for newtypes to TH and altered a test for them.
626]
627[[project @ 2003-05-17 00:11:29 by ross]
628ross**20030517001129
629 Rename per-package configuration files from $(PACKAGE).conf.* to
630 package.conf.*, making them easier to find (since each package is
631 in a separate directory anyway).
632]
633[[project @ 2003-05-16 10:14:23 by simonmar]
634simonmar**20030516101423
635 Now that we have auto packages, it makes sense to keep all the
636 interfaces for hierarchical libraries in the same directory tree.  So
637 now, instead of putting interfaces for package P in $libdir/imports/P,
638 we put them all in $libdir/imports.
639 
640 Interfaces for old non-auto non-hierarchical packages now go in
641 $libdir/hslibs-imports/P for package P.
642]
643[[project @ 2003-05-14 13:53:46 by simonmar]
644simonmar**20030514135346
645 Give this module a proper module header.
646]
647[[project @ 2003-05-04 13:21:49 by igloo]
648igloo**20030504132149
649 Add support for unboxed Ints, Floats and Doubles to Template Haskell.
650]
651[[project @ 2003-04-22 20:40:00 by igloo]
652igloo**20030422204000
653 Order declarations in reifications in order of source line number.
654 The bugs still there but it bites less often now...
655 
656 Also remove the type parameterisation and do some type renaming as
657 discussed on the template-haskell list.
658]
659[[project @ 2003-04-22 09:16:16 by ross]
660ross**20030422091616
661 report an error for an end-of-line comment that doesn't end with a
662 newline (because it's at the end of the input).
663]
664[[project @ 2003-04-10 14:45:48 by simonpj]
665simonpj**20030410144548
666 Handle Int literals in TH
667]
668[TAG galois-hbm-head
669Unknown tagger**20060111184351]
670[[project @ 2003-03-20 15:00:23 by igloo]
671igloo**20030320150023
672 A few missing bits for records from Derek Elkins.
673]
674[TAG before-galois-hbm
675Unknown tagger**20060111184350]
676[[project @ 2003-03-16 14:15:22 by igloo]
677igloo**20030316141522
678 Support for contexts on data types and records from Derek Elkins.
679]
680[[project @ 2003-03-11 18:52:49 by panne]
681panne**20030311185249
682 Export Indent
683]
684[[project @ 2003-02-20 21:13:50 by malcolm]
685malcolm**20030220211350
686 Change the non-terminal name "import" to "importspec", to avoid confusing hmake.
687]
688[[project @ 2003-02-18 16:23:36 by igloo]
689igloo**20030218162336
690 Support strictness annotations on data declarations and support the record
691 and infix constructors. Also tweaked the pretty printer a bit.
692]
693[[project @ 2003-02-06 17:15:50 by simonpj]
694simonpj**20030206171550
695 -------------------------------------
696   Fix parsing of floating-point constants in External Core
697        -------------------------------------
698 
699 This fix accidentally made it into the previous (unrelated) commit,
700 so it's really the *previous* change to LexCore you should look
701 at.
702 
703 The fix updates LexCore so that it can parse literals in scientific
704 notation (e.g. 4.3e-3)
705]
706[TAG before-speceval_2
707Unknown tagger**20060111184345]
708[[project @ 2003-01-17 09:12:08 by ross]
709ross**20030117091208
710 case expressions must have at least one non-empty alternative.
711]
712[[project @ 2003-01-09 13:12:28 by igloo]
713igloo**20030109131228
714 Prettyprinter tweaks
715]
716[[project @ 2003-01-08 16:44:52 by simonpj]
717simonpj**20030108164452
718 Remove unnecessary SPECIALISE pragma, which was killing the build
719]
720[[project @ 2003-01-06 15:28:16 by simonpj]
721simonpj**20030106152816
722 1. Make THSyntax.lift have type
723        lift :: t -> Expr
724    as advertised in the paper.
725 
726 2. Add an instance for Lift [a] and specialisations for Strings
727]
728[[project @ 2002-12-27 12:49:52 by panne]
729panne**20021227124952
730 Pedantry: Now every package configuration file #includes "config.h"
731 for consistency.
732 
733 A small note on the ObjectIO package: Wouldn't 'ObjectIO' be a better
734 and more consistent package name than 'objectio'?
735]
736[[project @ 2002-12-18 16:29:26 by simonmar]
737simonmar**20021218162926
738 "Auto" packages.
739 
740 The big change here is that it is no longer necessary to explicitly
741 say '-package X' on the command line if X is a package containing
742 hierarchical Haskell modules.  All packages marked "auto" contribute
743 to the import path, so their modules are always available.  At link
744 time, the compiler knows which packages are actually used by the
745 program, and it links in only those libraries needed.
746 
747 There's one exception: one-shot linking.  If you link a program using
748 
749     ghc -o prog A.o B.o ...
750 
751 then you need to explicitly add -package flags for each package
752 required (except base & haskell98) because the compiler has no
753 information about the package dependencies in this case.
754 
755 Package configs have a new field: auto, which is either True or False.
756 Non-auto packages must be mentioned on the command-line as usual.
757 Non-auto packages are still required for:
758 
759   - non-hierarchical libraries (to avoid polluting the module namespace)
760 
761   - packages with no Haskell content
762 
763   - if you want more than one version of a package, or packages
764     providing overlapping functionality where the user must decide
765     which one to use.
766 
767 Doc changes to follow...
768]
769[[project @ 2002-12-10 22:15:39 by igloo]
770igloo**20021210221539
771 Pretty-print strings correctly.
772]
773[[project @ 2002-12-10 22:04:50 by igloo]
774igloo**20021210220450
775 string makes a single String literal rather than a list of Char literals.
776]
777[[project @ 2002-12-10 21:25:08 by igloo]
778igloo**20021210212508
779 Use real datatypes for TH Clause and Match
780]
781[[project @ 2002-11-20 15:43:37 by simonpj]
782simonpj**20021120154337
783 Three Template Haskell improvements
784 
785 a) Add type synonyms to THSyntax (and DsMeta, Convert)
786 
787 b) Make Q into a newtype instead of a type synonym
788 
789 c) Eliminate tiresome and error prone argument to DsMeta.wrapGenSyms
790    and similarly addTyVarBinds
791]
792[[project @ 2002-11-20 00:54:03 by ross]
793ross**20021120005403
794 Add type signatures for the precedence constants.
795 
796 I think GHC was erroneous in accepting the module without these.
797 A simpler example:
798 
799        module X where { n = 0; m = n::Int }
800 
801 should fail because the type of n, being ambiguous, defaults to Integer.
802]
803[[project @ 2002-11-13 09:57:02 by chak]
804chak**20021113095702
805 Added forall's to the representation of type terms
806]
807[[project @ 2002-11-11 20:29:46 by panne]
808panne**20021111202946
809 Make comments palatable for Haddock
810]
811[[project @ 2002-11-09 09:58:57 by chak]
812chak**20021109095857
813 Changed implementation of representation of negation to use function
814 application instead of a special syntactic form as suggested by SPJ.
815]
816[[project @ 2002-11-08 09:01:06 by simonpj]
817simonpj**20021108090106
818 ------------------
819           More TH stuff (thanks to Ian L)
820                ------------------
821 
822 * Make TH Literals have an Integer not an Int
823 * Desguar TH 'foreign import' a bit better
824 * Minor documentation changes
825]
826[[project @ 2002-11-06 13:10:47 by simonpj]
827simonpj**20021106131047
828 ------------------
829                Template Haskell stuff
830                ------------------
831 
832 a) Pretty printer for TH (thanks to Ian Lynagh)
833 
834 b) A declaration quote has type Q [Dec], not [Q Dec] as in
835    the paper
836 
837 c) Foreign imports are part of THSyntax, and can be spliced in
838]
839[[project @ 2002-10-30 13:17:06 by simonpj]
840simonpj**20021030131706
841 Add string/rational literals, and e::t form to TH
842]
843[[project @ 2002-10-30 05:46:49 by chak]
844chak**20021030054649
845 Added support for negation to THSyntax and DsMeta.repE.
846]
847[[project @ 2002-10-11 14:16:58 by simonpj]
848simonpj**20021011141658
849 Add pretty-printer for types
850]
851[[project @ 2002-10-09 15:06:39 by simonpj]
852simonpj**20021009150639
853 More Template Haskell
854]
855[[project @ 2002-08-30 14:28:02 by simonpj]
856simonpj**20020830142802
857 Template Haskell library updates
858]
859[[project @ 2002-08-30 14:23:54 by simonpj]
860simonpj**20020830142354
861 Fix missing dependency in haskell-src config
862]
863[[project @ 2002-08-19 22:18:29 by ross]
864ross**20020819221829
865 Fix printing of [a,b..]
866]
867[TAG meta-haskell-merge7
868Unknown tagger**20060111184319]
869[TAG meta-haskell-merge8
870Unknown tagger**20060111184319]
871[[project @ 2002-07-25 10:25:48 by ross]
872ross**20020725102548
873 Avoid a few compiler warnings.
874]
875[[project @ 2002-07-19 11:42:16 by ross]
876ross**20020719114216
877 Added prettyPrintStyleMode to allow more control over the rendering.
878]
879[[project @ 2002-07-19 10:50:14 by ross]
880ross**20020719105014
881 Stop it printing "case x of { -1 -> x }" as "case x of {- 1 -> x}", which
882 is then misinterpreted as a comment.  (Bug reported by Bernie Pope)
883]
884[[project @ 2002-07-15 09:41:43 by ross]
885ross**20020715094143
886 Fix lexing of qualified variables starting with underscores (e.g. M._f),
887 courtesy of Anders Lau Olsen <[email protected]>.
888]
889[TAG meta-haskell-merge6
890Unknown tagger**20060111184312]
891[TAG ghc-ndp2b-trunk-merge-frontier
892Unknown tagger**20060111184312]
893[TAG ghc-ndp2b-updated-from-trunk1
894Unknown tagger**20060111184312]
895[[project @ 2002-07-08 08:12:02 by simonpj]
896simonpj**20020708081202
897 -------------------------------------
898        Add Template Haskell syntax data type
899        -------------------------------------
900 
901 Ideally this data type should be the same as the existing
902 HsSource, but the emphasis is more on simplicity here.  There
903 should be some discussion on convergence, but meanwhile we
904 decided it was best to make progress in parallel.
905]
906[TAG meta-haskell-merge5
907Unknown tagger**20060111184311]
908[TAG ghc-5-04
909Unknown tagger**20060111184311]
910[[project @ 2002-07-02 17:39:33 by ross]
911ross**20020702173933
912 Minor documentation fiddles.
913]
914[[project @ 2002-07-02 13:13:37 by simonmar]
915simonmar**20020702131337
916 Add descriptions to the top level of each package documentation
917]
918[[project @ 2002-06-24 14:40:02 by simonmar]
919simonmar**20020624144002
920 Makefile updates for generating docs with Haddock:
921 
922 - explicitly depend on package base
923 - set SRC_HADDOCK_OPTS in some places
924]
925[[project @ 2002-06-21 17:53:11 by ross]
926ross**20020621175311
927 Revise representation of special constructors: they can't be qualified.
928 Also treat : as a special constructor, as per the report.
929]
930[[project @ 2002-06-21 13:56:47 by simonmar]
931simonmar**20020621135647
932 Title for Hadock docs.
933]
934[[project @ 2002-06-06 13:35:19 by ross]
935ross**20020606133520
936 Default module header changed from Main to Main(main), as per Haskell 98.
937]
938[[project @ 2002-06-06 13:20:22 by ross]
939ross**20020606132022
940 Introduce an explicit representation of cnames, so we don't forget whether
941 they were variables or constructors.
942]
943[[project @ 2002-05-27 11:43:04 by ross]
944ross**20020527114305
945 Add source locations to lambda expressions and generators, so now every
946 place that can introduce new variables has a location.
947]
948[[project @ 2002-05-27 11:35:31 by ross]
949ross**20020527113531
950 Added an addSrcLoc operation to the parse monad to provide more finegrained
951 location information while checking.
952]
953[[project @ 2002-05-27 10:38:38 by ross]
954ross**20020527103838
955 Bugfix to printing of lhs's with infix variables.  Formerly a definition
956 
957        C x `op` y = ...
958 
959 was printed as "op C x y = ...".  Now it's printed as "op (C x) y = ...".
960]
961[[project @ 2002-05-24 16:23:55 by ross]
962ross**20020524162355
963 Enforce restriction on valdefs in class and instance bodies.
964]
965[[project @ 2002-05-24 16:02:06 by ross]
966ross**20020524160206
967 Analyse class and instance headers (formerly treated as qualified types).
968]
969[[project @ 2002-05-24 14:40:32 by ross]
970ross**20020524144033
971 Put source filenames in the right place:
972 
973 * make SrcLoc a record, and add a source filename to it.
974 
975 * add a ParseMode record to the parsing monad, for parameters that
976   remain constant during a parse.  Currently this contains just the
977   filename, but we may wish to add more later, e.g. literate mode,
978   language extensions.
979 
980 * remove the filename from the pretty-printing mode record.
981]
982[[project @ 2002-05-24 10:54:04 by ross]
983ross**20020524105404
984 Small correction for last commit, allowing modules with no topdecls.
985]
986[[project @ 2002-05-20 14:56:37 by ross]
987ross**20020520145637
988 Merge adjacent bindings of the same function name, and check that they
989 have the same arity.
990]
991[[project @ 2002-05-17 16:31:57 by ross]
992ross**20020517163157
993 Cosmetic changes.
994]
995[[project @ 2002-05-17 16:22:50 by ross]
996ross**20020517162251
997 Make the parsing and lexing monads instances of Monad, and use them
998 abstractly.  This should not change the public interface.
999 
1000 Also updated the lexer to accept floating point literals like 1e6
1001 following a recent revision to Haskell 98.
1002]
1003[[project @ 2002-05-17 15:05:01 by ross]
1004ross**20020517150501
1005 Minor grammar refactoring.
1006]
1007[[project @ 2002-05-17 11:43:57 by ross]
1008ross**20020517114357
1009 (from haddock) Fix bugs in qualified name handling (A.B.f was returned as B.f)
1010]
1011[[project @ 2002-05-17 11:24:39 by ross]
1012ross**20020517112439
1013 Fix source position for EOF.
1014]
1015[[project @ 2002-05-16 12:16:44 by ross]
1016ross**20020516121644
1017 Small fix by Martin Norbäck.
1018]
1019[[project @ 2002-05-16 11:54:00 by ross]
1020ross**20020516115400
1021 Add -agc to the Happy options to use less space (uses the dummy GlaExts
1022 module in base for now).
1023]
1024[[project @ 2002-05-15 15:36:32 by ross]
1025ross**20020515153632
1026 Don't use -O with the parser.
1027]
1028[[project @ 2002-05-14 11:09:52 by ross]
1029ross**20020514110952
1030 Moved hslibs/hssource to Language.Haskell.* in a new haskell-src package
1031 within the new hierarchical libraries, leaving stubs behind.
1032]
1033Patch bundle hash:
10342919cb0e75bf8bec8fc9f0b2ae80a186240eed2d