From 964c3ec7390727b03181cd703f25d4a3cda5727b Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sun, 20 Mar 2022 17:36:21 +1100 Subject: [PATCH 1/5] WIP early sketching --- .gitignore | 5 +- cabal.project | 3 + docker-haskell.cabal | 42 ++++++++ gen/Main.hs | 24 +++++ gen/Model/DebianDistribution.hs | 4 + gen/Model/ImageVariant.hs | 5 + gen/Model/OperatingSystem.hs | 6 ++ gen/Model/ProcessorArchitecture.hs | 5 + template/debian.jinja | 167 +++++++++++++++++++++++++++++ 9 files changed, 260 insertions(+), 1 deletion(-) create mode 100644 cabal.project create mode 100644 docker-haskell.cabal create mode 100644 gen/Main.hs create mode 100644 gen/Model/DebianDistribution.hs create mode 100644 gen/Model/ImageVariant.hs create mode 100644 gen/Model/OperatingSystem.hs create mode 100644 gen/Model/ProcessorArchitecture.hs create mode 100644 template/debian.jinja diff --git a/.gitignore b/.gitignore index caf38ad..a037578 100644 --- a/.gitignore +++ b/.gitignore @@ -55,7 +55,8 @@ tramp .LSOverride # Icon must end with two \r -Icon +Icon + # Thumbnails ._* @@ -100,3 +101,5 @@ tmtags Session.vim .netrwhist *~ + +dist-newstyle diff --git a/cabal.project b/cabal.project new file mode 100644 index 0000000..1b85eff --- /dev/null +++ b/cabal.project @@ -0,0 +1,3 @@ +packages: . + +with-compiler: ghc-8.10.7 diff --git a/docker-haskell.cabal b/docker-haskell.cabal new file mode 100644 index 0000000..e7dcd72 --- /dev/null +++ b/docker-haskell.cabal @@ -0,0 +1,42 @@ +cabal-version: 2.4 +name: docker-haskell +version: 0.1.0.0 + +-- A short (one-line) description of the package. +-- synopsis: + +-- A longer description of the package. +-- description: + +-- A URL where users can report bugs. +-- bug-reports: + +-- The license under which the package is released. +license: MIT +author: Alistair Burrowes +maintainer: afburrowes@gmail.com + +-- A copyright notice. +-- copyright: +-- category: +extra-source-files: + README.md + +executable docker-haskell + main-is: Main.hs + + -- Modules included in this executable, other than Main. + other-modules: + Model.DebianDistribution, + Model.OperatingSystem, + Model.ProcessorArchitecture, + Model.ImageVariant + + -- LANGUAGE extensions used by modules in this package. + default-extensions: + LambdaCase + build-depends: base ^>=4.14.3.0, + ginger >= 0.10.4 && < 0.11, + text >= 1.2.4 && < 1.3, + hs-source-dirs: gen + default-language: Haskell2010 diff --git a/gen/Main.hs b/gen/Main.hs new file mode 100644 index 0000000..87abcff --- /dev/null +++ b/gen/Main.hs @@ -0,0 +1,24 @@ +module Main where + +import System.IO +import System.IO.Error +import qualified Data.Text as Text +import Text.Ginger + +main :: IO () +main = do + _ <- runGingerT (makeContextM scopeLookup (putStr . Text.unpack . htmlSource)) tpl + pure () + +loadFile :: FilePath -> IO String +loadFile fn = openFile fn ReadMode >>= hGetContents + +loadFileMay :: FilePath -> IO (Maybe String) +loadFileMay fn = + tryIOError (loadFile fn) >>= + \case + Right contents -> + return (Just contents) + Left err -> do + print err -- remove this line if you want to fail silently + return Nothing diff --git a/gen/Model/DebianDistribution.hs b/gen/Model/DebianDistribution.hs new file mode 100644 index 0000000..0c5b786 --- /dev/null +++ b/gen/Model/DebianDistribution.hs @@ -0,0 +1,4 @@ +module Model.DebianDistribution where + +data DebianDistribution = + DDBuster diff --git a/gen/Model/ImageVariant.hs b/gen/Model/ImageVariant.hs new file mode 100644 index 0000000..c8a079b --- /dev/null +++ b/gen/Model/ImageVariant.hs @@ -0,0 +1,5 @@ +module Model.ImageVariant where + +data Variant = + IVStandard + | IVSlim diff --git a/gen/Model/OperatingSystem.hs b/gen/Model/OperatingSystem.hs new file mode 100644 index 0000000..6f8dcf9 --- /dev/null +++ b/gen/Model/OperatingSystem.hs @@ -0,0 +1,6 @@ +module Model.OperatingSystem where + +data OperatingSystem = + OSDebian + | OSAlpine + | OSWindows diff --git a/gen/Model/ProcessorArchitecture.hs b/gen/Model/ProcessorArchitecture.hs new file mode 100644 index 0000000..65e38d7 --- /dev/null +++ b/gen/Model/ProcessorArchitecture.hs @@ -0,0 +1,5 @@ +module Model.ProcessorArchitecture where + +data ProcessorArchitecture = + PAx86 + | PAaarch64 diff --git a/template/debian.jinja b/template/debian.jinja new file mode 100644 index 0000000..058d2a6 --- /dev/null +++ b/template/debian.jinja @@ -0,0 +1,167 @@ +## Dockerfile for a haskell environment +{% if slim %} +FROM debian:{{distribution}} +{% else %} +FROM buildpack-deps:{{distribution}} +{% endif %} + +{% if slim %} +# common haskell + stack dependencies +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + dpkg-dev \ + git \ + gcc \ + gnupg \ + g++ \ + libc6-dev \ + libffi-dev \ + libgmp-dev \ + libnuma-dev \ + libtinfo-dev \ + make \ + netbase \ + xz-utils \ + zlib1g-dev && \ + rm -rf /var/lib/apt/lists/* +{% else %} +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + gnupg \ + libc6-dev \ + libffi-dev \ + libgmp-dev \ + libnuma-dev \ + libtinfo-dev \ + make \ + netbase \ + xz-utils \ + zlib1g-dev && \ + rm -rf /var/lib/apt/lists/* +{% endif %} + +## ensure locale is set during build +ENV LANG C.UTF-8 + +ARG STACK=2.7.5 +ARG STACK_RELEASE_KEY=C5705533DA4F78D8664B5DC0575159689BEFB442 + +RUN set -eux; \ + cd /tmp; \ + ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \ + INSTALL_STACK="true"; \ + STACK_URL="https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz"; \ + # sha256 from https://github.com/commercialhaskell/stack/releases/download/v${STACK}/stack-${STACK}-linux-$ARCH.tar.gz.sha256 + case "$ARCH" in \ + 'aarch64') \ + # Stack does not officially support ARM64, nor do the binaries that exist work. + # Hitting https://github.com/commercialhaskell/stack/issues/2103#issuecomment-972329065 when trying to use + # stack-2.7.1-linux-aarch64.tar.gz + INSTALL_STACK="false"; \ + ;; \ + 'x86_64') \ + STACK_SHA256='9bcd165358d4dcafd2b33320d4fe98ce72faaf62300cc9b0fb86a27eb670da50'; \ + ;; \ + *) echo >&2 "error: unsupported architecture '$ARCH'" ; exit 1 ;; \ + esac; \ + if [ "$INSTALL_STACK" = "true" ]; then \ + curl -sSL "$STACK_URL" -o stack.tar.gz; \ + echo "$STACK_SHA256 stack.tar.gz" | sha256sum --strict --check; \ + \ + curl -sSL "$STACK_URL.asc" -o stack.tar.gz.asc; \ + GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ + gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$STACK_RELEASE_KEY"; \ + gpg --batch --verify stack.tar.gz.asc stack.tar.gz; \ + gpgconf --kill all; \ + \ + tar -xf stack.tar.gz -C /usr/local/bin --strip-components=1 "stack-$STACK-linux-$ARCH/stack"; \ + stack config set system-ghc --global true; \ + stack config set install-ghc --global false; \ + \ + rm -rf /tmp/*; \ + \ + stack --version; \ + fi + +ARG CABAL_INSTALL=3.6.2.0 +ARG CABAL_INSTALL_RELEASE_KEY=A970DF3AC3B9709706D74544B3D9F94B8DCAE210 + +RUN set -eux; \ + cd /tmp; \ + ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \ + CABAL_INSTALL_TAR="cabal-install-$CABAL_INSTALL-$ARCH-linux-deb10.tar.xz"; \ + CABAL_INSTALL_URL="https://downloads.haskell.org/~cabal/cabal-install-$CABAL_INSTALL/$CABAL_INSTALL_TAR"; \ + CABAL_INSTALL_SHA256SUMS_URL="https://downloads.haskell.org/~cabal/cabal-install-$CABAL_INSTALL/SHA256SUMS"; \ + # sha256 from https://downloads.haskell.org/~cabal/cabal-install-$CABAL_INSTALL/SHA256SUMS + case "$ARCH" in \ + 'aarch64') \ + CABAL_INSTALL_SHA256='d9acee67d4308bc5c22d27bee034d388cc4192a25deff9e7e491e2396572b030'; \ + ;; \ + 'x86_64') \ + CABAL_INSTALL_SHA256='4759b56e9257e02f29fa374a6b25d6cb2f9d80c7e3a55d4f678a8e570925641c'; \ + ;; \ + *) echo >&2 "error: unsupported architecture '$ARCH'"; exit 1 ;; \ + esac; \ + curl -fSL "$CABAL_INSTALL_URL" -o cabal-install.tar.gz; \ + echo "$CABAL_INSTALL_SHA256 cabal-install.tar.gz" | sha256sum --strict --check; \ + \ + curl -sSLO "$CABAL_INSTALL_SHA256SUMS_URL"; \ + curl -sSLO "$CABAL_INSTALL_SHA256SUMS_URL.sig"; \ + GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ + gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$CABAL_INSTALL_RELEASE_KEY"; \ + gpg --batch --verify SHA256SUMS.sig SHA256SUMS; \ + # confirm we are verying SHA256SUMS that matches the release + sha256 + grep "$CABAL_INSTALL_SHA256 $CABAL_INSTALL_TAR" SHA256SUMS; \ + gpgconf --kill all; \ + \ + tar -xf cabal-install.tar.gz -C /usr/local/bin; \ + \ + rm -rf /tmp/*; \ + \ + cabal --version + +ARG GHC={{ghcVersion}} +ARG GHC_RELEASE_KEY=FFEB7CE81E16A36B3E2DED6F2DE04D4E97DB64AD + +RUN set -eux; \ + cd /tmp; \ + ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)"; \ + GHC_URL="https://downloads.haskell.org/~ghc/$GHC/ghc-$GHC-$ARCH-deb10-linux.tar.xz"; \ + # sha256 from https://downloads.haskell.org/~ghc/$GHC/SHA256SUMS + case "$ARCH" in \ + 'aarch64') \ + GHC_SHA256='f3621ccba7ae48fcd67a9505f61bb5ccfb05c4cbfecd5a6ea65fe3f150af0e98'; \ + ;; \ + 'x86_64') \ + GHC_SHA256='fb61dea556a2023dc2d50ee61a22144bb23e4229a378e533065124c218f40cfc'; \ + ;; \ + *) echo >&2 "error: unsupported architecture '$ARCH'" ; exit 1 ;; \ + esac; \ + curl -sSL "$GHC_URL" -o ghc.tar.xz; \ + echo "$GHC_SHA256 ghc.tar.xz" | sha256sum --strict --check; \ + \ + GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ + curl -sSL "$GHC_URL.sig" -o ghc.tar.xz.sig; \ + gpg --batch --keyserver keyserver.ubuntu.com --receive-keys "$GHC_RELEASE_KEY"; \ + gpg --batch --verify ghc.tar.xz.sig ghc.tar.xz; \ + gpgconf --kill all; \ + \ + tar xf ghc.tar.xz; \ + cd "ghc-$GHC"; \ + ./configure --prefix "/opt/ghc/$GHC"; \ + make install; \ + # remove some docs +{% if slim %} + find "/opt/ghc/$GHC/" \( -name "*_p.a" -o -name "*.p_hi" \) -type f -delete; \ +{% endif %} + rm -rf "/opt/ghc/$GHC/share/"; \ + \ + rm -rf /tmp/*; \ + \ + "/opt/ghc/$GHC/bin/ghc" --version + +ENV PATH /root/.cabal/bin:/root/.local/bin:/opt/ghc/${GHC}/bin:$PATH + +CMD ["ghci"] From 9a6e1c9931f5ec614cb0be3834ccbc067529bdab Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Mon, 18 Apr 2022 13:49:54 +1000 Subject: [PATCH 2/5] More sketching and thinking --- gen/Main.hs | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++ versions.json | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 versions.json diff --git a/gen/Main.hs b/gen/Main.hs index 87abcff..fa215e1 100644 --- a/gen/Main.hs +++ b/gen/Main.hs @@ -22,3 +22,67 @@ loadFileMay fn = Left err -> do print err -- remove this line if you want to fail silently return Nothing + +{ + ghc: { + releasers: [{ + name: ben.gamari, + pgpKey: asdfasdf3423423432 + } + releases: [{ + version: 8.10.7, + sha256: asdfasdfasdf124124, + releasedBy: ben.gamari + }, + { + version: 9.0.2, + sha256: asdfasdfasdf124124, + releasedBy: ben.gamari + } + ] + }, + stack: { + version: 2.7.5, + pgpKey: asdfsadfds234234, + releases: [{ + osType: linux, + arch: amd64, + sha256: adsfasdf12123, + + }, + { + osType: windows, + arch: amd64, + sha256: adsfasdf12123 + } + ] + }, + cabal: { + version: 3.6.2.0, + pgpKey: asdfsadfds234234, + releases: [{ + os: debian, + osVersion: buster, + arch: amd64, + sha256: adsfasdf12123, + }, + ] + } + operatingSystemsVariants: [ + { + name: debian, + variants: [standard, slim], + versions: [buster] + + }, + { + name: alpine, + versions: [3.14, 3.15] + }, + { + name: windows, + variants: [windowsservercore, nanoserver] + versions: [1809, ltsc2022] + } + ] +} diff --git a/versions.json b/versions.json new file mode 100644 index 0000000..750f18e --- /dev/null +++ b/versions.json @@ -0,0 +1,64 @@ + +{ + ghc: { + releasers: [{ + name: ben.gamari, + pgpKey: asdfasdf3423423432 + } + releases: [{ + version: 8.10.7, + sha256: asdfasdfasdf124124, + releasedBy: ben.gamari + }, + { + version: 9.0.2, + sha256: asdfasdfasdf124124, + releasedBy: ben.gamari + } + ] + }, + stack: { + version: 2.7.5, + pgpKey: asdfsadfds234234, + releases: [{ + osType: linux, + arch: amd64, + sha256: adsfasdf12123, + + }, + { + osType: windows, + arch: amd64, + sha256: adsfasdf12123 + } + ] + }, + cabal: { + version: 3.6.2.0, + pgpKey: asdfsadfds234234, + releases: [{ + os: debian, + osVersion: buster, + arch: amd64, + sha256: adsfasdf12123, + }, + ] + } + operatingSystemsVariants: [ + { + name: debian, + variants: [standard, slim], + versions: [buster] + + }, + { + name: alpine, + versions: [3.14, 3.15] + }, + { + name: windows, + variants: [windowsservercore, nanoserver] + versions: [1809, ltsc2022] + } + ] +} From 9b718814104f700448dbb6fea4a95c3532ef2584 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Mon, 18 Apr 2022 20:36:42 +1000 Subject: [PATCH 3/5] Thinking more --- gen/Main.hs | 64 ------------------------ versions.json | 131 +++++++++++++++++++++++++++----------------------- 2 files changed, 72 insertions(+), 123 deletions(-) diff --git a/gen/Main.hs b/gen/Main.hs index fa215e1..87abcff 100644 --- a/gen/Main.hs +++ b/gen/Main.hs @@ -22,67 +22,3 @@ loadFileMay fn = Left err -> do print err -- remove this line if you want to fail silently return Nothing - -{ - ghc: { - releasers: [{ - name: ben.gamari, - pgpKey: asdfasdf3423423432 - } - releases: [{ - version: 8.10.7, - sha256: asdfasdfasdf124124, - releasedBy: ben.gamari - }, - { - version: 9.0.2, - sha256: asdfasdfasdf124124, - releasedBy: ben.gamari - } - ] - }, - stack: { - version: 2.7.5, - pgpKey: asdfsadfds234234, - releases: [{ - osType: linux, - arch: amd64, - sha256: adsfasdf12123, - - }, - { - osType: windows, - arch: amd64, - sha256: adsfasdf12123 - } - ] - }, - cabal: { - version: 3.6.2.0, - pgpKey: asdfsadfds234234, - releases: [{ - os: debian, - osVersion: buster, - arch: amd64, - sha256: adsfasdf12123, - }, - ] - } - operatingSystemsVariants: [ - { - name: debian, - variants: [standard, slim], - versions: [buster] - - }, - { - name: alpine, - versions: [3.14, 3.15] - }, - { - name: windows, - variants: [windowsservercore, nanoserver] - versions: [1809, ltsc2022] - } - ] -} diff --git a/versions.json b/versions.json index 750f18e..a4aa7cf 100644 --- a/versions.json +++ b/versions.json @@ -1,64 +1,77 @@ - { - ghc: { - releasers: [{ - name: ben.gamari, - pgpKey: asdfasdf3423423432 - } - releases: [{ - version: 8.10.7, - sha256: asdfasdfasdf124124, - releasedBy: ben.gamari - }, - { - version: 9.0.2, - sha256: asdfasdfasdf124124, - releasedBy: ben.gamari - } - ] + "ghc": { + "releasers": [ + { + "name": "ben.gamari", + "pgpKey": "asdfasdf3423423432" + } + ], + "releases": [ + { + "version": "8.10.7", + "os": "debian", + "osVersion": "buster", + "sha256": "asdfasdfasdf124124", + "releasedBy": "ben.gamari" + } + ] + }, + "stack": { + "version": "2.7.5", + "pgpKey": "asdfsadfds234234", + "releases": [ + { + "osType": "linux", + "arch": "amd64", + "sha256": "adsfasdf12123" + }, + { + "osType": "windows", + "arch": "amd64", + "sha256": "adsfasdf12123" + } + ] + }, + "cabal": { + "version": "3.6.2.0", + "pgpKey": "asdfsadfds234234", + "releases": [ + { + "os": "debian", + "osVersion": "buster", + "arch": "amd64", + "sha256": "adsfasdf12123" + } + ] + }, + "osVariants": [ + { + "name": "debian", + "variants": [ + "standard", + "slim" + ], + "versions": [ + "buster" + ] }, - stack: { - version: 2.7.5, - pgpKey: asdfsadfds234234, - releases: [{ - osType: linux, - arch: amd64, - sha256: adsfasdf12123, - - }, - { - osType: windows, - arch: amd64, - sha256: adsfasdf12123 - } - ] + { + "name": "alpine", + "versions": [ + "3.14", + "3.15" + ] }, - cabal: { - version: 3.6.2.0, - pgpKey: asdfsadfds234234, - releases: [{ - os: debian, - osVersion: buster, - arch: amd64, - sha256: adsfasdf12123, - }, - ] + { + "name": "windows", + "variants": [ + "windowsservercore", + "nanoserver" + ], + "versions": [ + "1809", + "ltsc2022" + ] } - operatingSystemsVariants: [ - { - name: debian, - variants: [standard, slim], - versions: [buster] - - }, - { - name: alpine, - versions: [3.14, 3.15] - }, - { - name: windows, - variants: [windowsservercore, nanoserver] - versions: [1809, ltsc2022] - } - ] + ] } From 18b4dccd5a84c07c614f07a2cffdf1fc264aba10 Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Fri, 22 Apr 2022 20:12:44 +1000 Subject: [PATCH 4/5] Thinkg --- docker-haskell.cabal | 2 +- gen/Model/GHC/GHCInfo.hs | 6 ++++++ gen/Model/GHC/GHCReleaser.hs | 6 ++++++ gen/Model/ImageVariant.hs | 4 +--- gen/Model/PGPKey.hs | 3 +++ 5 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 gen/Model/GHC/GHCInfo.hs create mode 100644 gen/Model/GHC/GHCReleaser.hs create mode 100644 gen/Model/PGPKey.hs diff --git a/docker-haskell.cabal b/docker-haskell.cabal index e7dcd72..99f713f 100644 --- a/docker-haskell.cabal +++ b/docker-haskell.cabal @@ -36,7 +36,7 @@ executable docker-haskell default-extensions: LambdaCase build-depends: base ^>=4.14.3.0, - ginger >= 0.10.4 && < 0.11, + stache >= 2.3.1 && < 2.4, text >= 1.2.4 && < 1.3, hs-source-dirs: gen default-language: Haskell2010 diff --git a/gen/Model/GHC/GHCInfo.hs b/gen/Model/GHC/GHCInfo.hs new file mode 100644 index 0000000..a12c473 --- /dev/null +++ b/gen/Model/GHC/GHCInfo.hs @@ -0,0 +1,6 @@ +module Model.GHCInfo where + +data GhcInfo = GhcInfo { + _releasers :: [GHCReleaser], + _ghcReleases :: [GHCRelease] +} diff --git a/gen/Model/GHC/GHCReleaser.hs b/gen/Model/GHC/GHCReleaser.hs new file mode 100644 index 0000000..39b9170 --- /dev/null +++ b/gen/Model/GHC/GHCReleaser.hs @@ -0,0 +1,6 @@ +module Model.GHC.GHCReleaser where + +data GHCReleaser = GHCReleaser { + _name :: String, + _pgpKey :: PGPKey +} diff --git a/gen/Model/ImageVariant.hs b/gen/Model/ImageVariant.hs index c8a079b..4fbe52a 100644 --- a/gen/Model/ImageVariant.hs +++ b/gen/Model/ImageVariant.hs @@ -1,5 +1,3 @@ module Model.ImageVariant where -data Variant = - IVStandard - | IVSlim +newtype ImageVariant = ImageVariant String diff --git a/gen/Model/PGPKey.hs b/gen/Model/PGPKey.hs new file mode 100644 index 0000000..84846b8 --- /dev/null +++ b/gen/Model/PGPKey.hs @@ -0,0 +1,3 @@ +module Model.ImageVariant where + +newtype PGPKey = PGPKey String From a7ddf9a3ccf231b845a0cb470af857399ede00da Mon Sep 17 00:00:00 2001 From: Alistair Burrowes Date: Sat, 23 Apr 2022 17:19:56 +1000 Subject: [PATCH 5/5] Wip - more thinking --- gen/Model/GHC/GHCInfo.hs | 6 ------ gen/Model/GHC/GhcInfo.hs | 6 ++++++ gen/Model/GHC/GhcRelease.hs | 7 +++++++ gen/Model/GHC/{GHCReleaser.hs => GhcReleaser.hs} | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) delete mode 100644 gen/Model/GHC/GHCInfo.hs create mode 100644 gen/Model/GHC/GhcInfo.hs create mode 100644 gen/Model/GHC/GhcRelease.hs rename gen/Model/GHC/{GHCReleaser.hs => GhcReleaser.hs} (70%) diff --git a/gen/Model/GHC/GHCInfo.hs b/gen/Model/GHC/GHCInfo.hs deleted file mode 100644 index a12c473..0000000 --- a/gen/Model/GHC/GHCInfo.hs +++ /dev/null @@ -1,6 +0,0 @@ -module Model.GHCInfo where - -data GhcInfo = GhcInfo { - _releasers :: [GHCReleaser], - _ghcReleases :: [GHCRelease] -} diff --git a/gen/Model/GHC/GhcInfo.hs b/gen/Model/GHC/GhcInfo.hs new file mode 100644 index 0000000..4ab093e --- /dev/null +++ b/gen/Model/GHC/GhcInfo.hs @@ -0,0 +1,6 @@ +module Model.GhcInfo where + +data GhcInfo = GhcInfo { + _ghcReleasers :: [GhcReleaser], + _ghcReleases :: [GhcRelease] +} diff --git a/gen/Model/GHC/GhcRelease.hs b/gen/Model/GHC/GhcRelease.hs new file mode 100644 index 0000000..684ede2 --- /dev/null +++ b/gen/Model/GHC/GhcRelease.hs @@ -0,0 +1,7 @@ +module Model.GHC.GhcReleaser where + +data GhcRelease = GhcRelease { + _version :: Version, + _os :: OperatingSystem, + _osVersion :: OperatingSystemVersion, +} diff --git a/gen/Model/GHC/GHCReleaser.hs b/gen/Model/GHC/GhcReleaser.hs similarity index 70% rename from gen/Model/GHC/GHCReleaser.hs rename to gen/Model/GHC/GhcReleaser.hs index 39b9170..11a1eea 100644 --- a/gen/Model/GHC/GHCReleaser.hs +++ b/gen/Model/GHC/GhcReleaser.hs @@ -1,6 +1,6 @@ module Model.GHC.GHCReleaser where -data GHCReleaser = GHCReleaser { +data GhcReleaser = GhcReleaser { _name :: String, _pgpKey :: PGPKey }