summaryrefslogtreecommitdiff
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* Have the users guide just refer to the wiki page on how to report a bugIan Lynagh2007-07-021-89/+6
|
* Remove the large ghci banner, and the flags to choose which banner to showIan Lynagh2007-07-021-12/+0
| | | | | | | | | | | Fans of the banner can add putStrLn " ___ ___ _" putStrLn " / _ \\ /\\ /\\/ __(_)" putStrLn " / /_\\// /_/ / / | | GHC Interactive, for Haskell 98." putStrLn "/ /_\\\\/ __ / /___| | http://www.haskell.org/ghc/" putStrLn "\\____/\\/ /_/\\____/|_| Type :? for help." putStrLn "" to their ~/.ghci
* Tidy up -keep* flagsIan Lynagh2007-06-303-4/+13
|
* Update version numbering policy in the users guideIan Lynagh2007-06-231-29/+53
|
* Add several new record featuresLemmih2007-06-212-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Record disambiguation (-fdisambiguate-record-fields) In record construction and pattern matching (although not in record updates) it is clear which field name is intended even if there are several in scope. This extension uses the constructor to disambiguate. Thus C { x=3 } uses the 'x' field from constructor C (assuming there is one) even if there are many x's in scope. 2. Record punning (-frecord-puns) In a record construction or pattern match or update you can omit the "=" part, thus C { x, y } This is just syntactic sugar for C { x=x, y=y } 3. Dot-dot notation for records (-frecord-dot-dot) In record construction or pattern match (but not update) you can use ".." to mean "all the remaining fields". So C { x=v, .. } means to fill in the remaining fields to give C { x=v, y=y } (assuming C has fields x and y). This might reasonably considered very dodgy stuff. For pattern-matching it brings into scope a bunch of things that are not explictly mentioned; and in record construction it just picks whatver 'y' is in scope for the 'y' field. Still, Lennart Augustsson really wants it, and it's a feature that is extremely easy to explain. Implementation ~~~~~~~~~~~~~~ I thought of using the "parent" field in the GlobalRdrEnv, but that's really used for import/export and just isn't right for this. For example, for import/export a field is a subordinate of the *type constructor* whereas here we need to know what fields belong to a particular *data* constructor. The main thing is that we need to map a data constructor to its fields, and we need to do so in the renamer. For imported modules it's easy: just look in the imported TypeEnv. For the module being compiled, we make a new field tcg_field_env in the TcGblEnv. The important functions are RnEnv.lookupRecordBndr RnEnv.lookupConstructorFields There is still a significant infelicity in the way the renamer works on patterns, which I'll tackle next. I also did quite a bit of refactoring in the representation of record fields (mainly in HsPat).***END OF DESCRIPTION*** Place the long patch description above the ***END OF DESCRIPTION*** marker. The first line of this file will be the patch name. This patch contains the following changes: M ./compiler/deSugar/Check.lhs -3 +5 M ./compiler/deSugar/Coverage.lhs -6 +7 M ./compiler/deSugar/DsExpr.lhs -6 +13 M ./compiler/deSugar/DsMeta.hs -8 +8 M ./compiler/deSugar/DsUtils.lhs -1 +1 M ./compiler/deSugar/MatchCon.lhs -2 +2 M ./compiler/hsSyn/Convert.lhs -3 +3 M ./compiler/hsSyn/HsDecls.lhs -9 +25 M ./compiler/hsSyn/HsExpr.lhs -13 +3 M ./compiler/hsSyn/HsPat.lhs -25 +63 M ./compiler/hsSyn/HsUtils.lhs -3 +3 M ./compiler/main/DynFlags.hs +6 M ./compiler/parser/Parser.y.pp -13 +17 M ./compiler/parser/RdrHsSyn.lhs -16 +18 M ./compiler/rename/RnBinds.lhs -2 +2 M ./compiler/rename/RnEnv.lhs -22 +82 M ./compiler/rename/RnExpr.lhs -34 +12 M ./compiler/rename/RnHsSyn.lhs -3 +2 M ./compiler/rename/RnSource.lhs -50 +78 M ./compiler/rename/RnTypes.lhs -50 +84 M ./compiler/typecheck/TcExpr.lhs -18 +18 M ./compiler/typecheck/TcHsSyn.lhs -20 +21 M ./compiler/typecheck/TcPat.lhs -8 +6 M ./compiler/typecheck/TcRnMonad.lhs -6 +15 M ./compiler/typecheck/TcRnTypes.lhs -2 +11 M ./compiler/typecheck/TcTyClsDecls.lhs -3 +4 M ./docs/users_guide/flags.xml +7 M ./docs/users_guide/glasgow_exts.xml +42
* Remove an incorrect claim that [t| ... |] isn't implemented yetIan Lynagh2007-06-211-1/+1
|
* Implement -X=GADTs and -X=RelaxedPolyRecsimonpj@microsoft.com2007-06-202-9/+22
| | | | | | | | Two new -X flags, one for GADTs and one for relaxed polymorphic recursion This also fixes a rather confusing error message that the Darcs folk tripped over.
* Use -X for language extensionssimonpj@microsoft.com2007-06-202-100/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've often talked about having a separate flag for language extensions, and now we have one. You can say -XImplicitParams -X=ImplicitParams -Ximplicit-params as you like. These replace the "-f" flags with similar names (though the -f prefix will serve as a synonym for -X for a while). There's an optional "=", and the flag is normalised by removing hyphens and lower-casing, so all the above variants mean the same thing. The nomenclature is intended to match the LANGUAGE pramgas, which are defined by Cabal. So you can also say {-# LANGUAGE ImplicitParams #-} But Cabal doesn't have as many language options as GHC does, so the -X things are a superset of the LANGUAGE things. The optional "=" applies to all flags that take an argument, so you can, for example, say -pgmL=/etc/foo I hope that's ok. (It's an unforced change; just fitted in.) I hope we'll add more -X flags, to replace the portmanteau -fglasgow-exts which does everything! I have updated the manual, but doubtless missed something.
* Remove erroneous requirement to import Control.Monad.Fix when using mdosimonpj@microsoft.com2007-06-191-7/+0
| | | | | See Trac #1426
* First cut at documentation for HPC option in GHCandy@galois.com2007-06-193-0/+159
|
* typoSimon Marlow2007-06-181-1/+1
|
* Tweak banner printing2007-06-12Ian Lynagh2007-06-121-2/+2
| | | | | | | | * -{short,long}-ghci-banner are now dynamic options, so you can put ":set -short-ghci-banner" in .ghci * The -v2 banner information now always tells you what compiler booted GHC, and what stage the compiler is. Thus we no longer assume that stage > 1 iff GHCI is defined.
* FIX #1378 Add option for a shorter banner on GHCi startupcdsmith@twu.net2007-06-011-0/+12
| | | | | | | Add -short-ghci-banner and -long-ghci-banner. The default is long, which is the current behavior. The short banner prints a one-line introduction with only the version, web site, and ":? for help" message.
* Update Windows installation docsIan Lynagh2007-05-291-41/+23
|
* Document -fomit-interface-pragmas, -fignore-interface-pragmassimonpj@microsoft.com2007-05-211-3/+47
|
* doc: 'import M' is the same as ':module +M'Simon Marlow2007-05-211-2/+10
|
* xref to the docs for +RTS -xcSimon Marlow2007-05-171-1/+3
|
* complete documentation of the GHCi debuggerSimon Marlow2007-05-171-86/+231
|
* Rework the GHCi debugger docsSimon Marlow2007-05-161-372/+727
| | | | | | I've taken material from Bernie's docs on the wiki, and Pepe's docs in this file, and added some more material of my own. Still to do: document the individual commands.
* Added -ftype-families to the user's manualManuel M T Chakravarty2007-05-152-0/+33
| | | | | | | - This adds the option to the flag reference and puts a stub pointing to the Haskell wiki page about type families into the section about type extensions. - Once, the implementation has stabilised, the material from the wiki page will be integreated into the user's manual.
* Add a warning flag for when the Prelude is implicitly imported (trac #1317)Isaac Dupree2007-05-112-1/+34
| | | | | | GHC already determines all the implicit (Prelude) imports, so we just need to check whether there are any of those, for each module being compiled.
* Document -fspec-thresholdsimonpj@microsoft.com2007-05-071-3/+4
| | | | | | | This size-threshold flag is for both liberate-case and SpecConstr. Replaces -flibereate-case-threshold.
* Make -frewrite-rules into a dynamic flag; off for -O0simonpj@microsoft.com2007-05-041-30/+45
| | | | | | | | | | | | | | Argubly rewrite rules should not fire with -O0, and it turns out that when compiling GHC.Base with -O0 we get a crash if the rewrite rules do fire (see Note [Scoping for Builtin rules] in PrelRules). So unless someone yells, rewrite rules are off with -O0. The new (now dynamic) flag is -frewrite rules (with -fno-rewrite-rules to disable) The old (static) flag -frules-off is gone.
* Add the -ddump-mod-cycles flag to the user manualsimonpj@microsoft.com2007-05-031-0/+9
|
* move -fno-print-bind-result into the GHCi sectionSimon Marlow2007-05-021-6/+6
|
* Document the fact that you can't make a newtype of an unboxed data typesimonpj@microsoft.com2007-05-021-0/+7
|
* remove unused primitives.xmlSimon Marlow2007-05-023-1218/+0
|
* Fix grammar error in docs (as per Trac 1319)Tim Chevalier2007-05-021-1/+1
|
* -fwarn-monomorphism-restriction is now off by defaultIan Lynagh2007-05-011-1/+1
|
* document the current behaviour of -Wall, see #1292Simon Marlow2007-05-011-1/+10
|
* Formatting and minor changes in the ghci debugger sectionPepe Iborra2007-04-261-4/+10
|
* Update an example on the ghci debugger sectionPepe Iborra2007-04-261-38/+39
|
* We don't have -fdebugging anymore, and fine tuning is not really necessary nowPepe Iborra2007-04-261-19/+0
|
* New section on debugging lambdas in the ghci user guidePepe Iborra2007-04-261-19/+105
|
* Unbreak the users_guidePepe Iborra2007-04-261-2/+2
|
* :force is not unsupported anymorePepe Iborra2007-04-261-1/+1
|
* Update the users_guide regarding list notation in :printPepe Iborra2007-04-251-7/+3
|
* Add -fwarn-monomorphism-restriction (on by default) to warn when the MR is usedsimonpj@microsoft.com2007-04-252-0/+21
| | | | | | | | Users often trip up on the Dreaded Monomorphism Restriction. This warning flag tells you when the MR springs into action. Currently it's on by default, but we could change that.
* Give the inferred type when warning of a missing type-signature (Trac #1256)simonpj@microsoft.com2007-04-251-1/+2
|
* Put the default value for -dppr-user-length in the manualsimonpj@microsoft.com2007-04-221-1/+1
| | | | | | | MERGE TO STABLE Incidentally, this flag should probably be renamed -dppr-user-depth
* Rationalise GhcMode, HscTarget and GhcLinkSimon Marlow2007-04-113-1/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans up the GHC API, and adds some functionality: we can now compile to object code inside GHCi. Previously we had: data GhcMode = BatchCompile | Interactive | OneShot | JustTypecheck | MkDepend data HscTarget = HscC | HscAsm | HscJava | HscInterpreted | HscNothing There was redundancy here; if GhcMode is Interactive, then only HscInterpreted makes sense, and JustTypecheck required HscNothing. Now we have: data GhcMode = CompManager -- ^ --make, GHCi, etc. | OneShot -- ^ ghc -c Foo.hs | MkDepend -- ^ ghc -M, see Finder for why we need this and HscTarget remains as before. Previously GhcLink looked like this: data GhcLink = NoLink | StaticLink Now we have: data GhcLink = NoLink | LinkBinary | LinkInMemory The idea being that you can have an HscTarget of HscAsm (for example) and still link in memory. There are two new flags: -fobject-code selects object code as the target (selects either -fasm or -fvia-C, whichever is the default) This can be usd with ':set' in GHCi, or on the command line. -fbyte-code sets byte-code as the target. Only works in GHCi. One day maybe this could save the byte code in a file when used outside GHCi. (names chosen for consistency with -fno-code). Changes to the GHC API: newSession no longer takes the GhcMode argument. The GhcMode defaults to CompManager, which is usually what you want. To do JustTypecheck now, just set hscTarget to HscNothing.
* Document that ghci now adds () to the start of the type defaulting listIan Lynagh2007-03-291-18/+73
|
* remove old library doc link (#1098), and point to HackageDBSimon Marlow2007-03-282-11/+11
|
* remove docs for unimplemented optionsSimon Marlow2007-03-261-0/+2
| | | | | | -optdep--include-module and --optdep--exclude-directory were features of the old mkdependHS script but weren't implemented when mkdependHS was merged into GHC.
* Documentation for --install-signal-handlers=<yes|no>Ian Lynagh2007-03-221-0/+12
|
* Improve documentation of instancessimonpj@microsoft.com2007-03-221-14/+13
|
* Added LaTeX commands for primitive types and pseudo opssven.panne@aedion.de2007-03-141-0/+8
|
* Add helpful cross-referencessimonpj@microsoft.com2007-03-131-4/+8
|
* Remove references to the in-tree building guide from teh old commentaryIan Lynagh2007-03-062-3/+3
|
* Doc typoIan Lynagh2007-02-271-1/+1
|