Package: ghc Version: 8.8.1+dfsg2-1~exp1 Dear Maintainer,
When ":print length" is run at the GHCi prompt, the 'impossible' happens: $ ghci GHCi, version 8.8.1: https://www.haskell.org/ghc/ :? for help Prelude> :print length ghc: panic! (the 'impossible' happened) (GHC version 8.8.1 for x86_64-unknown-linux): isUnliftedType t1_a1w0[rt] :: TYPE t0_a1vZ[rt] Call stack: CallStack (from HasCallStack): callStackDoc, called at compiler/utils/Outputable.hs:1159:37 in ghc:Outputable pprPanic, called at compiler/types/Type.hs:2278:10 in ghc:Type Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug This does not happen with all functions. In fact, length is the only function I have found so far that does this. If I define my own version of length, len, this bug does not appear: Prelude> :{ Prelude| len l = case l of Prelude| [] -> 0 Prelude| (x:xs) -> 1 + len xs Prelude| :} Prelude> :print len len = (_t1::Num p => [a] -> p) So, maybe length is defined in C code in the compiler rather than an actual Haskell function, and that is what triggers the bug? I've also tested this in version ghc_8.8.1+dfsg1+is+8.6.5+dfsg1-2 (the current latest in testing) with the same results. Related: #914702 (however, that bug seems to be fixed in both the versions I tried). Thanks, Asher -- Steal this tagline. I did. GPG fingerprint: 38F3 975C D173 4037 B397 8095 D4C9 C4FC 5460 8E68 -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 5.3.0-2-amd64 (SMP w/2 CPU cores) Kernel taint flags: TAINT_FIRMWARE_WORKAROUND Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages ghc depends on: ii dpkg 1.19.7 ii gcc 4:9.2.1-3.1 ii libbsd-dev 0.10.0-1 ii libc6 2.29-3 ii libc6-dev 2.29-3 ii libffi-dev 3.2.1-9 ii libffi6 3.2.1-9 ii libgmp-dev 2:6.1.2+dfsg-4 ii libgmp10 2:6.1.2+dfsg-4 ii libncurses-dev [libncurses5-dev] 6.1+20191019-1 ii libncurses5-dev 6.1+20191019-1 ii libtinfo6 6.1+20191019-1 ghc recommends no packages. Versions of packages ghc suggests: it ghc-doc 8.8.1+dfsg1+is+8.6.5+dfsg1-2 pn ghc-prof <none> ii haskell-doc 20061128 ii llvm-7 1:7.0.1-9+b2 ii perl 5.30.0-9 -- no debconf information
signature.asc
Description: PGP signature