Add Data.Version.makeVersion & `IsList Version`

These two facilities provide some means to avoid the double-breakage caused by
first by the deprecation (see #2496), and then again by the actual future
field-removal.

See also

  https://groups.google.com/d/msg/haskell-core-libraries/q9H-QlL_gnE/4lbb_mBjre8J

for details about this library addition.

Reviewed By: ekmett

Differential Revision: https://phabricator.haskell.org/D577
Consider equality contexts exotic, uninferrable by "deriving"

See comments in #8984. This takes back the fix for #6088.
Merge some instances from th-orphans.
Clarify that declaration splices exist at top level only. (#9880)
Update release notes for recent language and TH changes.
Add Jan Stolarek's test for Trac #9872
Add instance Lift Natural
Update Cabal submodule to latest 1.22 branch tip
Update directory submodule to latest snapshot

This pulls in

> make `getModificationTime` support sub-second resolution on windows
Update Cabal submodule to latest 1.22 branch tip
Update hoopl submodule to 3.10.0.2 rls

[skip ci]
Improved Backpack IR description. [skip ci]

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Optimize flattener by trying to reduce a TF before reducing its args.

This has a demonstrated 2x speed boost on the T9872{a,b,c} tests.
(#9872)
Change performance numbers for T3064
Use a new $b prefix for pattern synonym builder names, instead of re-using $W from wrappers
add runMeta hook

Summary:
The runMeta hook can be used to override how metaprogramming expressions
are evaluated. It makes the metaprogramming request types explicit and
has access to the TcM monad. This makes it a much more convenient starting
point for implementing out of process Template Haskell than the existing
hscCompileCoreExpr hook.

Reviewers: hvr, edsko, austin, simonpj

Reviewed By: austin

Subscribers: thomie, carter

Differential Revision: https://phabricator.haskell.org/D501
trac #9744, make program name and product version configurable through DynFlags/Settings

Summary:

This allows GHC API clients to use a package database and dynamic
library names that do not clash with those of the host GHC

This also updates the Haddock submodule.

Reviewers: hvr, austin

Reviewed By: austin

Subscribers: thomie, carter

Differential Revision: https://phabricator.haskell.org/D496
Check dflags for language extensions when deciding if "foreign " and "deriving "
look like prefixes of valid declarations (fixes #9915)
Add expected output to T9915 test
Injective type families

Represent injectivity conditions as names, not TyVars
Remove 'result' from the parser
Fix comment wibbles
Minor refactoring

Implement rwbarton's syntax proposal

Represent type family kind signature using new datatype
Attempt to bring return tyfam variable into scope
Differential Revision: https://phabricator.haskell.org/D202
Fix "Not in scope" bug

Add injectivity information to SynTyCon constructor

Implement checking of injectivity condition written by the user
Remove unused parameter from doTopReactFunEq
Allow injectivity in some arguments (renamer)
Improve error handling when renaming injectivity conditions
Revert "Add injectivity information to FamInst and interface files"

Supply injectivity info when looking for open type family conflicts

Working prototype for open type families
Add some tests

Validate that all injective LHS vars appear in RHS

Richard's comments
Use hsep and <+> to format error messages
Comments only
Renamer tests and bugfixes
Remove unnecessary info from injectivity declaration in typechecker

WIP on injectivity checks for open type families

Fix error handling in the renamer

Improving error messages and testing

WIP on injectivity checks for open type families

Fix error handling in the renamer
Improving error messages and testing
Formatting fixes
Change definition of askNoErrs following Simon's suggestions
Testsuite wibbles
Add Simon's proposed checkNoErrs (commented out)
Improve FamilyResultSig comment per Simon's suggestion
Introduce LInjectivityInfo per RAE's suggestion
InjectivityInfo -> InjectivityDecl. Comments
fdKindSig -> fdResultSig

existsSignature -> hasReturnKindSignature. Haddock

extractInjectivityInformation -> getInjectivityInformation

Clean up rn_injectivity

Clean up FamInst and FamInstEnv

KindedTyVarSig -> TyVarSig

KindOnlySig -> KindSig

Add filterByList. Some comments

More tests

Comments only
Fix build errors after rebase
Refactoring + testsuite wibbles

unsafeSynTyConInjectivityInfo -> synTyConInjectivityInfo

Name refactoring + comments

Check for result shadowing with type classes

More tests
Fis usage of is/are in error message
Comments only

Display injectivity info with --show-iface

Conflicts:
	compiler/iface/BuildTyCl.lhs
	compiler/iface/IfaceSyn.lhs
	compiler/iface/MkIface.lhs
	compiler/iface/TcIface.lhs
	compiler/prelude/TysPrim.lhs
	compiler/typecheck/TcTyClsDecls.lhs
	compiler/typecheck/TcTypeNats.hs
	compiler/types/TyCon.lhs
	compiler/vectorise/Vectorise/Type/Env.hs

Represent injectivity info in SynTyCon as a Maybe

This is important for type synonyms because we don't track injectivity information for them

Conflicts:
	compiler/iface/BuildTyCl.lhs
	compiler/iface/IfaceSyn.lhs
	compiler/iface/MkIface.lhs
	compiler/prelude/TysPrim.lhs
	compiler/typecheck/TcTyClsDecls.lhs
	compiler/types/TyCon.lhs
	compiler/vectorise/Vectorise/Type/Env.hs

Comments + tests

Include kindvars in injectivity list. Fix #73

Fix compilation failures after rebase

Fix resVar reconstruction from interface file

Allow polymorphic result variables. Fixes #71

Fix default initial kind for type families

Fixes #82

Remove extra parameter to bindHsTyVars

Fixes #79

Comment typo

Comment typo

Attempt to fix parser compilation errors after rebase

Fix compilation errors in parser

Make fdResultSig located as per alanz's suggestion

Fix injectivity check for open type families

Previously I used some ad-hoc hack, now I have an algorithm that
seems to be correct. I also added some stub comments. Need to add
more later

Add GHCi tests for injectivity

Comments only

Comments only

Check injectivity in .hs-boot files

Remove references to SynTyCon from comments

And do a minor name refactoring in the vectorizer

Document injective type families in the source code

Minor comment tweaks

Fix bug in optimizing injectivity check. Fixes #90

See Note [Skipping injectivity check for empty environments]

Introduce FamInstCheckType instead of Bool

Fixes #86

Clean up Notes

- convert to block comments
- move Note [Injectivity check ...] from FamInst to FamInstEnv

Revert "Clean up Notes"

This reverts commit eb937f47705b85579f76b8b05342af1541b384db.

Move Note [Injectivity ...] from FamInst to FamInstEnv

Clean up rnFamDecl according to RAE's suggestions

Clean up pretty printing

Clean up getFamDeclInitialKind

Clean up injectiveBranches

Create a separate function for finding injectivity conflicts

Refactor common logic to checkForInjectivityConflicts

Shorten error message

injectivity declaration -> injectivity annotation

Fixes #92

Remove injectivity environment

Code cleanup according to Richard's suggestions

Comment only

Use promoted types to labex axiom branchness

Fixes #89

Injectivity check for closed type families

 * reject equations with unused tyvars in the RHS
 * reject equations that use type families
 * erro fix for open type families

Provisional injectivity check for closed type families

Port open type family tests to closed type families

These tests are not yet exhaustive - they don't test propertied
typical to closed type families (like overlapp)

HAck injectivity check with overlap

Tests for closed type families

Comments only

Add injectivity support in Template Haskell

Injectivity in Template Haskell - work in progress

Update haddock submodule

Fix panic with data families

Fix TH pprinting error

Remove TcCanonical.lhs (added accidentally during merge)

Reorder fields of FamilyDecl

Names refactoring