diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2021-07-22 07:26:47 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2021-08-03 17:33:08 +0000 |
commit | 562991def56ea199865e0404365c41314c66c646 (patch) | |
tree | 0476cae915656f05f874e9af85e489c7b1cceeac /libraries/ghc-heap/GHC | |
parent | 7a5636a18c821f6bfe3f4400d1fb368d110dead3 (diff) | |
download | haskell-wip/organize-headers.tar.gz |
Move `/includes` to `/rts/include`, sort per package betterwip/organize-headers
In order to make the packages in this repo "reinstallable", we need to
associate source code with a specific packages. Having a top level
`/includes` dir that mixes concerns (which packages' includes?) gets in
the way of this.
To start, I have moved everything to `rts/`, which is mostly correct.
There are a few things however that really don't belong in the rts (like
the generated constants haskell type, `CodeGen.Platform.h`). Those
needed to be manually adjusted.
Things of note:
- No symlinking for sake of windows, so we hard-link at configure time.
- `CodeGen.Platform.h` no longer as `.hs` extension (in addition to
being moved to `compiler/`) so as not to confuse anyone, since it is
next to Haskell files.
- Blanket `-Iincludes` is gone in both build systems, include paths now
more strictly respect per-package dependencies.
- `deriveConstants` has been taught to not require a `--target-os` flag
when generating the platform-agnostic Haskell type. Make takes
advantage of this, but Hadrian has yet to.
Diffstat (limited to 'libraries/ghc-heap/GHC')
4 files changed, 7 insertions, 7 deletions
diff --git a/libraries/ghc-heap/GHC/Exts/Heap/ClosureTypes.hs b/libraries/ghc-heap/GHC/Exts/Heap/ClosureTypes.hs index 1d25abee51..5eefe02d0d 100644 --- a/libraries/ghc-heap/GHC/Exts/Heap/ClosureTypes.hs +++ b/libraries/ghc-heap/GHC/Exts/Heap/ClosureTypes.hs @@ -12,7 +12,7 @@ import GHC.Generics {- --------------------------------------------- -- Enum representing closure types -- This is a mirror of: --- includes/rts/storage/ClosureTypes.h +-- rts/include/rts/storage/ClosureTypes.h -- ---------------------------------------------} data ClosureType diff --git a/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs b/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs index 3b51b22ceb..e15ae7008b 100644 --- a/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs +++ b/libraries/ghc-heap/GHC/Exts/Heap/Closures.hs @@ -98,7 +98,7 @@ areBoxesEqual (Box a) (Box b) = case reallyUnsafePtrEqualityUpToTag# a b of type Closure = GenClosure Box -- | This is the representation of a Haskell value on the heap. It reflects --- <https://gitlab.haskell.org/ghc/ghc/blob/master/includes/rts/storage/Closures.h> +-- <https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/storage/Closures.h> -- -- The data type is parametrized by `b`: the type to store references in. -- Usually this is a 'Box' with the type synonym 'Closure'. diff --git a/libraries/ghc-heap/GHC/Exts/Heap/InfoTable/Types.hsc b/libraries/ghc-heap/GHC/Exts/Heap/InfoTable/Types.hsc index 943a234391..667301157a 100644 --- a/libraries/ghc-heap/GHC/Exts/Heap/InfoTable/Types.hsc +++ b/libraries/ghc-heap/GHC/Exts/Heap/InfoTable/Types.hsc @@ -28,7 +28,7 @@ type HalfWord = Word16 type EntryFunPtr = FunPtr (Ptr () -> IO (Ptr ())) -- | This is a somewhat faithful representation of an info table. See --- <https://gitlab.haskell.org/ghc/ghc/blob/master/includes/rts/storage/InfoTables.h> +-- <https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/storage/InfoTables.h> -- for more details on this data structure. data StgInfoTable = StgInfoTable { entry :: Maybe EntryFunPtr, -- Just <=> not TABLES_NEXT_TO_CODE diff --git a/libraries/ghc-heap/GHC/Exts/Heap/ProfInfo/Types.hs b/libraries/ghc-heap/GHC/Exts/Heap/ProfInfo/Types.hs index 579d29098c..5ff030d923 100644 --- a/libraries/ghc-heap/GHC/Exts/Heap/ProfInfo/Types.hs +++ b/libraries/ghc-heap/GHC/Exts/Heap/ProfInfo/Types.hs @@ -7,14 +7,14 @@ import Data.Word import GHC.Generics -- | This is a somewhat faithful representation of StgTSOProfInfo. See --- <https://gitlab.haskell.org/ghc/ghc/blob/master/includes/rts/storage/TSO.h> +-- <https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/storage/TSO.h> -- for more details on this data structure. data StgTSOProfInfo = StgTSOProfInfo { cccs :: Maybe CostCentreStack } deriving (Show, Generic, Eq, Ord) -- | This is a somewhat faithful representation of CostCentreStack. See --- <https://gitlab.haskell.org/ghc/ghc/blob/master/includes/rts/prof/CCS.h> +-- <https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/prof/CCS.h> -- for more details on this data structure. data CostCentreStack = CostCentreStack { ccs_ccsID :: Int, @@ -32,7 +32,7 @@ data CostCentreStack = CostCentreStack { } deriving (Show, Generic, Eq, Ord) -- | This is a somewhat faithful representation of CostCentre. See --- <https://gitlab.haskell.org/ghc/ghc/blob/master/includes/rts/prof/CCS.h> +-- <https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/prof/CCS.h> -- for more details on this data structure. data CostCentre = CostCentre { cc_ccID :: Int, @@ -46,7 +46,7 @@ data CostCentre = CostCentre { } deriving (Show, Generic, Eq, Ord) -- | This is a somewhat faithful representation of IndexTable. See --- <https://gitlab.haskell.org/ghc/ghc/blob/master/includes/rts/prof/CCS.h> +-- <https://gitlab.haskell.org/ghc/ghc/blob/master/rts/include/rts/prof/CCS.h> -- for more details on this data structure. data IndexTable = IndexTable { it_cc :: CostCentre, |