[Git][ghc/ghc][wip/extensible-interface-files] Add discussion about FieldName formats for extensible fields

Josh Meredith gitlab at gitlab.haskell.org
Fri Apr 10 05:28:08 UTC 2020



Josh Meredith pushed to branch wip/extensible-interface-files at Glasgow Haskell Compiler / GHC


Commits:
46f80417 by Josh Meredith at 2020-04-10T15:27:49+10:00
Add discussion about FieldName formats for extensible fields

- - - - -


1 changed file:

- docs/users_guide/extending_ghc.rst


Changes:

=====================================
docs/users_guide/extending_ghc.rst
=====================================
@@ -759,6 +759,22 @@ GHC's internal ``Binary`` class. The interface to work with these fields is:
     writeIfaceField :: Binary a => FieldName -> a -> ModIface -> IO ModIface
     deleteIfaceField :: FieldName -> ModIface -> ModIface
 
+The ``FieldName`` is open-ended, but typically it should contain the producing
+package name, a version number, and the actual field name. For example, a GHC
+Core field might be named like:
+
+::
+
+    ghc-n.n.n/core
+
+In this example, the version would probably correspond to the package name, but
+a field that changes slower than the package version might associate the version
+with the field:
+
+::
+
+    example/field-n
+
 To read an interface file from an external tool without linking to GHC, the format
 is described at `Extensible Interface Files<https://gitlab.haskell.org/ghc/ghc/wikis/Extensible-Interface-Files>`_.
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/46f8041767f3a3a64035cfa4a97f1505c1e5566b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/46f8041767f3a3a64035cfa4a97f1505c1e5566b
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/20200410/1c984912/attachment.html>


More information about the ghc-commits mailing list