diff options
author | RyanGlScott <ryan.gl.scott@gmail.com> | 2015-12-19 11:09:52 +0100 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2015-12-19 11:09:59 +0100 |
commit | 2cc5b607df27e702541985f7c4c987806c4ec2a1 (patch) | |
tree | 2ab126c6dccef992bf689a336a3aed6590a7d052 /docs/users_guide/utils.rst | |
parent | b2670fc47754288224b825a3308b92642ccf7e73 (diff) | |
download | haskell-2cc5b607df27e702541985f7c4c987806c4ec2a1.tar.gz |
Documentation, tests for hsc2hs's new #alignment macro
Adds two tests (one for Trac #4340 and one for Trac #10272), as well as
advice on how to fix your code if `hsc2hs` emits warnings with GHC 8.0
due to a redefinition of `#alignment`. (I also put the advice in the
[GHC 8.0 Migration
Guide](https://ghc.haskell.org/trac/ghc/wiki/Migration/8.0).)
Reviewed By: thomie
Differential Revision: https://phabricator.haskell.org/D1663
GHC Trac Issues: #4340, #10272
Diffstat (limited to 'docs/users_guide/utils.rst')
-rw-r--r-- | docs/users_guide/utils.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/users_guide/utils.rst b/docs/users_guide/utils.rst index 9c1237dd02..f490bfa2d8 100644 --- a/docs/users_guide/utils.rst +++ b/docs/users_guide/utils.rst @@ -224,6 +224,10 @@ Meanings of specific keywords: Computes the size, in bytes, of ``struct_type``. It will have type ``Int``. +``#alignment ⟨struct_type⟩`` + Computes the alignment, in bytes, of ``struct_type``. It will have type + ``Int``. + ``#enum ⟨type⟩, ⟨constructor⟩, ⟨value⟩, ⟨value⟩, ...`` A shortcut for multiple definitions which use ``#const``. Each ``value`` is a name of a C integer constant, e.g. enumeration value. |