Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
haskell-wasm
GHC
Commits
d830bbc9
Commit
d830bbc9
authored
5 years ago
by
adam
Committed by
Marge Bot
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
docs: fix formatting and add some links
[skip ci]
parent
566cc73f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/users_guide/8.12.1-notes.rst
+44
-39
44 additions, 39 deletions
docs/users_guide/8.12.1-notes.rst
docs/users_guide/exts/template_haskell.rst
+7
-6
7 additions, 6 deletions
docs/users_guide/exts/template_haskell.rst
with
51 additions
and
45 deletions
docs/users_guide/8.12.1-notes.rst
+
44
−
39
View file @
d830bbc9
...
@@ -79,12 +79,15 @@ Language
...
@@ -79,12 +79,15 @@ Language
* GHC now consistently does eager instantiation during type inference.
* GHC now consistently does eager instantiation during type inference.
As a consequence, visible type application (VTA) now only works when
As a consequence, visible type application (VTA) now only works when
the head of the application is:
the head of the application is:
* A variable
* A variable
* An expression with a type signature
* An expression with a type signature
For example `(let x = blah in id) @Bool True` no longer typechecks.
You should write `let x = blah in id @Bool True` instead.
This change prepares the way for Quick Look impredicativity.
For example ``(let x = blah in id) @Bool True`` no longer typechecks.
You should write ``let x = blah in id @Bool True`` instead.
This change prepares the way for `Quick Look impredicativity
<https://gitlab.haskell.org/ghc/ghc/issues/18126>`_.
* GHC now allows users to manually define the specificity of type variable
* GHC now allows users to manually define the specificity of type variable
binders. By marking a variable with braces ``{tyvar}`` or ``{tyvar :: kind}``,
binders. By marking a variable with braces ``{tyvar}`` or ``{tyvar :: kind}``,
...
@@ -110,31 +113,33 @@ Runtime system
...
@@ -110,31 +113,33 @@ Runtime system
Template Haskell
Template Haskell
~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~
- Implement the Overloaded Quotations proposal (#246). The type of all quotation
- Implement the `Overloaded Quotations proposal (#246) <https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0246-overloaded-bracket.rst>`_.
forms have now been generalised in terms of a minimal interface necessary for the
The type of all quotation forms have now been generalised in terms of a
implementation rather than the overapproximation of the ``Q`` monad.
minimal interface necessary (the ``Quote`` type class) for the
implementation rather than the overapproximation of the ``Q`` monad.
- Template Haskell quotes now handle fixity declarations in ``let`` and
- Template Haskell quotes now handle fixity declarations in ``let`` and
``where`` bindings properly. Previously, such fixity declarations would
``where`` bindings properly. Previously, such fixity declarations would
be dropped when quoted due to a Template Haskell bug.
be dropped when quoted due to a Template Haskell bug.
- The ``-XTemplateHaskellQuotes`` extension now allows nested splices as nested
- The ``-XTemplateHaskellQuotes`` extension now allows nested splices as nested
splices do not lead directly to compile-time evaluation. (!2288)
splices do not lead directly to compile-time evaluation. (Merge request
`!2288 <https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2288>`_)
Arrow notation
Arrow notation
~~~~~~~~~~~~~~
~~~~~~~~~~~~~~
- When combined with :extension:`Arrows`, the :extension:`LambdaCase` extension
- When combined with :extension:`Arrows`, the :extension:`LambdaCase` extension
now additionally allows ``\case`` syntax to be used as a command in ``proc``
now additionally allows ``\case`` syntax to be used as a command in ``proc``
notation.
notation.
- When combined with :extension:`Arrows`, the effects of the
- When combined with :extension:`Arrows`, the effects of the
:extension:`BlockArguments` extension now also apply to applications of
:extension:`BlockArguments` extension now also apply to applications of
arrow control operators in ``(|`` banana brackets ``|)``: ::
arrow control operators in ``(|`` banana brackets ``|)``: ::
(| untilA (increment -< x + y) do
(| untilA (increment -< x + y) do
within 0.5 -< x
within 0.5 -< x
... |)
... |)
``ghc-prim`` library
``ghc-prim`` library
~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~
...
@@ -142,28 +147,28 @@ Arrow notation
...
@@ -142,28 +147,28 @@ Arrow notation
``ghc`` library
``ghc`` library
~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~
- The type of the ``getAnnotations`` function has changed to better reflect
- The type of the ``getAnnotations`` function has changed to better reflect
the fact that it returns two different kinds of annotations, those on
the fact that it returns two different kinds of annotations, those on
names and those on modules: ::
names and those on modules: ::
getAnnotations :: Typeable a
getAnnotations :: Typeable a
=> ([Word8] -> a) -> ModGuts
=> ([Word8] -> a) -> ModGuts
-> CoreM (ModuleEnv [a], NameEnv [a])
-> CoreM (ModuleEnv [a], NameEnv [a])
- The meaning of the ``hs_fixds`` field of ``HsGroup`` has changed slightly.
- The meaning of the ``hs_fixds`` field of ``HsGroup`` has changed slightly.
It now only contains fixity signatures defined for top-level declarations
It now only contains fixity signatures defined for top-level declarations
and class methods defined *outside* of the class itself. Previously,
and class methods defined *outside* of the class itself. Previously,
``hs_fixds`` would also contain fixity signatures for class methods defined
``hs_fixds`` would also contain fixity signatures for class methods defined
*inside* the class, such as the fixity signature for ``m`` in the following
*inside* the class, such as the fixity signature for ``m`` in the following
example: ::
example: ::
class C a where
class C a where
infixl 4 `m`
infixl 4 `m`
m :: a -> a -> a
m :: a -> a -> a
If you wish to attain the previous behavior of ``hs_fixds``, use the new
If you wish to attain the previous behavior of ``hs_fixds``, use the new
``hsGroupTopLevelFixitySigs`` function, which collects all top-level fixity
``hsGroupTopLevelFixitySigs`` function, which collects all top-level fixity
signatures, including those for class methods defined inside classes.
signatures, including those for class methods defined inside classes.
- The ``Exception`` module was boiled down acknowledging the existence of
- The ``Exception`` module was boiled down acknowledging the existence of
the ``exceptions`` dependency. In particular, the ``ExceptionMonad``
the ``exceptions`` dependency. In particular, the ``ExceptionMonad``
...
@@ -196,7 +201,7 @@ for further change information.
...
@@ -196,7 +201,7 @@ for further change information.
libraries/containers/containers/containers.cabal: Dependency of ``ghc`` library
libraries/containers/containers/containers.cabal: Dependency of ``ghc`` library
libraries/deepseq/deepseq.cabal: Dependency of ``ghc`` library
libraries/deepseq/deepseq.cabal: Dependency of ``ghc`` library
libraries/directory/directory.cabal: Dependency of ``ghc`` library
libraries/directory/directory.cabal: Dependency of ``ghc`` library
libraries/exceptions/exceptions.cabal: Dependency of ``haskeline`` library
libraries/exceptions/exceptions.cabal: Dependency of
``ghc`` and
``haskeline`` library
libraries/filepath/filepath.cabal: Dependency of ``ghc`` library
libraries/filepath/filepath.cabal: Dependency of ``ghc`` library
compiler/ghc.cabal: The compiler itself
compiler/ghc.cabal: The compiler itself
libraries/ghci/ghci.cabal: The REPL interface
libraries/ghci/ghci.cabal: The REPL interface
...
...
This diff is collapsed.
Click to expand it.
docs/users_guide/exts/template_haskell.rst
+
7
−
6
View file @
d830bbc9
...
@@ -74,7 +74,7 @@ The :extension:`TemplateHaskellQuotes` extension is considered safe under
...
@@ -74,7 +74,7 @@ The :extension:`TemplateHaskellQuotes` extension is considered safe under
that declaration splices are not allowed anywhere except at top level
that declaration splices are not allowed anywhere except at top level
(outside any other declarations).
(outside any other declarations).
The ``Q`` monad is a monad defined in
`
`Language.Haskell.TH.Syntax
`
` which
The ``Q`` monad is a monad defined in
:th-ref:
`Language.Haskell.TH.Syntax
.
` which
supports several useful operations during code generation such as reporting
supports several useful operations during code generation such as reporting
errors or looking up identifiers in the environment.
errors or looking up identifiers in the environment.
...
@@ -92,9 +92,10 @@ The :extension:`TemplateHaskellQuotes` extension is considered safe under
...
@@ -92,9 +92,10 @@ The :extension:`TemplateHaskellQuotes` extension is considered safe under
- ``[p| ... |]``, where the "..." is a pattern; the quotation has
- ``[p| ... |]``, where the "..." is a pattern; the quotation has
type ``Quote m => m Pat``.
type ``Quote m => m Pat``.
The ``Quote`` type class is the minimal interface necessary to implement
The ``Quote`` type class (:th-ref:`Language.Haskell.TH.Syntax.Quote`) is
the desugaring of quotations. The ``Q`` monad is an instance of ``Quote`` but
the minimal interface necessary to implement the desugaring of quotations.
contains many more operations which are not needed for defining quotations.
The ``Q`` monad is an instance of ``Quote`` but contains many more
operations which are not needed for defining quotations.
See :ref:`pts-where` for using partial type signatures in quotations.
See :ref:`pts-where` for using partial type signatures in quotations.
...
@@ -402,7 +403,7 @@ Using Template Haskell
...
@@ -402,7 +403,7 @@ Using Template Haskell
----------------------
----------------------
- The data types and monadic constructor functions for Template Haskell
- The data types and monadic constructor functions for Template Haskell
are in the library
`
`Language.Haskell.TH.Syntax
`
`.
are in the library
:th-ref:
`Language.Haskell.TH.Syntax
.
`.
- You can only run a function at compile time if it is imported from
- You can only run a function at compile time if it is imported from
another module. That is, you can't define a function in a module, and
another module. That is, you can't define a function in a module, and
...
@@ -645,7 +646,7 @@ Here are the salient features
...
@@ -645,7 +646,7 @@ Here are the salient features
(Only the first two are described in the paper.)
(Only the first two are described in the paper.)
- A quoter is a value of type
- A quoter is a value of type
`
`Language.Haskell.TH.Quote.QuasiQuoter`
`
, which is defined thus: ::
:th-ref:
`Language.Haskell.TH.Quote.QuasiQuoter`, which is defined thus: ::
data QuasiQuoter = QuasiQuoter { quoteExp :: String -> Q Exp,
data QuasiQuoter = QuasiQuoter { quoteExp :: String -> Q Exp,
quotePat :: String -> Q Pat,
quotePat :: String -> Q Pat,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment