Zubin pushed to branch wip/9.12.3-backports at Glasgow Haskell Compiler / GHC
Commits:
-
1d4e8c67
by Ryan Hendrickson at 2025-09-18T00:15:51+05:30
-
4d1131df
by Ryan Hendrickson at 2025-09-18T00:15:51+05:30
-
720ece2b
by Ryan Hendrickson at 2025-09-18T00:15:51+05:30
-
7ff47bbc
by Ryan Hendrickson at 2025-09-18T00:15:51+05:30
-
2fb1342a
by Zubin Duggal at 2025-09-18T00:15:51+05:30
-
0779eccc
by Zubin Duggal at 2025-09-18T00:15:51+05:30
-
84381617
by Zubin Duggal at 2025-09-18T00:15:51+05:30
-
584d2be9
by Zubin Duggal at 2025-09-18T00:15:51+05:30
-
1e607493
by Zubin Duggal at 2025-09-18T00:15:51+05:30
-
98bfc9d5
by Zubin Duggal at 2025-09-18T00:15:51+05:30
-
40cf4f39
by Zubin Duggal at 2025-09-18T00:15:51+05:30
30 changed files:
- configure.ac
- docs/users_guide/9.12.3-notes.rst
- hadrian/src/Settings/Warnings.hs
- libraries/base/base.cabal.in
- libraries/base/changelog.md
- libraries/exceptions
- libraries/os-string
- libraries/process
- libraries/text
- libraries/unix
- testsuite/driver/testlib.py
- testsuite/tests/driver/T20604/T20604.stdout
- testsuite/tests/haddock/haddock_testsuite/Makefile
- + testsuite/tests/haddock/haddock_testsuite/T26114.hs
- + testsuite/tests/haddock/haddock_testsuite/T26114.stdout
- testsuite/tests/haddock/haddock_testsuite/all.T
- testsuite/tests/polykinds/T14172.stderr
- utils/haddock/CHANGES.md
- utils/haddock/haddock-api/src/Haddock/Interface/AttachInstances.hs
- utils/haddock/haddock-api/src/Haddock/Interface/Create.hs
- utils/haddock/haddock-api/src/Haddock/Interface/LexParseRn.hs
- utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs
- utils/haddock/haddock-api/src/Haddock/Types.hs
- utils/haddock/haddock-library/src/Documentation/Haddock/Parser.hs
- utils/haddock/haddock-library/test/Documentation/Haddock/ParserSpec.hs
- utils/haddock/haddock-test/src/Test/Haddock/Config.hs
- utils/haddock/html-test/ref/Bug1004.html
- utils/haddock/html-test/ref/PatternSyns.html
- utils/haddock/html-test/ref/TypeOperators.html
- utils/haddock/html-test/src/TypeOperators.hs
Changes:
| ... | ... | @@ -22,7 +22,7 @@ AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.12.2], [glasgow-ha |
| 22 | 22 | AC_CONFIG_MACRO_DIRS([m4])
|
| 23 | 23 | |
| 24 | 24 | # Set this to YES for a released version, otherwise NO
|
| 25 | -: ${RELEASE=YES}
|
|
| 25 | +: ${RELEASE=NO}
|
|
| 26 | 26 | |
| 27 | 27 | # The primary version (e.g. 7.5, 7.4.1) is set in the AC_INIT line
|
| 28 | 28 | # above. If this is not a released version, then we will append the
|
| ... | ... | @@ -13,6 +13,83 @@ Compiler |
| 13 | 13 | |
| 14 | 14 | - Fixed re-exports of ``MkSolo`` and ``MkSolo#`` (:ghc-ticket:`25182`)
|
| 15 | 15 | - Fixed the behavior of ``Language.Haskell.TH.mkName "FUN"`` (:ghc-ticket:`25174`)
|
| 16 | +- Fixed miscompilation involving ``zonkEqTypes`` on ``AppTy/AppTy`` (:ghc-ticket:`26256`)
|
|
| 17 | +- Fixed CprAnal to detect recursive newtypes (:ghc-ticket:`25944`)
|
|
| 18 | +- Fixed specialisation of incoherent instances (:ghc-ticket:`25883`)
|
|
| 19 | +- Fixed bytecode generation for ``tagToEnum# <LITERAL>`` (:ghc-ticket:`25975`)
|
|
| 20 | +- Fixed panic with EmptyCase and RequiredTypeArguments (:ghc-ticket:`25004`)
|
|
| 21 | +- Fixed ``tyConStupidTheta`` to handle ``PromotedDataCon`` (:ghc-ticket:`25739`)
|
|
| 22 | +- Fixed unused import warnings for duplicate record fields (:ghc-ticket:`24035`)
|
|
| 23 | +- Fixed lexing of ``"\^\"`` (:ghc-ticket:`25937`)
|
|
| 24 | +- Fixed string gap collapsing (:ghc-ticket:`25784`)
|
|
| 25 | +- Fixed lexing of comments in multiline strings (:ghc-ticket:`25609`)
|
|
| 26 | +- Made unexpected LLVM versions a warning rather than an error (:ghc-ticket:`25915`)
|
|
| 27 | +- Disabled ``-fprof-late-overloaded-calls`` for join points to avoid invalid transformations
|
|
| 28 | +- Fixed bugs in ``integerRecipMod`` and ``integerPowMod`` (:ghc-ticket:`26017`)
|
|
| 29 | +- Fixed ``naturalAndNot`` for NB/NS case (:ghc-ticket:`26230`)
|
|
| 30 | +- Fixed ``ds_ev_typeable`` to use ``mkTrAppChecked`` (:ghc-ticket:`25998`)
|
|
| 31 | +- Fixed GHC settings to always unescape escaped spaces (:ghc-ticket:`25204`)
|
|
| 32 | +- Fixed issue with HasCallStack constraint caching (:ghc-ticket:`25529`)
|
|
| 33 | +- Fixed archive member size writing logic in ``GHC.SysTools.Ar`` (:ghc-ticket:`26120`, :ghc-ticket:`22586`)
|
|
| 34 | + |
|
| 35 | +Runtime System
|
|
| 36 | +~~~~~~~~~~~~~~
|
|
| 37 | + |
|
| 38 | +- Fixed ``MessageBlackHole.link`` to always be a valid closure
|
|
| 39 | +- Fixed handling of WHITEHOLE in ``messageBlackHole`` (:ghc-ticket:`26205`)
|
|
| 40 | +- Fixed ``rts_clearMemory`` logic when sanity checks are enabled (:ghc-ticket:`26011`)
|
|
| 41 | +- Fixed underflow frame lookups in the bytecode interpreter (:ghc-ticket:`25750`)
|
|
| 42 | +- Fixed overflows and reentrancy in interpreter statistics calculation (:ghc-ticket:`25756`)
|
|
| 43 | +- Fixed INTERP_STATS profiling code (:ghc-ticket:`25695`)
|
|
| 44 | +- Removed problematic ``n_free`` variable from nonmovingGC (:ghc-ticket:`26186`)
|
|
| 45 | +- Fixed incorrect format specifiers in era profiling
|
|
| 46 | +- Improved documentation of SLIDE and PACK bytecode instructions
|
|
| 47 | +- Eliminated redundant ``SLIDE x 0`` bytecode instructions
|
|
| 48 | +- Fixed compile issues on powerpc64 ELF v1
|
|
| 49 | + |
|
| 50 | +Code Generation
|
|
| 51 | +~~~~~~~~~~~~~~~
|
|
| 52 | + |
|
| 53 | +- Fixed LLVM built-in variable predicate (was checking ``$llvm`` instead of ``@llvm``)
|
|
| 54 | +- Fixed linkage of built-in arrays for LLVM (:ghc-ticket:`25769`)
|
|
| 55 | +- Fixed code generation for SSE vector operations (:ghc-ticket:`25859`)
|
|
| 56 | +- Fixed ``bswap64`` code generation on i386 (:ghc-ticket:`25601`)
|
|
| 57 | +- Fixed sub-word arithmetic right shift on AArch64 (:ghc-ticket:`26061`)
|
|
| 58 | +- Fixed LLVM vector literal emission to include type information
|
|
| 59 | +- Fixed LLVM version detection
|
|
| 60 | +- Fixed typo in ``padLiveArgs`` that caused segfaults (:ghc-ticket:`25770`, :ghc-ticket:`25773`)
|
|
| 61 | +- Fixed constant-folding for Word->Float bitcasts
|
|
| 62 | +- Added surface syntax for Word/Float bitcast operations
|
|
| 63 | +- Fixed ``MOVD`` format in x86 NCG for ``unpackInt64X2#``
|
|
| 64 | +- Added ``-finter-module-far-jumps`` flag for AArch64
|
|
| 65 | +- Fixed RV64 J instruction handling for non-local jumps (:ghc-ticket:`25738`)
|
|
| 66 | +- Reapplied division by constants optimization
|
|
| 67 | +- Fixed TNTC to set CmmProc entry_label properly (:ghc-ticket:`25565`)
|
|
| 68 | + |
|
| 69 | +Linker
|
|
| 70 | +~~~~~~
|
|
| 71 | + |
|
| 72 | +- Improved efficiency of proddable blocks structure (:ghc-ticket:`26009`)
|
|
| 73 | +- Fixed Windows DLL loading to avoid redundant ``LoadLibraryEx`` calls (:ghc-ticket:`26009`)
|
|
| 74 | +- Fixed incorrect use of ``break`` in nested for loop (:ghc-ticket:`26052`)
|
|
| 75 | +- Fixed linker to not fail due to ``RTLD_NOW`` (:ghc-ticket:`25943`)
|
|
| 76 | +- Dropped obsolete Windows XP compatibility checks
|
|
| 77 | + |
|
| 78 | +GHCi
|
|
| 79 | +~~~~
|
|
| 80 | + |
|
| 81 | +- Fixed ``mkTopLevEnv`` to use ``loadInterfaceForModule`` instead of ``loadSrcInterface`` (:ghc-ticket:`25951`)
|
|
| 82 | + |
|
| 83 | +Template Haskell
|
|
| 84 | +~~~~~~~~~~~~~~~~
|
|
| 85 | + |
|
| 86 | +- Added explicit export lists to all remaining template-haskell modules
|
|
| 87 | + |
|
| 88 | +Build system
|
|
| 89 | +~~~~~~~~~~~~~~~~
|
|
| 90 | + |
|
| 91 | +- Exposed all of Backtraces' internals for ghc-internal (:ghc-ticket:`26049`)
|
|
| 92 | +- Fixed cross-compilation configuration override (:ghc-ticket:`26236`)
|
|
| 16 | 93 | |
| 17 | 94 | Included libraries
|
| 18 | 95 | ~~~~~~~~~~~~~~~~~~
|
| ... | ... | @@ -43,7 +43,9 @@ ghcWarningsArgs = do |
| 43 | 43 | , package base ? pure [ "-Wno-trustworthy-safe" ]
|
| 44 | 44 | , package binary ? pure [ "-Wno-deprecations" ]
|
| 45 | 45 | , package bytestring ? pure [ "-Wno-inline-rule-shadowing" ]
|
| 46 | - , package compiler ? pure [ "-Wcpp-undef" ]
|
|
| 46 | + , package compiler ? pure [ "-Wcpp-undef"
|
|
| 47 | + , "-Wno-deprecations"
|
|
| 48 | + ]
|
|
| 47 | 49 | , package directory ? pure [ "-Wno-unused-imports"
|
| 48 | 50 | , "-Wno-deprecations" -- https://gitlab.haskell.org/ghc/ghc/-/issues/24240
|
| 49 | 51 | ]
|
| ... | ... | @@ -63,6 +65,7 @@ ghcWarningsArgs = do |
| 63 | 65 | , "-Wno-redundant-constraints"
|
| 64 | 66 | , "-Wno-simplifiable-class-constraints"
|
| 65 | 67 | , "-Wno-deriving-typeable" ]
|
| 68 | + , package osString ? pure [ "-Wno-unused-imports" ]
|
|
| 66 | 69 | , package pretty ? pure [ "-Wno-unused-imports" ]
|
| 67 | 70 | , package primitive ? pure [ "-Wno-unused-imports"
|
| 68 | 71 | , "-Wno-deprecations" ]
|
| ... | ... | @@ -4,7 +4,7 @@ cabal-version: 3.0 |
| 4 | 4 | -- Make sure you are editing ghc-experimental.cabal.in, not ghc-experimental.cabal
|
| 5 | 5 | |
| 6 | 6 | name: base
|
| 7 | -version: 4.21.0.0
|
|
| 7 | +version: 4.21.1.0
|
|
| 8 | 8 | -- NOTE: Don't forget to update ./changelog.md
|
| 9 | 9 | |
| 10 | 10 | license: BSD-3-Clause
|
| 1 | 1 | # Changelog for [`base` package](http://hackage.haskell.org/package/base)
|
| 2 | 2 | |
| 3 | -## 4.21.2.0 *Sept 2024*
|
|
| 4 | - * Fix bug where `naturalAndNot` was incorrectly truncating results ([CLC proposal #350](github.com/haskell/core-libraries-committee/issues/350))
|
|
| 5 | - |
|
| 6 | 3 | ## 4.21.1.0 *Sept 2024*
|
| 7 | 4 | * Fix incorrect results of `integerPowMod` when the base is 0 and the exponent is negative, and `integerRecipMod` when the modulus is zero ([#26017](https://gitlab.haskell.org/ghc/ghc/-/issues/26017)).
|
| 5 | + * Fix bug where `naturalAndNot` was incorrectly truncating results ([CLC proposal #350](github.com/haskell/core-libraries-committee/issues/350))
|
|
| 8 | 6 | |
| 9 | 7 | ## 4.21.0.0 *December 2024*
|
| 10 | 8 | * Shipped with GHC 9.12.1
|
| 1 | -Subproject commit 8e55b720f45db91f4895f710863ef9dbc10fe569 |
|
| 1 | +Subproject commit b3a88ccc70acd7aa83be64235ab8c3ef1f08e96b |
| 1 | -Subproject commit 4b5efedcd2da9314edda80d973a44e67020370db |
|
| 1 | +Subproject commit c08666bf7bf528e607fc1eacc20032ec59e69df3 |
| 1 | -Subproject commit 9c3bfc214c72bbd0c8a30a1c41465deed0feaf47 |
|
| 1 | +Subproject commit f7d51387ba7f7f6079f3a9d5ce011ad9359b7dbb |
| 1 | -Subproject commit b86564cae8d7262c7c4e7afe7a9163c83de3f175 |
|
| 1 | +Subproject commit 5f343f668f421bfb30cead594e52d0ac6206ff67 |
| 1 | -Subproject commit 74ae1c0d9dd1518434f7d6cd3e63d7769599e0f9 |
|
| 1 | +Subproject commit 90e7d70de337ad759102b2445ebef6980684a9d3 |
| ... | ... | @@ -1725,7 +1725,7 @@ async def do_test(name: TestName, |
| 1725 | 1725 | dst_makefile = in_testdir('Makefile')
|
| 1726 | 1726 | if src_makefile.exists():
|
| 1727 | 1727 | makefile = src_makefile.read_text(encoding='UTF-8')
|
| 1728 | - makefile = re.sub('TOP=.*', 'TOP=%s' % config.top, makefile, 1)
|
|
| 1728 | + makefile = re.sub('TOP=.*', 'TOP=%s' % config.top, makefile, count=1)
|
|
| 1729 | 1729 | dst_makefile.write_text(makefile, encoding='UTF-8')
|
| 1730 | 1730 | |
| 1731 | 1731 | if opts.pre_cmd:
|
| 1 | 1 | A1
|
| 2 | 2 | A
|
| 3 | -addDependentFile "/home/teo/git/ghc/_build/stage1/lib/../lib/x86_64-linux-ghc-9.11.20240508/libHSghc-prim-0.11.0-inplace-ghc9.11.20240508.so" a63ccfcae8455a0abc22cfbd2ee0fee4
|
|
| 4 | -addDependentFile "/home/teo/git/ghc/_build/stage1/lib/../lib/x86_64-linux-ghc-9.11.20240508/libHSghc-bignum-1.3-inplace-ghc9.11.20240508.so" fe8ae214b210d7ae50739f9b74c6d3bc
|
|
| 5 | -addDependentFile "/home/teo/git/ghc/_build/stage1/lib/../lib/x86_64-linux-ghc-9.11.20240508/libHSghc-internal-9.1001.0-inplace-ghc9.11.20240508.so" cce9e35d3fb6c65a080cdb8a570f3caf |
|
| 3 | +addDependentFile "/home/zubin/ghcs/unicode-lex/_build_devel2/stage1/lib/../lib/x86_64-linux-ghc-9.10.2.20250728/ghc-prim-0.12.0-inplace/libHSghc-prim-0.12.0-inplace.a" 019a1208b8742850eeb197adcf0445f3
|
|
| 4 | +addDependentFile "/home/zubin/ghcs/unicode-lex/_build_devel2/stage1/lib/../lib/x86_64-linux-ghc-9.10.2.20250728/ghc-bignum-1.3-inplace/libHSghc-bignum-1.3-inplace.a" ca54044c2ea501531ac3016a72a9d92b
|
|
| 5 | +addDependentFile "/home/zubin/ghcs/unicode-lex/_build_devel2/stage1/lib/../lib/x86_64-linux-ghc-9.10.2.20250728/ghc-internal-9.1002.0-inplace/libHSghc-internal-9.1002.0-inplace.a" 1c2b59e426d6ae9172eb46d890155e19
|
|
| 6 | +addDependentFile "/home/zubin/ghcs/unicode-lex/_build_devel2/stage1/lib/../lib/x86_64-linux-ghc-9.10.2.20250728/base-4.20.2.0-inplace/libHSbase-4.20.2.0-inplace.a" 820a64d9cb81281e10660ded650e973f
|
|
| 7 | +addDependentFile "/home/zubin/ghcs/unicode-lex/_build_devel2/stage1/lib/../lib/x86_64-linux-ghc-9.10.2.20250728/ghc-boot-th-9.10.2.20250728-inplace/libHSghc-boot-th-9.10.2.20250728-inplace.a" 47565629d3614763d649bde91000bf42
|
|
| 8 | +addDependentFile "/home/zubin/ghcs/unicode-lex/_build_devel2/stage1/lib/../lib/x86_64-linux-ghc-9.10.2.20250728/array-0.5.8.0-inplace/libHSarray-0.5.8.0-inplace.a" 7fb37d6d03900a689d24212e83d3f729
|
|
| 9 | +addDependentFile "/home/zubin/ghcs/unicode-lex/_build_devel2/stage1/lib/../lib/x86_64-linux-ghc-9.10.2.20250728/deepseq-1.5.0.0-inplace/libHSdeepseq-1.5.0.0-inplace.a" 316be3ed9f3b5e893b2eb9924f8bb698
|
|
| 10 | +addDependentFile "/home/zubin/ghcs/unicode-lex/_build_devel2/stage1/lib/../lib/x86_64-linux-ghc-9.10.2.20250728/pretty-1.1.3.6-inplace/libHSpretty-1.1.3.6-inplace.a" ab975b458837cd4dd7a38be2c7e71603
|
|
| 11 | +addDependentFile "/home/zubin/ghcs/unicode-lex/_build_devel2/stage1/lib/../lib/x86_64-linux-ghc-9.10.2.20250728/template-haskell-2.22.0.0-inplace/libHStemplate-haskell-2.22.0.0-inplace.a" 8520e0f59701ce4073df664d176ade9c |
| ... | ... | @@ -76,3 +76,7 @@ hypsrcTest: |
| 76 | 76 | .PHONY: haddockForeignTest
|
| 77 | 77 | haddockForeignTest:
|
| 78 | 78 | '$(HADDOCK)' A.hs B.hs F.hs arith.c
|
| 79 | + |
|
| 80 | +.PHONY: T26114
|
|
| 81 | +T26114:
|
|
| 82 | + '$(HADDOCK)' T26114.hs |
| 1 | +{-# LANGUAGE TypeFamilies #-}
|
|
| 2 | + |
|
| 3 | +-- | Module
|
|
| 4 | +module T26114 where
|
|
| 5 | + |
|
| 6 | +-- | C1
|
|
| 7 | +class C1 t where
|
|
| 8 | + type C2 t
|
|
| 9 | + |
|
| 10 | +-- | A
|
|
| 11 | +data A = A
|
|
| 12 | + |
|
| 13 | +instance C1 A where
|
|
| 14 | + type C2 A = B
|
|
| 15 | + |
|
| 16 | +-- | B
|
|
| 17 | +data B = B
|
|
| 18 | + |
|
| 19 | +instance C1 B where
|
|
| 20 | + type C2 B = C
|
|
| 21 | + |
|
| 22 | +-- | C
|
|
| 23 | +data C = C |
| 1 | +[1 of 1] Compiling T26114 ( T26114.hs, nothing )
|
|
| 2 | +Haddock coverage:
|
|
| 3 | + 100% ( 5 / 5) in 'T26114' |
| ... | ... | @@ -24,3 +24,8 @@ test('haddockForeignTest', |
| 24 | 24 | [ignore_stdout, ignore_stderr, req_haddock, extra_files(['./haddock-th-foreign-repro/A.hs', './haddock-th-foreign-repro/B.hs', './haddock-th-foreign-repro/F.hs', './haddock-th-foreign-repro/arith.c'])],
|
| 25 | 25 | makefile_test,
|
| 26 | 26 | ['haddockForeignTest'])
|
| 27 | + |
|
| 28 | +test('T26114',
|
|
| 29 | + [ignore_stderr, req_haddock, extra_files(['T26114.hs'])],
|
|
| 30 | + makefile_test,
|
|
| 31 | + ['T26114']) |
| 1 | 1 | T14172.hs:7:46: error: [GHC-88464]
|
| 2 | - • Found type wildcard ‘_’ standing for ‘a'1 :: k0’
|
|
| 3 | - Where: ‘k0’ is an ambiguous type variable
|
|
| 2 | + • Found type wildcard ‘_’ standing for ‘a'1 :: k30’
|
|
| 3 | + Where: ‘k30’ is an ambiguous type variable
|
|
| 4 | 4 | ‘a'1’ is an ambiguous type variable
|
| 5 | 5 | To use the inferred type, enable PartialTypeSignatures
|
| 6 | 6 | • In the first argument of ‘h’, namely ‘_’
|
| 1 | 1 | ## Changes in 2.32.0
|
| 2 | 2 | * Add highlighting for inline-code-blocks (sections enclosed in @'s)
|
| 3 | 3 | |
| 4 | + * Fix missing documentation for orphan instances from other packages.
|
|
| 5 | + |
|
| 4 | 6 | * Add incremental mode to support rendering documentation one module at a time.
|
| 5 | 7 | |
| 6 | 8 | * The flag `--no-compilation` has been added. This flag causes Haddock to avoid
|
| ... | ... | @@ -93,7 +93,10 @@ attachInstances expInfo ifaces instIfaceMap isOneShot = do |
| 93 | 93 | , fromOrig == Just True || not (null reExp)
|
| 94 | 94 | ]
|
| 95 | 95 | mods_to_load = moduleSetElts mods
|
| 96 | - mods_visible = mkModuleSet $ map ifaceMod ifaces
|
|
| 96 | + -- We need to ensure orphans in modules outside of this package are included.
|
|
| 97 | + -- See https://gitlab.haskell.org/ghc/ghc/-/issues/25147
|
|
| 98 | + -- and https://gitlab.haskell.org/ghc/ghc/-/issues/26079
|
|
| 99 | + mods_visible = mkModuleSet $ concatMap (liftA2 (:) ifaceMod ifaceOrphanDeps) ifaces
|
|
| 97 | 100 | |
| 98 | 101 | (_msgs, mb_index) <- do
|
| 99 | 102 | hsc_env <- getSession
|
| ... | ... | @@ -59,6 +59,7 @@ import GHC.Types.Name.Set |
| 59 | 59 | import GHC.Types.SafeHaskell
|
| 60 | 60 | import qualified GHC.Types.SrcLoc as SrcLoc
|
| 61 | 61 | import qualified GHC.Types.Unique.Map as UniqMap
|
| 62 | +import GHC.Unit.Module.Deps (dep_orphs)
|
|
| 62 | 63 | import GHC.Unit.Module.ModIface
|
| 63 | 64 | import GHC.Unit.State (PackageName (..), UnitState)
|
| 64 | 65 | import GHC.Utils.Outputable (SDocContext)
|
| ... | ... | @@ -270,6 +271,7 @@ createInterface1' flags unit_state dflags hie_file mod_iface ifaces inst_ifaces |
| 270 | 271 | , ifaceVisibleExports = visible_names
|
| 271 | 272 | , ifaceFixMap = fixities
|
| 272 | 273 | , ifaceInstances = instances
|
| 274 | + , ifaceOrphanDeps = dep_orphs $ mi_deps mod_iface
|
|
| 273 | 275 | , ifaceOrphanInstances = [] -- Filled in attachInstances
|
| 274 | 276 | , ifaceRnOrphanInstances = [] -- Filled in renameInterfaceRn
|
| 275 | 277 | , ifaceHaddockCoverage = coverage
|
| ... | ... | @@ -155,6 +155,7 @@ rename sDocContext renamer = rn |
| 155 | 155 | | otherwise = isTermVarOrFieldNameSpace
|
| 156 | 156 | typeNsChoices
|
| 157 | 157 | | isDataOcc occ = isTcClsNameSpace
|
| 158 | + | isSymOcc occ = isTcClsNameSpace
|
|
| 158 | 159 | | otherwise = isTvNameSpace
|
| 159 | 160 | -- Generate the choices for the possible kind of thing this
|
| 160 | 161 | -- is. We narrow down the possibilities with the namespace (if
|
| ... | ... | @@ -104,6 +104,7 @@ renameInterface dflags ignoreSet renamingEnv warnings hoogle iface = do |
| 104 | 104 | && isExternalName name
|
| 105 | 105 | && not (isBuiltInSyntax name)
|
| 106 | 106 | && not (isTyVarName name)
|
| 107 | + && not (isDerivedOccName $ nameOccName name)
|
|
| 107 | 108 | && Exact name /= eqTyCon_RDR
|
| 108 | 109 | -- Must not be in the set of ignored symbols for the module or the
|
| 109 | 110 | -- unqualified ignored symbols
|
| ... | ... | @@ -131,6 +131,9 @@ data Interface = Interface |
| 131 | 131 | -- Names from modules that are entirely re-exported don't count as visible.
|
| 132 | 132 | , ifaceInstances :: [ClsInst]
|
| 133 | 133 | -- ^ Instances exported by the module.
|
| 134 | + , ifaceOrphanDeps :: [Module]
|
|
| 135 | + -- ^ The list of modules to check for orphan instances if this module is
|
|
| 136 | + -- imported.
|
|
| 134 | 137 | , ifaceOrphanInstances :: [DocInstance GhcRn]
|
| 135 | 138 | -- ^ Orphan instances
|
| 136 | 139 | , ifaceRnOrphanInstances :: [DocInstance DocNameI]
|
| 1 | +{-# LANGUAGE LambdaCase #-}
|
|
| 1 | 2 | {-# LANGUAGE OverloadedStrings #-}
|
| 2 | 3 | {-# LANGUAGE ViewPatterns #-}
|
| 3 | 4 | |
| ... | ... | @@ -28,6 +29,7 @@ import Control.Applicative |
| 28 | 29 | import Control.Arrow (first)
|
| 29 | 30 | import Control.Monad
|
| 30 | 31 | import Data.Char (chr, isAlpha, isSpace, isUpper)
|
| 32 | +import Data.Functor (($>))
|
|
| 31 | 33 | import Data.List (elemIndex, intercalate, intersperse, unfoldr)
|
| 32 | 34 | import Data.Maybe (fromMaybe, mapMaybe)
|
| 33 | 35 | import Data.Monoid
|
| ... | ... | @@ -186,11 +188,29 @@ specialChar = "_/<@\"&'`#[ " |
| 186 | 188 | -- to ensure that we have already given a chance to more meaningful parsers
|
| 187 | 189 | -- before capturing their characters.
|
| 188 | 190 | string' :: Parser (DocH mod a)
|
| 189 | -string' = DocString . unescape . T.unpack <$> takeWhile1_ (`notElem` specialChar)
|
|
| 191 | +string' =
|
|
| 192 | + DocString
|
|
| 193 | + <$> ((:) <$> rawOrEscChar "" <*> many (rawOrEscChar "(["))
|
|
| 194 | + -- After the first character, stop for @\(@ or @\[@ math starters. (The
|
|
| 195 | + -- first character won't start a valid math string because this parser
|
|
| 196 | + -- should follow math parsers. But this parser is expected to accept at
|
|
| 197 | + -- least one character from all inputs that don't start with special
|
|
| 198 | + -- characters, so the first character parser can't have the @"(["@
|
|
| 199 | + -- restriction.)
|
|
| 190 | 200 | where
|
| 191 | - unescape "" = ""
|
|
| 192 | - unescape ('\\' : x : xs) = x : unescape xs
|
|
| 193 | - unescape (x : xs) = x : unescape xs
|
|
| 201 | + -- | Parse a single logical character, either raw or escaped. Don't accept
|
|
| 202 | + -- escaped characters from the argument string.
|
|
| 203 | + rawOrEscChar :: [Char] -> Parser Char
|
|
| 204 | + rawOrEscChar restrictedEscapes = try $ Parsec.noneOf specialChar >>= \case
|
|
| 205 | + -- Handle backslashes:
|
|
| 206 | + -- - Fail on forbidden escape characters.
|
|
| 207 | + -- - Non-forbidden characters: simply unescape, e.g. parse "\b" as 'b',
|
|
| 208 | + -- - Trailing backslash: treat it as a raw backslash, not an escape
|
|
| 209 | + -- sequence. (This is the logic that this parser followed when this
|
|
| 210 | + -- comment was written; it is not necessarily intentional but now I
|
|
| 211 | + -- don't want to break anything relying on it.)
|
|
| 212 | + '\\' -> Parsec.noneOf restrictedEscapes <|> Parsec.eof $> '\\'
|
|
| 213 | + c -> pure c
|
|
| 194 | 214 | |
| 195 | 215 | -- | Skips a single special character and treats it as a plain string.
|
| 196 | 216 | -- This is done to skip over any special characters belonging to other
|
| ... | ... | @@ -795,31 +815,33 @@ stripSpace = fromMaybe <*> mapM strip' |
| 795 | 815 | -- | Parses examples. Examples are a paragraph level entity (separated by an empty line).
|
| 796 | 816 | -- Consecutive examples are accepted.
|
| 797 | 817 | examples :: Parser (DocH mod a)
|
| 798 | -examples = DocExamples <$> (many (try (skipHorizontalSpace *> "\n")) *> go)
|
|
| 818 | +examples = DocExamples <$> (many (try (skipHorizontalSpace *> "\n")) *> go Nothing)
|
|
| 799 | 819 | where
|
| 800 | - go :: Parser [Example]
|
|
| 801 | - go = do
|
|
| 820 | + go :: Maybe Text -> Parser [Example]
|
|
| 821 | + go mbInitialIndent = do
|
|
| 802 | 822 | prefix <- takeHorizontalSpace <* ">>>"
|
| 823 | + initialIndent <- maybe takeHorizontalSpace pure mbInitialIndent
|
|
| 803 | 824 | expr <- takeLine
|
| 804 | - (rs, es) <- resultAndMoreExamples
|
|
| 805 | - return (makeExample prefix expr rs : es)
|
|
| 825 | + (rs, es) <- resultAndMoreExamples (Just initialIndent)
|
|
| 826 | + return (makeExample prefix initialIndent expr rs : es)
|
|
| 827 | + |
|
| 828 | + resultAndMoreExamples :: Maybe Text -> Parser ([Text], [Example])
|
|
| 829 | + resultAndMoreExamples mbInitialIndent = choice' [moreExamples, result, pure ([], [])]
|
|
| 806 | 830 | where
|
| 807 | - resultAndMoreExamples :: Parser ([Text], [Example])
|
|
| 808 | - resultAndMoreExamples = choice' [moreExamples, result, pure ([], [])]
|
|
| 809 | - where
|
|
| 810 | - moreExamples :: Parser ([Text], [Example])
|
|
| 811 | - moreExamples = (,) [] <$> go
|
|
| 831 | + moreExamples :: Parser ([Text], [Example])
|
|
| 832 | + moreExamples = (,) [] <$> go mbInitialIndent
|
|
| 812 | 833 | |
| 813 | - result :: Parser ([Text], [Example])
|
|
| 814 | - result = first . (:) <$> nonEmptyLine <*> resultAndMoreExamples
|
|
| 834 | + result :: Parser ([Text], [Example])
|
|
| 835 | + result = first . (:) <$> nonEmptyLine <*> resultAndMoreExamples Nothing
|
|
| 815 | 836 | |
| 816 | - makeExample :: Text -> Text -> [Text] -> Example
|
|
| 817 | - makeExample prefix expression res =
|
|
| 818 | - Example (T.unpack (T.strip expression)) result
|
|
| 837 | + makeExample :: Text -> Text -> Text -> [Text] -> Example
|
|
| 838 | + makeExample prefix indent expression res =
|
|
| 839 | + Example (T.unpack (tryStripIndent (T.stripEnd expression))) result
|
|
| 819 | 840 | where
|
| 820 | 841 | result = map (T.unpack . substituteBlankLine . tryStripPrefix) res
|
| 821 | 842 | |
| 822 | 843 | tryStripPrefix xs = fromMaybe xs (T.stripPrefix prefix xs)
|
| 844 | + tryStripIndent = liftA2 fromMaybe T.stripStart (T.stripPrefix indent)
|
|
| 823 | 845 | |
| 824 | 846 | substituteBlankLine "<BLANKLINE>" = ""
|
| 825 | 847 | substituteBlankLine xs = xs
|
| ... | ... | @@ -284,6 +284,13 @@ spec = do |
| 284 | 284 | it "supports title for deprecated picture syntax" $ do
|
| 285 | 285 | "<<b a z>>" `shouldParseTo` image "b" "a z"
|
| 286 | 286 | |
| 287 | + context "when parsing inline math" $ do
|
|
| 288 | + it "accepts inline math immediately after punctuation" $ do
|
|
| 289 | + "(\\(1 + 2 = 3\\) is an example of addition)"
|
|
| 290 | + `shouldParseTo` "("
|
|
| 291 | + <> DocMathInline "1 + 2 = 3"
|
|
| 292 | + <> " is an example of addition)"
|
|
| 293 | + |
|
| 287 | 294 | context "when parsing display math" $ do
|
| 288 | 295 | it "accepts markdown syntax for display math containing newlines" $ do
|
| 289 | 296 | "\\[\\pi\n\\pi\\]" `shouldParseTo` DocMathDisplay "\\pi\n\\pi"
|
| ... | ... | @@ -864,6 +871,29 @@ spec = do |
| 864 | 871 | it "accepts unicode in examples" $ do
|
| 865 | 872 | ">>> 灼眼\nシャナ" `shouldParseTo` DocExamples [Example "灼眼" ["シャナ"]]
|
| 866 | 873 | |
| 874 | + it "preserves indentation in consecutive example lines" $ do
|
|
| 875 | + unlines
|
|
| 876 | + [ ">>> line 1"
|
|
| 877 | + , ">>> line 2"
|
|
| 878 | + , ">>> line 3"
|
|
| 879 | + ]
|
|
| 880 | + `shouldParseTo` DocExamples
|
|
| 881 | + [ Example "line 1" []
|
|
| 882 | + , Example " line 2" []
|
|
| 883 | + , Example "line 3" []
|
|
| 884 | + ]
|
|
| 885 | + |
|
| 886 | + it "resets indentation after results" $ do
|
|
| 887 | + unlines
|
|
| 888 | + [ ">>> line 1"
|
|
| 889 | + , "result"
|
|
| 890 | + , ">>> line 2"
|
|
| 891 | + ]
|
|
| 892 | + `shouldParseTo` DocExamples
|
|
| 893 | + [ Example "line 1" ["result"]
|
|
| 894 | + , Example "line 2" []
|
|
| 895 | + ]
|
|
| 896 | + |
|
| 867 | 897 | context "when prompt is prefixed by whitespace" $ do
|
| 868 | 898 | it "strips the exact same amount of whitespace from result lines" $ do
|
| 869 | 899 | unlines
|
| ... | ... | @@ -262,6 +262,7 @@ baseDependencies ghcPath = do |
| 262 | 262 | pkgs =
|
| 263 | 263 | [ "array"
|
| 264 | 264 | , "base"
|
| 265 | + , "deepseq"
|
|
| 265 | 266 | , "ghc-prim"
|
| 266 | 267 | , "process"
|
| 267 | 268 | , "template-haskell"
|
| ... | ... | @@ -797,7 +797,55 @@ |
| 797 | 797 | ><tr
|
| 798 | 798 | ><td class="src clearfix"
|
| 799 | 799 | ><span class="inst-left"
|
| 800 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Alternative:8"
|
|
| 800 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:NFData1:8"
|
|
| 801 | + ></span
|
|
| 802 | + > (<a href="#" title="Control.DeepSeq"
|
|
| 803 | + >NFData1</a
|
|
| 804 | + > f, <a href="#" title="Control.DeepSeq"
|
|
| 805 | + >NFData1</a
|
|
| 806 | + > g) => <a href="#" title="Control.DeepSeq"
|
|
| 807 | + >NFData1</a
|
|
| 808 | + > (<a href="#" title="Bug1004"
|
|
| 809 | + >Product</a
|
|
| 810 | + > f g)</span
|
|
| 811 | + > <a href="#" class="selflink"
|
|
| 812 | + >#</a
|
|
| 813 | + ></td
|
|
| 814 | + ><td class="doc"
|
|
| 815 | + ><p
|
|
| 816 | + ><em
|
|
| 817 | + >Since: deepseq-1.4.3.0</em
|
|
| 818 | + ></p
|
|
| 819 | + ></td
|
|
| 820 | + ></tr
|
|
| 821 | + ><tr
|
|
| 822 | + ><td colspan="2"
|
|
| 823 | + ><details id="i:id:Product:NFData1:8"
|
|
| 824 | + ><summary class="hide-when-js-enabled"
|
|
| 825 | + >Instance details</summary
|
|
| 826 | + ><p
|
|
| 827 | + >Defined in <a href="#"
|
|
| 828 | + >Control.DeepSeq</a
|
|
| 829 | + ></p
|
|
| 830 | + > <div class="subs methods"
|
|
| 831 | + ><p class="caption"
|
|
| 832 | + >Methods</p
|
|
| 833 | + ><p class="src"
|
|
| 834 | + ><a href="#"
|
|
| 835 | + >liftRnf</a
|
|
| 836 | + > :: (a -> ()) -> <a href="#" title="Bug1004"
|
|
| 837 | + >Product</a
|
|
| 838 | + > f g a -> () <a href="#" class="selflink"
|
|
| 839 | + >#</a
|
|
| 840 | + ></p
|
|
| 841 | + ></div
|
|
| 842 | + ></details
|
|
| 843 | + ></td
|
|
| 844 | + ></tr
|
|
| 845 | + ><tr
|
|
| 846 | + ><td class="src clearfix"
|
|
| 847 | + ><span class="inst-left"
|
|
| 848 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Alternative:9"
|
|
| 801 | 849 | ></span
|
| 802 | 850 | > (<a href="#" title="Control.Applicative"
|
| 803 | 851 | >Alternative</a
|
| ... | ... | @@ -820,7 +868,7 @@ |
| 820 | 868 | ></tr
|
| 821 | 869 | ><tr
|
| 822 | 870 | ><td colspan="2"
|
| 823 | - ><details id="i:id:Product:Alternative:8"
|
|
| 871 | + ><details id="i:id:Product:Alternative:9"
|
|
| 824 | 872 | ><summary class="hide-when-js-enabled"
|
| 825 | 873 | >Instance details</summary
|
| 826 | 874 | ><p
|
| ... | ... | @@ -877,7 +925,7 @@ |
| 877 | 925 | ><tr
|
| 878 | 926 | ><td class="src clearfix"
|
| 879 | 927 | ><span class="inst-left"
|
| 880 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Applicative:9"
|
|
| 928 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Applicative:10"
|
|
| 881 | 929 | ></span
|
| 882 | 930 | > (<a href="#" title="Control.Applicative"
|
| 883 | 931 | >Applicative</a
|
| ... | ... | @@ -900,7 +948,7 @@ |
| 900 | 948 | ></tr
|
| 901 | 949 | ><tr
|
| 902 | 950 | ><td colspan="2"
|
| 903 | - ><details id="i:id:Product:Applicative:9"
|
|
| 951 | + ><details id="i:id:Product:Applicative:10"
|
|
| 904 | 952 | ><summary class="hide-when-js-enabled"
|
| 905 | 953 | >Instance details</summary
|
| 906 | 954 | ><p
|
| ... | ... | @@ -973,7 +1021,7 @@ |
| 973 | 1021 | ><tr
|
| 974 | 1022 | ><td class="src clearfix"
|
| 975 | 1023 | ><span class="inst-left"
|
| 976 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Functor:10"
|
|
| 1024 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Functor:11"
|
|
| 977 | 1025 | ></span
|
| 978 | 1026 | > (<a href="#" title="Control.Monad"
|
| 979 | 1027 | >Functor</a
|
| ... | ... | @@ -996,7 +1044,7 @@ |
| 996 | 1044 | ></tr
|
| 997 | 1045 | ><tr
|
| 998 | 1046 | ><td colspan="2"
|
| 999 | - ><details id="i:id:Product:Functor:10"
|
|
| 1047 | + ><details id="i:id:Product:Functor:11"
|
|
| 1000 | 1048 | ><summary class="hide-when-js-enabled"
|
| 1001 | 1049 | >Instance details</summary
|
| 1002 | 1050 | ><p
|
| ... | ... | @@ -1033,7 +1081,7 @@ |
| 1033 | 1081 | ><tr
|
| 1034 | 1082 | ><td class="src clearfix"
|
| 1035 | 1083 | ><span class="inst-left"
|
| 1036 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Monad:11"
|
|
| 1084 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Monad:12"
|
|
| 1037 | 1085 | ></span
|
| 1038 | 1086 | > (<a href="#" title="Control.Monad"
|
| 1039 | 1087 | >Monad</a
|
| ... | ... | @@ -1056,7 +1104,7 @@ |
| 1056 | 1104 | ></tr
|
| 1057 | 1105 | ><tr
|
| 1058 | 1106 | ><td colspan="2"
|
| 1059 | - ><details id="i:id:Product:Monad:11"
|
|
| 1107 | + ><details id="i:id:Product:Monad:12"
|
|
| 1060 | 1108 | ><summary class="hide-when-js-enabled"
|
| 1061 | 1109 | >Instance details</summary
|
| 1062 | 1110 | ><p
|
| ... | ... | @@ -1105,7 +1153,7 @@ |
| 1105 | 1153 | ><tr
|
| 1106 | 1154 | ><td class="src clearfix"
|
| 1107 | 1155 | ><span class="inst-left"
|
| 1108 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:MonadPlus:12"
|
|
| 1156 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:MonadPlus:13"
|
|
| 1109 | 1157 | ></span
|
| 1110 | 1158 | > (<a href="#" title="Control.Monad"
|
| 1111 | 1159 | >MonadPlus</a
|
| ... | ... | @@ -1128,7 +1176,7 @@ |
| 1128 | 1176 | ></tr
|
| 1129 | 1177 | ><tr
|
| 1130 | 1178 | ><td colspan="2"
|
| 1131 | - ><details id="i:id:Product:MonadPlus:12"
|
|
| 1179 | + ><details id="i:id:Product:MonadPlus:13"
|
|
| 1132 | 1180 | ><summary class="hide-when-js-enabled"
|
| 1133 | 1181 | >Instance details</summary
|
| 1134 | 1182 | ><p
|
| ... | ... | @@ -1165,7 +1213,7 @@ |
| 1165 | 1213 | ><tr
|
| 1166 | 1214 | ><td class="src clearfix"
|
| 1167 | 1215 | ><span class="inst-left"
|
| 1168 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:MonadFix:13"
|
|
| 1216 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:MonadFix:14"
|
|
| 1169 | 1217 | ></span
|
| 1170 | 1218 | > (<a href="#" title="Control.Monad.Fix"
|
| 1171 | 1219 | >MonadFix</a
|
| ... | ... | @@ -1188,7 +1236,7 @@ |
| 1188 | 1236 | ></tr
|
| 1189 | 1237 | ><tr
|
| 1190 | 1238 | ><td colspan="2"
|
| 1191 | - ><details id="i:id:Product:MonadFix:13"
|
|
| 1239 | + ><details id="i:id:Product:MonadFix:14"
|
|
| 1192 | 1240 | ><summary class="hide-when-js-enabled"
|
| 1193 | 1241 | >Instance details</summary
|
| 1194 | 1242 | ><p
|
| ... | ... | @@ -1215,7 +1263,7 @@ |
| 1215 | 1263 | ><tr
|
| 1216 | 1264 | ><td class="src clearfix"
|
| 1217 | 1265 | ><span class="inst-left"
|
| 1218 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:MonadZip:14"
|
|
| 1266 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:MonadZip:15"
|
|
| 1219 | 1267 | ></span
|
| 1220 | 1268 | > (<a href="#" title="Control.Monad.Zip"
|
| 1221 | 1269 | >MonadZip</a
|
| ... | ... | @@ -1238,7 +1286,7 @@ |
| 1238 | 1286 | ></tr
|
| 1239 | 1287 | ><tr
|
| 1240 | 1288 | ><td colspan="2"
|
| 1241 | - ><details id="i:id:Product:MonadZip:14"
|
|
| 1289 | + ><details id="i:id:Product:MonadZip:15"
|
|
| 1242 | 1290 | ><summary class="hide-when-js-enabled"
|
| 1243 | 1291 | >Instance details</summary
|
| 1244 | 1292 | ><p
|
| ... | ... | @@ -1291,7 +1339,7 @@ |
| 1291 | 1339 | ><tr
|
| 1292 | 1340 | ><td class="src clearfix"
|
| 1293 | 1341 | ><span class="inst-left"
|
| 1294 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Foldable:15"
|
|
| 1342 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Foldable:16"
|
|
| 1295 | 1343 | ></span
|
| 1296 | 1344 | > (<a href="#" title="Data.Foldable"
|
| 1297 | 1345 | >Foldable</a
|
| ... | ... | @@ -1314,7 +1362,7 @@ |
| 1314 | 1362 | ></tr
|
| 1315 | 1363 | ><tr
|
| 1316 | 1364 | ><td colspan="2"
|
| 1317 | - ><details id="i:id:Product:Foldable:15"
|
|
| 1365 | + ><details id="i:id:Product:Foldable:16"
|
|
| 1318 | 1366 | ><summary class="hide-when-js-enabled"
|
| 1319 | 1367 | >Instance details</summary
|
| 1320 | 1368 | ><p
|
| ... | ... | @@ -1489,7 +1537,7 @@ |
| 1489 | 1537 | ><tr
|
| 1490 | 1538 | ><td class="src clearfix"
|
| 1491 | 1539 | ><span class="inst-left"
|
| 1492 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Traversable:16"
|
|
| 1540 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Traversable:17"
|
|
| 1493 | 1541 | ></span
|
| 1494 | 1542 | > (<a href="#" title="Data.Traversable"
|
| 1495 | 1543 | >Traversable</a
|
| ... | ... | @@ -1512,7 +1560,7 @@ |
| 1512 | 1560 | ></tr
|
| 1513 | 1561 | ><tr
|
| 1514 | 1562 | ><td colspan="2"
|
| 1515 | - ><details id="i:id:Product:Traversable:16"
|
|
| 1563 | + ><details id="i:id:Product:Traversable:17"
|
|
| 1516 | 1564 | ><summary class="hide-when-js-enabled"
|
| 1517 | 1565 | >Instance details</summary
|
| 1518 | 1566 | ><p
|
| ... | ... | @@ -1577,7 +1625,59 @@ |
| 1577 | 1625 | ><tr
|
| 1578 | 1626 | ><td class="src clearfix"
|
| 1579 | 1627 | ><span class="inst-left"
|
| 1580 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Monoid:17"
|
|
| 1628 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:NFData:18"
|
|
| 1629 | + ></span
|
|
| 1630 | + > (<a href="#" title="Control.DeepSeq"
|
|
| 1631 | + >NFData</a
|
|
| 1632 | + > (f a), <a href="#" title="Control.DeepSeq"
|
|
| 1633 | + >NFData</a
|
|
| 1634 | + > (g a)) => <a href="#" title="Control.DeepSeq"
|
|
| 1635 | + >NFData</a
|
|
| 1636 | + > (<a href="#" title="Bug1004"
|
|
| 1637 | + >Product</a
|
|
| 1638 | + > f g a)</span
|
|
| 1639 | + > <a href="#" class="selflink"
|
|
| 1640 | + >#</a
|
|
| 1641 | + ></td
|
|
| 1642 | + ><td class="doc"
|
|
| 1643 | + ><p
|
|
| 1644 | + >Note: in <code class="inline-code"
|
|
| 1645 | + >deepseq-1.5.0.0</code
|
|
| 1646 | + > this instance's superclasses were changed.</p
|
|
| 1647 | + ><p
|
|
| 1648 | + ><em
|
|
| 1649 | + >Since: deepseq-1.4.3.0</em
|
|
| 1650 | + ></p
|
|
| 1651 | + ></td
|
|
| 1652 | + ></tr
|
|
| 1653 | + ><tr
|
|
| 1654 | + ><td colspan="2"
|
|
| 1655 | + ><details id="i:id:Product:NFData:18"
|
|
| 1656 | + ><summary class="hide-when-js-enabled"
|
|
| 1657 | + >Instance details</summary
|
|
| 1658 | + ><p
|
|
| 1659 | + >Defined in <a href="#"
|
|
| 1660 | + >Control.DeepSeq</a
|
|
| 1661 | + ></p
|
|
| 1662 | + > <div class="subs methods"
|
|
| 1663 | + ><p class="caption"
|
|
| 1664 | + >Methods</p
|
|
| 1665 | + ><p class="src"
|
|
| 1666 | + ><a href="#"
|
|
| 1667 | + >rnf</a
|
|
| 1668 | + > :: <a href="#" title="Bug1004"
|
|
| 1669 | + >Product</a
|
|
| 1670 | + > f g a -> () <a href="#" class="selflink"
|
|
| 1671 | + >#</a
|
|
| 1672 | + ></p
|
|
| 1673 | + ></div
|
|
| 1674 | + ></details
|
|
| 1675 | + ></td
|
|
| 1676 | + ></tr
|
|
| 1677 | + ><tr
|
|
| 1678 | + ><td class="src clearfix"
|
|
| 1679 | + ><span class="inst-left"
|
|
| 1680 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Monoid:19"
|
|
| 1581 | 1681 | ></span
|
| 1582 | 1682 | > (<a href="#" title="Data.Monoid"
|
| 1583 | 1683 | >Monoid</a
|
| ... | ... | @@ -1600,7 +1700,7 @@ |
| 1600 | 1700 | ></tr
|
| 1601 | 1701 | ><tr
|
| 1602 | 1702 | ><td colspan="2"
|
| 1603 | - ><details id="i:id:Product:Monoid:17"
|
|
| 1703 | + ><details id="i:id:Product:Monoid:19"
|
|
| 1604 | 1704 | ><summary class="hide-when-js-enabled"
|
| 1605 | 1705 | >Instance details</summary
|
| 1606 | 1706 | ><p
|
| ... | ... | @@ -1647,7 +1747,7 @@ |
| 1647 | 1747 | ><tr
|
| 1648 | 1748 | ><td class="src clearfix"
|
| 1649 | 1749 | ><span class="inst-left"
|
| 1650 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Semigroup:18"
|
|
| 1750 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Semigroup:20"
|
|
| 1651 | 1751 | ></span
|
| 1652 | 1752 | > (<a href="#" title="Prelude"
|
| 1653 | 1753 | >Semigroup</a
|
| ... | ... | @@ -1670,7 +1770,7 @@ |
| 1670 | 1770 | ></tr
|
| 1671 | 1771 | ><tr
|
| 1672 | 1772 | ><td colspan="2"
|
| 1673 | - ><details id="i:id:Product:Semigroup:18"
|
|
| 1773 | + ><details id="i:id:Product:Semigroup:20"
|
|
| 1674 | 1774 | ><summary class="hide-when-js-enabled"
|
| 1675 | 1775 | >Instance details</summary
|
| 1676 | 1776 | ><p
|
| ... | ... | @@ -1723,7 +1823,7 @@ |
| 1723 | 1823 | ><tr
|
| 1724 | 1824 | ><td class="src clearfix"
|
| 1725 | 1825 | ><span class="inst-left"
|
| 1726 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Data:19"
|
|
| 1826 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Data:21"
|
|
| 1727 | 1827 | ></span
|
| 1728 | 1828 | > (<a href="#" title="Data.Dynamic"
|
| 1729 | 1829 | >Typeable</a
|
| ... | ... | @@ -1754,7 +1854,7 @@ |
| 1754 | 1854 | ></tr
|
| 1755 | 1855 | ><tr
|
| 1756 | 1856 | ><td colspan="2"
|
| 1757 | - ><details id="i:id:Product:Data:19"
|
|
| 1857 | + ><details id="i:id:Product:Data:21"
|
|
| 1758 | 1858 | ><summary class="hide-when-js-enabled"
|
| 1759 | 1859 | >Instance details</summary
|
| 1760 | 1860 | ><p
|
| ... | ... | @@ -1971,7 +2071,7 @@ |
| 1971 | 2071 | ><tr
|
| 1972 | 2072 | ><td class="src clearfix"
|
| 1973 | 2073 | ><span class="inst-left"
|
| 1974 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Generic:20"
|
|
| 2074 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Generic:22"
|
|
| 1975 | 2075 | ></span
|
| 1976 | 2076 | > <a href="#" title="GHC.Generics"
|
| 1977 | 2077 | >Generic</a
|
| ... | ... | @@ -1986,7 +2086,7 @@ |
| 1986 | 2086 | ></tr
|
| 1987 | 2087 | ><tr
|
| 1988 | 2088 | ><td colspan="2"
|
| 1989 | - ><details id="i:id:Product:Generic:20"
|
|
| 2089 | + ><details id="i:id:Product:Generic:22"
|
|
| 1990 | 2090 | ><summary class="hide-when-js-enabled"
|
| 1991 | 2091 | >Instance details</summary
|
| 1992 | 2092 | ><p
|
| ... | ... | @@ -2125,7 +2225,7 @@ |
| 2125 | 2225 | ><tr
|
| 2126 | 2226 | ><td class="src clearfix"
|
| 2127 | 2227 | ><span class="inst-left"
|
| 2128 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Read:21"
|
|
| 2228 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Read:23"
|
|
| 2129 | 2229 | ></span
|
| 2130 | 2230 | > (<a href="#" title="Prelude"
|
| 2131 | 2231 | >Read</a
|
| ... | ... | @@ -2148,7 +2248,7 @@ |
| 2148 | 2248 | ></tr
|
| 2149 | 2249 | ><tr
|
| 2150 | 2250 | ><td colspan="2"
|
| 2151 | - ><details id="i:id:Product:Read:21"
|
|
| 2251 | + ><details id="i:id:Product:Read:23"
|
|
| 2152 | 2252 | ><summary class="hide-when-js-enabled"
|
| 2153 | 2253 | >Instance details</summary
|
| 2154 | 2254 | ><p
|
| ... | ... | @@ -2207,7 +2307,7 @@ |
| 2207 | 2307 | ><tr
|
| 2208 | 2308 | ><td class="src clearfix"
|
| 2209 | 2309 | ><span class="inst-left"
|
| 2210 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Show:22"
|
|
| 2310 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Show:24"
|
|
| 2211 | 2311 | ></span
|
| 2212 | 2312 | > (<a href="#" title="Prelude"
|
| 2213 | 2313 | >Show</a
|
| ... | ... | @@ -2230,7 +2330,7 @@ |
| 2230 | 2330 | ></tr
|
| 2231 | 2331 | ><tr
|
| 2232 | 2332 | ><td colspan="2"
|
| 2233 | - ><details id="i:id:Product:Show:22"
|
|
| 2333 | + ><details id="i:id:Product:Show:24"
|
|
| 2234 | 2334 | ><summary class="hide-when-js-enabled"
|
| 2235 | 2335 | >Instance details</summary
|
| 2236 | 2336 | ><p
|
| ... | ... | @@ -2279,7 +2379,7 @@ |
| 2279 | 2379 | ><tr
|
| 2280 | 2380 | ><td class="src clearfix"
|
| 2281 | 2381 | ><span class="inst-left"
|
| 2282 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Eq:23"
|
|
| 2382 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Eq:25"
|
|
| 2283 | 2383 | ></span
|
| 2284 | 2384 | > (<a href="#" title="Data.Eq"
|
| 2285 | 2385 | >Eq</a
|
| ... | ... | @@ -2302,7 +2402,7 @@ |
| 2302 | 2402 | ></tr
|
| 2303 | 2403 | ><tr
|
| 2304 | 2404 | ><td colspan="2"
|
| 2305 | - ><details id="i:id:Product:Eq:23"
|
|
| 2405 | + ><details id="i:id:Product:Eq:25"
|
|
| 2306 | 2406 | ><summary class="hide-when-js-enabled"
|
| 2307 | 2407 | >Instance details</summary
|
| 2308 | 2408 | ><p
|
| ... | ... | @@ -2343,7 +2443,7 @@ |
| 2343 | 2443 | ><tr
|
| 2344 | 2444 | ><td class="src clearfix"
|
| 2345 | 2445 | ><span class="inst-left"
|
| 2346 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Ord:24"
|
|
| 2446 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Ord:26"
|
|
| 2347 | 2447 | ></span
|
| 2348 | 2448 | > (<a href="#" title="Data.Ord"
|
| 2349 | 2449 | >Ord</a
|
| ... | ... | @@ -2366,7 +2466,7 @@ |
| 2366 | 2466 | ></tr
|
| 2367 | 2467 | ><tr
|
| 2368 | 2468 | ><td colspan="2"
|
| 2369 | - ><details id="i:id:Product:Ord:24"
|
|
| 2469 | + ><details id="i:id:Product:Ord:26"
|
|
| 2370 | 2470 | ><summary class="hide-when-js-enabled"
|
| 2371 | 2471 | >Instance details</summary
|
| 2372 | 2472 | ><p
|
| ... | ... | @@ -2467,7 +2567,7 @@ |
| 2467 | 2567 | ><tr
|
| 2468 | 2568 | ><td class="src clearfix"
|
| 2469 | 2569 | ><span class="inst-left"
|
| 2470 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Rep1:25"
|
|
| 2570 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Rep1:27"
|
|
| 2471 | 2571 | ></span
|
| 2472 | 2572 | > <span class="keyword"
|
| 2473 | 2573 | >type</span
|
| ... | ... | @@ -2490,7 +2590,7 @@ |
| 2490 | 2590 | ></tr
|
| 2491 | 2591 | ><tr
|
| 2492 | 2592 | ><td colspan="2"
|
| 2493 | - ><details id="i:id:Product:Rep1:25"
|
|
| 2593 | + ><details id="i:id:Product:Rep1:27"
|
|
| 2494 | 2594 | ><summary class="hide-when-js-enabled"
|
| 2495 | 2595 | >Instance details</summary
|
| 2496 | 2596 | ><p
|
| ... | ... | @@ -2565,7 +2665,7 @@ |
| 2565 | 2665 | ><tr
|
| 2566 | 2666 | ><td class="src clearfix"
|
| 2567 | 2667 | ><span class="inst-left"
|
| 2568 | - ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Rep:26"
|
|
| 2668 | + ><span class="instance details-toggle-control details-toggle" data-details-id="i:id:Product:Rep:28"
|
|
| 2569 | 2669 | ></span
|
| 2570 | 2670 | > <span class="keyword"
|
| 2571 | 2671 | >type</span
|
| ... | ... | @@ -2586,7 +2686,7 @@ |
| 2586 | 2686 | ></tr
|
| 2587 | 2687 | ><tr
|
| 2588 | 2688 | ><td colspan="2"
|
| 2589 | - ><details id="i:id:Product:Rep:26"
|
|
| 2689 | + ><details id="i:id:Product:Rep:28"
|
|
| 2590 | 2690 | ><summary class="hide-when-js-enabled"
|
| 2591 | 2691 | >Instance details</summary
|
| 2592 | 2692 | ><p
|
| ... | ... | @@ -308,8 +308,10 @@ |
| 308 | 308 | ></p
|
| 309 | 309 | ><div class="doc"
|
| 310 | 310 | ><p
|
| 311 | - >Doc for (<code class="inline-code"
|
|
| 312 | - >><</code
|
|
| 311 | + >Doc for (<code
|
|
| 312 | + ><a href="#" title="PatternSyns"
|
|
| 313 | + >><</a
|
|
| 314 | + ></code
|
|
| 313 | 315 | >)</p
|
| 314 | 316 | ></div
|
| 315 | 317 | ><div class="subs constructors"
|
| ... | ... | @@ -48,6 +48,34 @@ |
| 48 | 48 | ><p class="caption"
|
| 49 | 49 | >TypeOperators</p
|
| 50 | 50 | ></div
|
| 51 | + ><div id="description"
|
|
| 52 | + ><p class="caption"
|
|
| 53 | + >Description</p
|
|
| 54 | + ><div class="doc"
|
|
| 55 | + ><p
|
|
| 56 | + >This documentation refers to <code
|
|
| 57 | + ><a href="#" title="Data.Type.Equality"
|
|
| 58 | + >~</a
|
|
| 59 | + ></code
|
|
| 60 | + >, <code
|
|
| 61 | + ><a href="#" title="TypeOperators"
|
|
| 62 | + >:-:</a
|
|
| 63 | + ></code
|
|
| 64 | + >, <code
|
|
| 65 | + ><a href="#" title="TypeOperators"
|
|
| 66 | + >:+:</a
|
|
| 67 | + ></code
|
|
| 68 | + >, <code
|
|
| 69 | + ><a href="#" title="TypeOperators"
|
|
| 70 | + ><=></a
|
|
| 71 | + ></code
|
|
| 72 | + >, and <code
|
|
| 73 | + ><a href="#" title="TypeOperators"
|
|
| 74 | + >|||</a
|
|
| 75 | + ></code
|
|
| 76 | + >.</p
|
|
| 77 | + ></div
|
|
| 78 | + ></div
|
|
| 51 | 79 | ><div id="interface"
|
| 52 | 80 | ><h1
|
| 53 | 81 | >Documentation</h1
|
| ... | ... | @@ -142,6 +170,18 @@ |
| 142 | 170 | ></p
|
| 143 | 171 | ></div
|
| 144 | 172 | ><div class="top"
|
| 173 | + ><p class="src"
|
|
| 174 | + ><span class="keyword"
|
|
| 175 | + >type</span
|
|
| 176 | + > <a id="t:-124--124--124-" class="def"
|
|
| 177 | + >(|||)</a
|
|
| 178 | + > = <a href="#" title="Data.Either"
|
|
| 179 | + >Either</a
|
|
| 180 | + > <a href="#" class="selflink"
|
|
| 181 | + >#</a
|
|
| 182 | + ></p
|
|
| 183 | + ></div
|
|
| 184 | + ><div class="top"
|
|
| 145 | 185 | ><p class="src"
|
| 146 | 186 | ><a id="v:biO" class="def"
|
| 147 | 187 | >biO</a
|
| 1 | 1 | {-# LANGUAGE Haskell2010 #-}
|
| 2 | 2 | {-# LANGUAGE TypeOperators, GADTs, MultiParamTypeClasses, FlexibleContexts #-}
|
| 3 | +-- | This documentation refers to '~', ':-:', ':+:', '<=>', and '|||'.
|
|
| 3 | 4 | module TypeOperators where
|
| 4 | 5 | |
| 5 | 6 | data a :-: b
|
| ... | ... | @@ -12,6 +13,8 @@ newtype (g `O` f) a = O { unO :: g (f a) } |
| 12 | 13 | |
| 13 | 14 | class a <=> b
|
| 14 | 15 | |
| 16 | +type (|||) = Either
|
|
| 17 | + |
|
| 15 | 18 | biO :: (g `O` f) a
|
| 16 | 19 | biO = undefined
|
| 17 | 20 |