- First version. Released on an unsuspecting world.
Created
April 6, 2023 14:07
-
-
Save phadej/87d52ffc7965313cd8126278ffd9a4e5 to your computer and use it in GitHub Desktop.
Reproducer for https://gitlab.haskell.org/ghc/ghc/-/issues/23043
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cabal-version: 2.4 | |
name: bug23034 | |
version: 0.1.0.0 | |
extra-source-files: CHANGELOG.md | |
executable bug23034 | |
main-is: Main.hs | |
build-depends: base <5, template-haskell | |
default-language: Haskell2010 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TemplateHaskell #-} | |
module Main (main) where | |
import Language.Haskell.TH (litE, stringL) | |
import Language.Haskell.TH.Syntax (qAddDependentFile, qRunIO) | |
content :: String | |
content = | |
$(do | |
let fp = "CHANGELOG.md" | |
qAddDependentFile fp | |
contents <- qRunIO (readFile fp) | |
litE $ stringL contents | |
) | |
main :: IO () | |
main = putStr content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXETARGET=bug23034 | |
CABAL:=$(HOME)/.ghcup/bin/cabal | |
GHC:=$(HOME)/.ghcup/bin/ghc-9.2.7 | |
GHCUP:=$(HOME)/.ghcup/bin/ghcup | |
ALPINEVERSION:=3.17.3 | |
GHCUPVERSION:=0.1.19.2 | |
# GHCVERSION:=9.2.7 | |
# GHCVERSION:=9.4.4 | |
GHCVERSION:=9.6.1 | |
CABALVERSION:=3.10.1.0 | |
# docker run -ti -v $(pwd):/src alpine:3.17.3 | |
# cd /src/cabal-docspec | |
# apk add make | |
# make alpine-release | |
# | |
.PHONY: alpine-release | |
alpine-release : | |
apk add binutils-gold curl gcc g++ git gmp-dev libc-dev libffi-dev make musl-dev ncurses-dev openssh-client perl tar tmux vim xz zlib-dev zlib-static | |
mkdir -p $(HOME)/.ghcup/bin | |
curl https://downloads.haskell.org/~ghcup/$(GHCUPVERSION)/x86_64-linux-ghcup-$(GHCUPVERSION) > $(GHCUP) | |
chmod a+x $(GHCUP) | |
$(GHCUP) install ghc $(GHCVERSION) | |
$(GHCUP) install cabal $(CABALVERSION) | |
$(CABAL) update --ignore-project | |
$(CABAL) build exe:$(EXETARGET) -fexe --with-compiler $(GHC) --enable-executable-static |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment