[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: Fix doc typos in libraries/base/GHC
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Fri Apr 21 18:03:03 UTC 2023
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
dae514f9 by tocic at 2023-04-21T13:31:21-04:00
Fix doc typos in libraries/base/GHC
- - - - -
113e21d7 by Sylvain Henry at 2023-04-21T13:32:01-04:00
Testsuite: replace some js_broken/js_skip predicates with req_c
Using req_c is more precise.
- - - - -
bd8b6813 by Krzysztof Gogolewski at 2023-04-21T14:02:53-04:00
Minor doc fixes
- Add docs/index.html to .gitignore.
It is created by ./hadrian/build docs, and it was the only file
in Hadrian's templateRules not present in .gitignore.
- Mention that MultiWayIf supports non-boolean guards
- Remove documentation of optdll - removed in 2007, 763daed95
- Fix markdown syntax
- - - - -
2de6d874 by amesgen at 2023-04-21T14:02:57-04:00
User's guide: DeepSubsumption is implied by Haskell{98,2010}
- - - - -
17 changed files:
- .gitignore
- docs/users_guide/exts/control.rst
- docs/users_guide/exts/multiway_if.rst
- docs/users_guide/javascript.rst
- docs/users_guide/phases.rst
- docs/users_guide/using-warnings.rst
- libraries/base/GHC/IO/Device.hs
- libraries/base/GHC/IO/Encoding.hs
- libraries/base/GHC/IO/Handle.hs
- libraries/base/GHC/IO/SubSystem.hs
- libraries/base/GHC/List.hs
- libraries/base/GHC/TypeNats.hs
- testsuite/tests/concurrent/should_run/all.T
- testsuite/tests/ffi/should_run/all.T
- testsuite/tests/rts/T15894/all.T
- testsuite/tests/rts/all.T
- testsuite/tests/rts/linker/all.T
Changes:
=====================================
.gitignore
=====================================
@@ -115,6 +115,7 @@ _darcs/
/compiler/ghc.cabal.old
/distrib/configure.ac
/distrib/ghc.iss
+/docs/index.html
/docs/man
/docs/users_guide/.log
/docs/users_guide/users_guide
=====================================
docs/users_guide/exts/control.rst
=====================================
@@ -98,6 +98,7 @@ Language extensions can be controlled (i.e. allowed or not) in two ways:
* :extension:`CUSKs`
* :extension:`DatatypeContexts`
+ * :extension:`DeepSubsumption`
* :extension:`DoAndIfThenElse`
* :extension:`EmptyDataDecls`
* :extension:`FieldSelectors`
@@ -120,6 +121,7 @@ Language extensions can be controlled (i.e. allowed or not) in two ways:
* :extension:`CUSKs`
* :extension:`DatatypeContexts`
+ * :extension:`DeepSubsumption`
* :extension:`FieldSelectors`
* :extension:`ImplicitPrelude`
* :extension:`MonomorphismRestriction`
=====================================
docs/users_guide/exts/multiway_if.rst
=====================================
@@ -51,3 +51,11 @@ except that the semi-colons between guards in a multi-way if are
optional. So it is not necessary to line up all the guards at the same
column; this is consistent with the way guards work in function
definitions and case expressions.
+
+Note that multi-way if supports guards other than boolean conditions: ::
+
+ if | parseNumbers settings
+ , Just (exponent, mantissa) <- decomposeNumber str
+ , let (integralPart, fractionPart) = parse mantissa
+ , integralPart >= 0 = ...
+ | otherwise = ...
=====================================
docs/users_guide/javascript.rst
=====================================
@@ -1,4 +1,4 @@
-.. _ffi-javascript
+.. _ffi-javascript:
FFI and the JavaScript Backend
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ look like:
js_add :: Int -> Int -> Int
JSVal
-^^^^^
+~~~~~
The JavaScript backend has a concept of an untyped 'plain' JavaScript
value, under the guise of the type ``JSVal``. Values having this type
@@ -47,7 +47,7 @@ It also contains functions for working with objects:
* ``getProp :: JSVal -> String -> JSVal`` - object field access
JavaScript FFI Types
-^^^^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~~~~
Some types are able to be used directly in the type signatures of foreign
exports, without conversion to a ``JSVal``. We saw in the first example
@@ -75,7 +75,7 @@ for the Haskell `Bool` type:
type_error :: Bool -> Bool
JavaScript Callbacks
-^^^^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~~~~
The JavaScript execution model is based around callback functions, and
GHC's JavaScript backend implements these as a type in order to support
@@ -146,7 +146,7 @@ passed as an ``Int`` to a ``Callback`` that accepts a ``JSVal``:
releaseCallback add3
Callbacks as Foreign Exports
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
JavaScript callbacks allow for a sort of FFI exports via FFI imports. To do
this, a global JavaScript variable is set, and that global variable can then
=====================================
docs/users_guide/phases.rst
=====================================
@@ -247,13 +247,6 @@ the following flags:
Pass ⟨option⟩ to the linker when merging object files. In the case of a
standard ``ld``-style linker this should generally include the ``-r`` flag.
-.. ghc-flag:: -optdll ⟨option⟩
- :shortdesc: pass ⟨option⟩ to the DLL generator
- :type: dynamic
- :category: phase-options
-
- Pass ⟨option⟩ to the DLL generator.
-
.. ghc-flag:: -optwindres ⟨option⟩
:shortdesc: pass ⟨option⟩ to ``windres``.
:type: dynamic
=====================================
docs/users_guide/using-warnings.rst
=====================================
@@ -2358,7 +2358,7 @@ of ``-W(no-)*``.
:since: 9.6.1
- As explained in :ref:`undecidable_instances`, when using
+ As explained in :ref:`undecidable-instances`, when using
:extension:`UndecidableInstances` it is possible for GHC to construct
non-terminating evidence for certain superclass constraints.
=====================================
libraries/base/GHC/IO/Device.hs
=====================================
@@ -35,7 +35,7 @@ import {-# SOURCE #-} GHC.IO.Exception ( unsupportedOperation )
-- | A low-level I/O provider where the data is bytes in memory.
-- The Word64 offsets currently have no effect on POSIX system or consoles
--- where the implicit behaviour of the C runtime is assume to move the file
+-- where the implicit behaviour of the C runtime is assumed to move the file
-- pointer on every read/write without needing an explicit seek.
class RawIO a where
-- | Read up to the specified number of bytes starting from a specified
@@ -107,7 +107,7 @@ class IODevice a where
-- | some devices (e.g. terminals) support a "raw" mode where
-- characters entered are immediately made available to the program.
- -- If available, this operations enables raw mode.
+ -- If available, this operation enables raw mode.
setRaw :: a -> Bool -> IO ()
setRaw _ _ = ioe_unsupportedOperation
=====================================
libraries/base/GHC/IO/Encoding.hs
=====================================
@@ -268,7 +268,7 @@ char8 = Latin1.latin1
--
-- 2. If the underlying encoding is not itself roundtrippable, this mechanism
-- can fail. Roundtrippable encodings are those which have an injective mapping
--- into Unicode. Almost all encodings meet this criteria, but some do not. Notably,
+-- into Unicode. Almost all encodings meet this criterion, but some do not. Notably,
-- Shift-JIS (CP932) and Big5 contain several different encodings of the same
-- Unicode codepoint.
--
=====================================
libraries/base/GHC/IO/Handle.hs
=====================================
@@ -193,7 +193,7 @@ hLookAhead handle =
--
-- * if @hdl@ is writable, the buffer is flushed as for 'hFlush';
--
--- * if @hdl@ is not writable, the contents of the buffer is discarded.
+-- * if @hdl@ is not writable, the contents of the buffer are discarded.
--
-- This operation may fail with:
--
@@ -296,7 +296,7 @@ hFlush handle = wantWritableHandle "hFlush" handle flushWriteBuffer
-- | The action 'hFlushAll' @hdl@ flushes all buffered data in @hdl@,
-- including any buffered read data. Buffered read data is flushed
--- by seeking the file position back to the point before the bufferred
+-- by seeking the file position back to the point before the buffered
-- data was read, and hence only works if @hdl@ is seekable (see
-- 'hIsSeekable').
--
=====================================
libraries/base/GHC/IO/SubSystem.hs
=====================================
@@ -39,7 +39,7 @@ infixl 7 <!>
-- | Conditionally execute an action depending on the configured I/O subsystem.
-- On POSIX systems always execute the first action.
--- On windows execute the second action if WINIO as active, otherwise fall back to
+-- On Windows execute the second action if WINIO as active, otherwise fall back to
-- the first action.
conditional :: a -> a -> a
#if defined(mingw32_HOST_OS)
=====================================
libraries/base/GHC/List.hs
=====================================
@@ -1084,7 +1084,7 @@ splitAt n ls
#endif /* USE_REPORT_PRELUDE */
-- | 'span', applied to a predicate @p@ and a list @xs@, returns a tuple where
--- first element is longest prefix (possibly empty) of @xs@ of elements that
+-- first element is the longest prefix (possibly empty) of @xs@ of elements that
-- satisfy @p@ and second element is the remainder of the list:
--
-- >>> span (< 3) [1,2,3,4,1,2,3,4]
=====================================
libraries/base/GHC/TypeNats.hs
=====================================
@@ -68,7 +68,7 @@ import GHC.TypeNats.Internal(CmpNat)
-- | A type synonym for 'Natural'.
--
--- Prevously, this was an opaque data type, but it was changed to a type
+-- Previously, this was an opaque data type, but it was changed to a type
-- synonym.
--
-- @since 4.16.0.0
=====================================
testsuite/tests/concurrent/should_run/all.T
=====================================
@@ -260,7 +260,7 @@ test('hs_try_putmvar001',
[
when(opsys('mingw32'),skip), # uses pthread APIs in the C code
only_ways(['threaded1', 'threaded2', 'nonmoving_thr']),
- js_skip
+ req_c
],
compile_and_run,
['hs_try_putmvar001_c.c'])
@@ -270,7 +270,7 @@ test('hs_try_putmvar001',
test('hs_try_putmvar002',
[pre_cmd('$MAKE -s --no-print-directory hs_try_putmvar002_setup'),
omit_ways(['ghci']),
- js_skip,
+ req_c,
extra_run_opts('1 8 10000')],
compile_and_run, ['hs_try_putmvar002_c.c'])
@@ -280,7 +280,7 @@ test('hs_try_putmvar003',
when(opsys('mingw32'),skip), # uses pthread APIs in the C code
pre_cmd('$MAKE -s --no-print-directory hs_try_putmvar003_setup'),
only_ways(['threaded1', 'threaded2', 'nonmoving_thr']),
- js_skip,
+ req_c,
extra_run_opts('1 16 32 100'),
fragile_for(16361, ['threaded1'])
],
=====================================
testsuite/tests/ffi/should_run/all.T
=====================================
@@ -192,7 +192,7 @@ test('T9274', [omit_ways(['ghci'])], compile_and_run, [''])
test('ffi023', [ omit_ways(['ghci']),
extra_run_opts('1000 4'),
- js_broken(22363),
+ req_c,
pre_cmd('$MAKE -s --no-print-directory ffi023_setup') ],
# The ffi023_setup hack is to ensure that we generate
# ffi023_stub.h before compiling ffi023_c.c, which
@@ -206,7 +206,7 @@ test('rts_clearMemory', [
extra_ways(['g1', 'nursery_chunks', 'nonmoving', 'compacting_gc']),
# On windows, nonmoving way fails with bad exit code (2816)
when(opsys('mingw32'), fragile(23091)),
- js_broken(22363),
+ req_c,
pre_cmd('$MAKE -s --no-print-directory rts_clearMemory_setup') ],
# Same hack as ffi023
compile_and_run, ['rts_clearMemory_c.c -no-hs-main'])
=====================================
testsuite/tests/rts/T15894/all.T
=====================================
@@ -1,5 +1,5 @@
test('T15894',
[ extra_files(['copysign.c', 'main.hs']), when(ghc_dynamic(), skip)
- , js_broken(22359)
+ , req_c
],
makefile_test, ['T15894'])
=====================================
testsuite/tests/rts/all.T
=====================================
@@ -251,7 +251,7 @@ test('T5993', extra_run_opts('+RTS -k8 -RTS'), compile_and_run, [''])
test('T6006', [ omit_ways(prof_ways + ['ghci']),
pre_cmd('$MAKE -s --no-print-directory T6006_setup'),
- js_skip
+ req_c
],
# The T6006_setup hack is to ensure that we generate
# T6006_stub.h before compiling T6006_c.c, which
=====================================
testsuite/tests/rts/linker/all.T
=====================================
@@ -93,13 +93,13 @@ test('T5435_v_gcc',
test('T5435_dyn_asm',
[extra_files(['T5435.hs', 'T5435_asm.c']),
fragile(22970),
- js_skip, # dynamic linking not supported by the JS backend
+ req_c,
check_stdout(checkDynAsm)],
makefile_test, ['T5435_dyn_asm'])
test('T5435_dyn_gcc',
[extra_files(['T5435.hs', 'T5435_gcc.c']),
fragile(22970),
- js_skip], # dynamic linking not supported by the JS backend
+ req_c],
makefile_test, ['T5435_dyn_gcc'])
######################################
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5afb844f3534c59f5867ac6458e3bb04dcd6c119...2de6d8747f7804b2bb5e421d858d8bd432f55cbe
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5afb844f3534c59f5867ac6458e3bb04dcd6c119...2de6d8747f7804b2bb5e421d858d8bd432f55cbe
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230421/d0846d6d/attachment-0001.html>
More information about the ghc-commits
mailing list