!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

699 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://nixos.org/manual/nixpkgs/unstable/#haskell | Current PR: https://github.com/nixos/nixpkgs/pulls?q=is%3Apr+is%3Aopen+head%3Ahaskell-updates | Maintainer Docs: https://github.com/NixOS/nixpkgs/blob/haskell-updates/pkgs/development/haskell-modules/HACKING.md | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org | Merger Schedule: https://cloud.maralorn.de/apps/calendar/p/H6migHmKX7xHoTFa/dayGridMonth/now | Join #haskell.nix:libera.chat for question about the alternative haskell.nix infrastructure137 Servers

Load older messages


SenderMessageTime
19 Feb 2026
@alexfmpe:matrix.orgalexfmpehuh hang on a sec, there's 3 sets of single quote pairs in there?23:58:14
@woobilicious:matrix.orgwoobiliciousmust be a bug lol23:59:04
@alexfmpe:matrix.orgalexfmpe

I dunno how that works, but it works

nix-repl> ''export LD_LIBRARY_PATH=`pwd`/dist/build''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH''  
"export LD_LIBRARY_PATH=`pwd`/dist/build\${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
23:59:13
@woobilicious:matrix.orgwoobiliciousoh it lets you use ${} in the bash script23:59:40
20 Feb 2026
@alexfmpe:matrix.orgalexfmpe

what is this madness

nix-repl> ''abc''def''                                                                       
error: undefined variable 'def'''
       at «string»:1:8:
            1| ''abc''def''
             |        ^

nix-repl> ''abc''$def''
"abc$def"
00:00:19
@woobilicious:matrix.orgwoobiliciousyeah it treats $ literally00:00:39
@alexfmpe:matrix.orgalexfmpe
nix-repl> ''abc'$def''  
"abc'$def"
00:01:00
@alexfmpe:matrix.orgalexfmpeI need to hit someone00:01:16
@alexfmpe:matrix.orgalexfmpe so IIUC, ''$ is a fancy special construct to quote $ ? 00:02:00
@woobilicious:matrix.orgwoobilicious
nix-repl> ''abc''${test}''
"abc\${test}"
00:02:21
@alexfmpe:matrix.orgalexfmpelooks like it00:02:33
@alexfmpe:matrix.orgalexfmpedisturbing but whatever00:02:42
@alexfmpe:matrix.orgalexfmpe I really don't see how ''$ improves on \$ 00:03:40
@woobilicious:matrix.orgwoobilicious
nix-repl> ''''$''
"$"

nix-repl> ''abc''$def''
"abc$def"
00:05:04
@alexfmpe:matrix.orgalexfmpewhat the hell00:05:13
@woobilicious:matrix.orgwoobiliciousMine gives a different result lol00:05:17
@alexfmpe:matrix.orgalexfmpe
 nix-repl> "abc\${def}"    
"abc\${def}"

nix-repl> ''abc\${def}''
error: undefined variable 'def'
       at «string»:1:9:
            1| ''abc\${def}''
             |         ^
00:05:20
@alexfmpe:matrix.orgalexfmpenah, I used both 1 and 2 single quotes above00:06:00
@alexfmpe:matrix.orgalexfmpeyours is the same as my 2 ', just not the 1 '00:06:27
@alexfmpe:matrix.orgalexfmpe *
nix-repl> "abc\${def}"    
"abc\${def}"

nix-repl> ''abc\${def}''
error: undefined variable 'def'
       at «string»:1:9:
            1| ''abc\${def}''
             |         ^
00:06:48
@woobilicious:matrix.orgwoobiliciousI guess maybe there's instances where you want to pass escapes from variables00:07:03
@woobilicious:matrix.orgwoobiliciousoh yeah somehow I thought you had two singles on that line00:07:36
@alexfmpe:matrix.orgalexfmpe
nix-repl> "abc''\def"    
"abc''def"
00:07:41
@alexfmpe:matrix.orgalexfmpe????00:07:44
@woobilicious:matrix.orgwoobilicious Tho \\ should just work lol 00:07:54
@alexfmpe:matrix.orgalexfmpeoh nevermind I don't have $ there00:08:31
@alexfmpe:matrix.orgalexfmpestill, don't much care for this escape-differently-in-multiline-strings business00:09:07
@alexfmpe:matrix.orgalexfmpehttps://nix.dev/manual/nix/2.24/language/syntax00:10:00
@alexfmpe:matrix.orgalexfmpe* still, don't much care for this escape-differently-in-indented-strings business00:10:11
@alexfmpe:matrix.orgalexfmpe ''\ escapes any other character. 00:10:21

Show newer messages


Back to Room ListRoom Version: 6