Skip to content
Snippets Groups Projects
Commit ddcdd88c authored by Rodrigo Mesquita's avatar Rodrigo Mesquita :seedling: Committed by Marge Bot
Browse files

Split GHC.Platform.ArchOS from ghc-boot into ghc-platform

Split off the `GHC.Platform.ArchOS` module from the `ghc-boot` package
into this reinstallable standalone package which abides by the PVP, in
part motivated by the ongoing work on `ghc-toolchain` towards runtime
retargetability.
parent bea0e323
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ module Packages (
array, base, binary, bytestring, cabal, cabalSyntax, checkPpr,
checkExact, countDeps,
compareSizes, compiler, containers, deepseq, deriveConstants, directory, dumpDecls,
exceptions, filepath, genapply, genprimopcode, ghc, ghcBignum, ghcBoot, ghcBootTh,
exceptions, filepath, genapply, genprimopcode, ghc, ghcBignum, ghcBoot, ghcBootTh, ghcPlatform,
ghcCompact, ghcConfig, ghcHeap, ghci, ghciWrapper, ghcPkg, ghcPrim, haddock, haskeline,
hsc2hs, hp2ps, hpc, hpcBin, integerGmp, integerSimple, iserv, iservProxy,
libffi, mtl, parsec, pretty, primitive, process, remoteIserv, rts,
......@@ -36,7 +36,7 @@ ghcPackages :: [Package]
ghcPackages =
[ array, base, binary, bytestring, cabalSyntax, cabal, checkPpr, checkExact, countDeps
, compareSizes, compiler, containers, deepseq, deriveConstants, directory, dumpDecls
, exceptions, filepath, genapply, genprimopcode, ghc, ghcBignum, ghcBoot, ghcBootTh
, exceptions, filepath, genapply, genprimopcode, ghc, ghcBignum, ghcBoot, ghcBootTh, ghcPlatform
, ghcCompact, ghcConfig, ghcHeap, ghci, ghciWrapper, ghcPkg, ghcPrim, haddock, haskeline, hsc2hs
, hp2ps, hpc, hpcBin, integerGmp, integerSimple, iserv, libffi, mtl
, parsec, pretty, process, rts, runGhc, stm, semaphoreCompat, templateHaskell
......@@ -52,7 +52,7 @@ isGhcPackage = (`elem` ghcPackages)
-- | Package definitions, see 'Package'.
array, base, binary, bytestring, cabalSyntax, cabal, checkPpr, checkExact, countDeps,
compareSizes, compiler, containers, deepseq, deriveConstants, directory, dumpDecls,
exceptions, filepath, genapply, genprimopcode, ghc, ghcBignum, ghcBoot, ghcBootTh,
exceptions, filepath, genapply, genprimopcode, ghc, ghcBignum, ghcBoot, ghcBootTh, ghcPlatform,
ghcCompact, ghcConfig, ghcHeap, ghci, ghciWrapper, ghcPkg, ghcPrim, haddock, haskeline, hsc2hs,
hp2ps, hpc, hpcBin, integerGmp, integerSimple, iserv, iservProxy, remoteIserv, libffi, mtl,
parsec, pretty, primitive, process, rts, runGhc, semaphoreCompat, stm, templateHaskell,
......@@ -84,6 +84,7 @@ ghc = prg "ghc-bin" `setPath` "ghc"
ghcBignum = lib "ghc-bignum"
ghcBoot = lib "ghc-boot"
ghcBootTh = lib "ghc-boot-th"
ghcPlatform = lib "ghc-platform"
ghcCompact = lib "ghc-compact"
ghcConfig = prg "ghc-config" `setPath` "testsuite/ghc-config"
ghcHeap = lib "ghc-heap"
......
......@@ -158,6 +158,7 @@ toolTargets = [ binary
-- , runGhc -- # depends on ghc library
, ghcBoot
, ghcBootTh
, ghcPlatform
, ghcHeap
, ghci
, ghcPkg -- # executable
......
......@@ -85,6 +85,7 @@ stage0Packages = do
, runGhc
, ghcBoot
, ghcBootTh
, ghcPlatform
, ghcHeap
, ghci
, ghcPkg
......
......@@ -51,7 +51,6 @@ Library
GHC.Serialized
GHC.ForeignSrcLang
GHC.HandleEncoding
GHC.Platform.ArchOS
GHC.Platform.Host
GHC.Settings.Utils
GHC.UniqueSubdir
......@@ -65,6 +64,10 @@ Library
, GHC.ForeignSrcLang.Type
, GHC.Lexeme
-- reexport platform modules from ghc-platform
reexported-modules:
GHC.Platform.ArchOS
-- but done by Hadrian
autogen-modules:
GHC.Version
......@@ -77,6 +80,7 @@ Library
directory >= 1.2 && < 1.4,
filepath >= 1.3 && < 1.5,
deepseq >= 1.4 && < 1.5,
ghc-platform >= 0.1,
ghc-boot-th == @ProjectVersionMunged@
if !os(windows)
build-depends:
......
# Revision history for ghc-platform
## 0.1.0.0 -- 2023-06-20
* First version. Split off the `GHC.Platform.ArchOS` module from the `ghc-boot`
package into this reinstallable standalone package which abides by the PVP,
in part motivated by the ongoing work on `ghc-toolchain` towards runtime retargetability.
Copyright (c) 2023, Rodrigo Mesquita
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Rodrigo Mesquita nor the names of other
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cabal-version: 3.0
name: ghc-platform
version: 0.1.0.0
synopsis: Platform information used by GHC and friends
license: BSD-3-Clause
license-file: LICENSE
author: Rodrigo Mesquita
maintainer: ghc-devs@haskell.org
build-type: Simple
extra-doc-files: CHANGELOG.md
common warnings
ghc-options: -Wall
library
import: warnings
exposed-modules: GHC.Platform.ArchOS
build-depends: base >=4.15.0.0
hs-source-dirs: src
default-language: Haskell2010
{-# LANGUAGE LambdaCase, ScopedTypeVariables #-}
-- | Platform architecture and OS
--
-- We need it in ghc-boot because ghc-pkg needs it.
module GHC.Platform.ArchOS
( ArchOS(..)
-- * Architectures
, Arch(..)
, OS(..)
, ArmISA(..)
, ArmISAExt(..)
, ArmABI(..)
, PPC_64ABI(..)
, stringEncodeArch
-- * Operating systems
, OS(..)
, stringEncodeOS
)
where
......@@ -27,10 +29,6 @@ data ArchOS
deriving (Read, Show, Eq, Ord)
-- | Architectures
--
-- TODO: It might be nice to extend these constructors with information about
-- what instruction set extensions an architecture might support.
--
data Arch
= ArchUnknown
| ArchX86
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment