summaryrefslogtreecommitdiff
path: root/docs
Commit message (Collapse)AuthorAgeFilesLines
* [skip ci] clarify what unsound meansAndrew Martin2019-10-081-18/+24
|
* [skip ci] can not -> may notAndrew Martin2019-10-081-1/+1
|
* [skip ci] make the table betterAndrew Martin2019-10-081-10/+20
|
* [skip ci] link to foreign cmm callAndrew Martin2019-10-081-6/+6
|
* Rephrase a bunch of things in the unlifted ffi types documentation. Add a ↵Andrew Martin2019-10-081-43/+71
| | | | section on pinned byte arrays.
* Document the UnliftedFFITypes extension.Andrew Martin2019-10-082-6/+98
|
* gitlab-ci: Check coverage of GHC flags in users guideBen Gamari2019-10-082-0/+276
| | | | | | | This ensures that all GHC flags are documented during the documentation build. Fixes #17315.
* doc: Write out documented flag listBen Gamari2019-10-081-1/+11
|
* users-guide: Run sphinx in nit-picky modeBen Gamari2019-10-081-0/+23
| | | | This ensure that it blurts an error on missing references.
* users-guide: Rework pragma key generationBen Gamari2019-10-081-6/+8
| | | | | | Previously we had a hack to handle the case of multi-token SPECIALISE pragmas. Now we use a slightly more general rule of using a prefix of tokens containing only alphabetical characters.
* users-guide: Document -fworker-wrapperBen Gamari2019-10-081-0/+11
|
* users-guide: Document NondecreasingIndentationBen Gamari2019-10-081-1/+8
|
* users-guide: Fix various warningsBen Gamari2019-10-0811-82/+109
|
* users-guide: Document -XHaskell98 and -XHaskell2010Ben Gamari2019-10-081-0/+39
|
* users-guide: Make reverse flags addressable via :ghc-flag:Ben Gamari2019-10-081-2/+15
| | | | | Previously one could not easily link to the :reverse: flag of a ghc-flag.
* users-guide: Refer to language extension flags via :extension:Ben Gamari2019-10-086-29/+29
| | | | Previously several were referred to via :ghc-flag:`-X...`.
* base: Document the fact that Typeable is automatically "derived"Ben Gamari2019-10-081-1/+1
| | | | This fixes #17060.
* configure: Determine library versions of template-haskell, et al.Ben Gamari2019-10-071-0/+3
| | | | These are needed by the user guide documentation. Fixes #17260.
* Deprecate -fwarn-hi-shadowing, because it was never implemented and isDaroc Alden2019-10-042-13/+4
| | | | | | not used. This fixes #10913.
* Add new debug flag -DZTobias Guggenmos2019-10-031-0/+1
| | | | Zeros heap memory after gc freed it.
* Improve documentation for runtime debugging flagsTobias Guggenmos2019-10-031-0/+22
|
* Allow users to disable Unicode with an env varRon Mordechai2019-09-271-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unicode renders funny on my terminal and I like to avoid it where possible. Most applications which print out non-ascii characters allow users to disable such prints with an environment variable (e.g. Homebrew). This diff disables Unicode usage when the environment variable `GHC_NO_UNICODE` is set. To test, set the env var and compile a bad program. Note that GHC does not print Unicode bullets but instead prints out asterisks: ``` $ GHC_NO_UNICODE= _build/stage1/bin/ghc ../Temp.hs [1 of 1] Compiling Temp ( ../Temp.hs, ../Temp.o ) ../Temp.hs:4:23: error: * Couldn't match type `Bool' with `a -> Bool' Expected type: Bool -> a -> Bool Actual type: Bool -> Bool * In the first argument of `foldl', namely `(&& (flip $ elem u))' In the expression: foldl (&& (flip $ elem u)) True v In an equation for `isPermut': isPermut u v = foldl (&& (flip $ elem u)) True v * Relevant bindings include v :: [a] (bound at ../Temp.hs:4:12) u :: [a] (bound at ../Temp.hs:4:10) isPermut :: [a] -> [a] -> Bool (bound at ../Temp.hs:4:1) | 4 | isPermut u v = foldl (&& (flip $ elem u)) True v | ^^^^^^^^^^^^^^^^^^ ``` (Broken code taken from Stack Overflow)
* PmCheck: Elaborate what 'model' means in the user guide [skip ci]Sebastian Graf2019-09-271-8/+14
|
* Make -fbyte-code prevent unboxed tuples/sums from implying object code (#16876)Ryan Scott2019-09-262-10/+26
| | | | | | | | | | | | | | | | | | | | This resolves #16876 by making the explicit use of `-fbyte-code` prevent code that enables `UnboxedTuples` or `UnboxedSums` from automatically compiling to object code. This allows for a nice middle ground where most code that enables `UnboxedTuples`/-`Sums` will still benefit from automatically enabling `-fobject-code`, but allows power users who wish to avoid this behavior in certain corner cases (such as `lens`, whose use case is documented in #16876) to do so. Along the way, I did a little cleanup of the relevant code and documentation: * `enableCodeGenForUnboxedTuples` was only checking for the presence of `UnboxedTuples`, but `UnboxedSums` has the same complications. I fixed this and renamed the function to `enableCodeGenForUnboxedTuplesOrSums`. * I amended the users' guide with a discussion of these issues.
* Standalone kind signatures (#16794)wip/top-level-kind-signaturesVladislav Zavialov2019-09-252-5/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements GHC Proposal #54: .../ghc-proposals/blob/master/proposals/0054-kind-signatures.rst With this patch, a type constructor can now be given an explicit standalone kind signature: {-# LANGUAGE StandaloneKindSignatures #-} type Functor :: (Type -> Type) -> Constraint class Functor f where fmap :: (a -> b) -> f a -> f b This is a replacement for CUSKs (complete user-specified kind signatures), which are now scheduled for deprecation. User-facing changes ------------------- * A new extension flag has been added, -XStandaloneKindSignatures, which implies -XNoCUSKs. * There is a new syntactic construct, a standalone kind signature: type <name> :: <kind> Declarations of data types, classes, data families, type families, and type synonyms may be accompanied by a standalone kind signature. * A standalone kind signature enables polymorphic recursion in types, just like a function type signature enables polymorphic recursion in terms. This obviates the need for CUSKs. * TemplateHaskell AST has been extended with 'KiSigD' to represent standalone kind signatures. * GHCi :info command now prints the kind signature of type constructors: ghci> :info Functor type Functor :: (Type -> Type) -> Constraint ... Limitations ----------- * 'forall'-bound type variables of a standalone kind signature do not scope over the declaration body, even if the -XScopedTypeVariables is enabled. See #16635 and #16734. * Wildcards are not allowed in standalone kind signatures, as partial signatures do not allow for polymorphic recursion. * Associated types may not be given an explicit standalone kind signature. Instead, they are assumed to have a CUSK if the parent class has a standalone kind signature and regardless of the -XCUSKs flag. * Standalone kind signatures do not support multiple names at the moment: type T1, T2 :: Type -> Type -- rejected type T1 = Maybe type T2 = Either String See #16754. * Creative use of equality constraints in standalone kind signatures may lead to GHC panics: type C :: forall (a :: Type) -> a ~ Int => Constraint class C a where f :: C a => a -> Int See #16758. Implementation notes -------------------- * The heart of this patch is the 'kcDeclHeader' function, which is used to kind-check a declaration header against its standalone kind signature. It does so in two rounds: 1. check user-written binders 2. instantiate invisible binders a la 'checkExpectedKind' * 'kcTyClGroup' now partitions declarations into declarations with a standalone kind signature or a CUSK (kinded_decls) and declarations without either (kindless_decls): * 'kinded_decls' are kind-checked with 'checkInitialKinds' * 'kindless_decls' are kind-checked with 'getInitialKinds' * DerivInfo has been extended with a new field: di_scoped_tvs :: ![(Name,TyVar)] These variables must be added to the context in case the deriving clause references tcTyConScopedTyVars. See #16731.
* PmCheck: Only ever check constantly many models against a single patternSebastian Graf2019-09-251-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Introduces a new flag `-fmax-pmcheck-deltas` to achieve that. Deprecates the old `-fmax-pmcheck-iter` mechanism in favor of this new flag. From the user's guide: Pattern match checking can be exponential in some cases. This limit makes sure we scale polynomially in the number of patterns, by forgetting refined information gained from a partially successful match. For example, when matching `x` against `Just 4`, we split each incoming matching model into two sub-models: One where `x` is not `Nothing` and one where `x` is `Just y` but `y` is not `4`. When the number of incoming models exceeds the limit, we continue checking the next clause with the original, unrefined model. This also retires the incredibly hard to understand "maximum number of refinements" mechanism, because the current mechanism is more general and should catch the same exponential cases like PrelRules at the same time. ------------------------- Metric Decrease: T11822 -------------------------
* Add -Wderiving-defaults (#15839)Kari Pahula2019-09-252-0/+28
| | | | | | Enabling both DeriveAnyClass and GeneralizedNewtypeDeriving can cause a warning when no explicit deriving strategy is in use. This change adds an enable/suppress flag for it.
* Add -fkeep-going to make compiler continue despite errors (#15424)Kari Pahula2019-09-232-0/+15
| | | | | Add a new optional failure handling for upsweep which continues the compilation on other modules if any of them has errors.
* users-guide: Fix links and formats for GHC 8.10Takenobu Tani2019-09-237-24/+24
| | | | | | This commit only fixes links and markdown syntax. [skip ci]
* Module hierarchy: Hs (#13009)Sylvain Henry2019-09-201-5/+5
| | | | | | | Add GHC.Hs module hierarchy replacing hsSyn. Metric Increase: haddock.compiler
* users guide: Fix link to let generalization blog postBen Gamari2019-09-191-1/+2
| | | | Fixes #17200.
* eventlog: Add biographical and retainer profiling tracesMatthew Pickering2019-09-172-1/+18
| | | | | | | | | | This patch adds a new eventlog event which indicates the start of a biographical profiler sample. These are different to normal events as they also include the timestamp of when the census took place. This is because the LDV profiler only emits samples at the end of the run. Now all the different profiling modes emit consumable events to the eventlog.
* Encode shape information in `PmOracle`Sebastian Graf2019-09-161-43/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we had an elaborate mechanism for selecting the warnings to generate in the presence of different `COMPLETE` matching groups that, albeit finely-tuned, produced wrong results from an end user's perspective in some cases (#13363). The underlying issue is that at the point where the `ConVar` case has to commit to a particular `COMPLETE` group, there's not enough information to do so and the status quo was to just enumerate all possible complete sets nondeterministically. The `getResult` function would then pick the outcome according to metrics defined in accordance to the user's guide. But crucially, it lacked knowledge about the order in which affected clauses appear, leading to the surprising behavior in #13363. In !1010 we taught the term oracle to reason about literal values a variable can certainly not take on. This MR extends that idea to `ConLike`s and thereby fixes #13363: Instead of committing to a particular `COMPLETE` group in the `ConVar` case, we now split off the matching constructor incrementally and record the newly covered case as a refutable shape in the oracle. Whenever the set of refutable shapes covers any `COMPLETE` set, the oracle recognises vacuosity of the uncovered set. This patch goes a step further: Since at this point the information in value abstractions is merely a cut down representation of what the oracle knows, value abstractions degenerate to a single `Id`, the semantics of which is determined by the oracle state `Delta`. Value vectors become lists of `[Id]` given meaning to by a single `Delta`, value set abstractions (of which the uncovered set is an instance) correspond to a union of `Delta`s which instantiate the same `[Id]` (akin to models of formula). Fixes #11528 #13021, #13363, #13965, #14059, #14253, #14851, #15753, #17096, #17149 ------------------------- Metric Decrease: ManyAlternatives T11195 -------------------------
* Fix CONLIKE typotaylorfausak2019-09-141-1/+1
|
* Fix StandaloneDerivingNingning Xie2019-09-121-1/+1
| | | | | If I understand correctly, `deriving instance _ => Eq (Foo a)` is equivalent to `data Foo a deriving Eq`, rather than `data Foo a deriving Foo`.
* Module hierarchy: StgToCmm (#13009)Sylvain Henry2019-09-101-1/+1
| | | | | | Add StgToCmm module hierarchy. Platform modules that are used in several other places (NCG, LLVM codegen, Cmm transformations) are put into GHC.Platform.
* Add a new flag -dno-typeable-binds for debuggingÖmer Sinan Ağacan2019-09-081-0/+12
| | | | | See the user manual entry -- this helps when debugging as generated Core gets smaller without these bindings.
* Balance parentheses in GHC 8.10.1 release notesRyan Scott2019-08-281-3/+3
| | | | [ci skip]
* Fix documentationmniip2019-08-071-2/+2
|
* Explicitly number equations when printing axiom incompatibilitiesmniip2019-08-071-5/+5
|
* Add a -fprint-axiom-incomps option (#15546)mniip2019-08-072-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | Supply branch incomps when building an IfaceClosedSynFamilyTyCon `pprTyThing` now has access to incomps. This also causes them to be written out to .hi files, but that doesn't pose an issue other than a more faithful bijection between `tyThingToIfaceDecl` and `tcIfaceDecl`. The machinery for displaying axiom incomps was already present but not in use. Since this is now a thing that pops up in ghci's :info the format was modified to look like a haskell comment. Documentation and a test for the new feature included. Test Plan: T15546 Reviewers: simonpj, bgamari, goldfire Reviewed By: simonpj Subscribers: rwbarton, carter GHC Trac Issues: #15546 Differential Revision: https://phabricator.haskell.org/D5097
* docs: fixs -prof links in rts-flags sectionAdam Sandberg Eriksson2019-08-021-7/+6
|
* Add StandaloneDeriving example for DerivingVia.Andreas Klebinger2019-08-021-0/+6
| | | | [skip-ci]
* Change behaviour of -ddump-cmm-verbose to dump each Cmm pass output to a ↵nineonine2019-07-261-2/+9
| | | | separate file and add -ddump-cmm-verbose-by-proc to keep old behaviour (#16930)
* users-guide: corrected -fmax-relevant-binds reverse to be ↵James Foster2019-07-191-3/+3
| | | | -fno-max-relevant-binds
* Expunge #ifdef and #ifndef from the codebaseJohn Ericson2019-07-142-6/+6
| | | | | | | | These are unexploded minds as far as the linter is concerned. I don't want to hit in my MRs by mistake! I did this with `sed`, and then rolled back some changes in the docs, config.guess, and the linter itself.
* Improve doc for :type-at. (#14780)Roland Senn2019-06-271-1/+8
|
* Add -Wmissing-safe-haskell-mode warningOleg Grenrus2019-06-251-1/+17
|
* Add -Winferred-safe-imports warningOleg Grenrus2019-06-251-1/+34
| | | | | | | | | | | | | This commit partly reverts e69619e923e84ae61a6bb4357f06862264daa94b commit by reintroducing Sf_SafeInferred SafeHaskellMode. We preserve whether module was declared or inferred Safe. When declared-Safe module imports inferred-Safe, we warn. This inferred status is volatile, often enough it's a happy coincidence, something which cannot be relied upon. However, explicitly Safe or Trustworthy packages won't accidentally become Unsafe. Updates haddock submodule.
* Bump containers submodule to v0.6.2.1Ben Gamari2019-06-253-3/+3
|