!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

727 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/142 Servers

Load older messages


SenderMessageTime
2 Mar 2026
@alex:tunstall.xyzAlex

Works fine for me.

alex@alex-pc3 ~> nix-shell -p ghc --run fish
alex@alex-pc3 nix-shell:/t/nix-shell-1930075-2124826253> ghc -prof Hello.hs
[1 of 2] Compiling Main             ( Hello.hs, Hello.o )
[2 of 2] Linking Hello
alex@alex-pc3 nix-shell:/t/nix-shell-1930075-2124826253> ./Hello -RTS -p
Hello, world!
alex@alex-pc3 nix-shell:/t/nix-shell-1930075-2124826253> cat Hello.prof
	Mon Mar  2 21:25 2026 Time and Allocation Profiling Report  (Final)

	   Hello +RTS -p -s -RTS

	total time  =        0.00 secs   (0 ticks @ 1000 us, 1 processor)
	total alloc =      49,280 bytes  (excludes profiling overheads)

COST CENTRE MODULE                    SRC              %time %alloc

MAIN        MAIN                      <built-in>         0.0   22.7
CAF         GHC.Internal.IO.Handle.FD <entire-module>    0.0   70.5
CAF         GHC.Internal.IO.Encoding  <entire-module>    0.0    5.0
CAF         GHC.Internal.Conc.Signal  <entire-module>    0.0    1.3


                                                                               individual      inherited
COST CENTRE  MODULE                         SRC             no.     entries  %time %alloc   %time %alloc

MAIN         MAIN                           <built-in>      138           0    0.0   22.7     0.0  100.0
 CAF         GHC.Internal.Conc.Signal       <entire-module> 262           0    0.0    1.3     0.0    1.3
 CAF         GHC.Internal.IO.Encoding       <entire-module> 208           0    0.0    5.0     0.0    5.0
 CAF         GHC.Internal.IO.Encoding.Iconv <entire-module> 206           0    0.0    0.4     0.0    0.4
 CAF         GHC.Internal.IO.Handle.FD      <entire-module> 197           0    0.0   70.5     0.0   70.5
 CAF         Main                           <entire-module> 145           0    0.0    0.1     0.0    0.1
21:26:47
@alex:tunstall.xyzAlex

For reproducibility, I should also mention this:

alex@alex-pc3 ~> nixos-version
25.11.2793.89dbf01df72e (Xantusia)
21:28:03
@alex:tunstall.xyzAlex *

Works fine for me.

alex@alex-pc3 ~> nix-shell -p ghc --run fish
alex@alex-pc3 nix-shell:/t/nix-shell-1930075-2124826253> ghc -prof Hello.hs
[1 of 2] Compiling Main             ( Hello.hs, Hello.o )
[2 of 2] Linking Hello
alex@alex-pc3 nix-shell:/t/nix-shell-1930075-2124826253> ./Hello +RTS -p
Hello, world!
alex@alex-pc3 nix-shell:/t/nix-shell-1930075-2124826253> cat Hello.prof
	Mon Mar  2 21:25 2026 Time and Allocation Profiling Report  (Final)

	   Hello +RTS -p -RTS

	total time  =        0.00 secs   (0 ticks @ 1000 us, 1 processor)
	total alloc =      49,280 bytes  (excludes profiling overheads)

COST CENTRE MODULE                    SRC              %time %alloc

MAIN        MAIN                      <built-in>         0.0   22.7
CAF         GHC.Internal.IO.Handle.FD <entire-module>    0.0   70.5
CAF         GHC.Internal.IO.Encoding  <entire-module>    0.0    5.0
CAF         GHC.Internal.Conc.Signal  <entire-module>    0.0    1.3


                                                                               individual      inherited
COST CENTRE  MODULE                         SRC             no.     entries  %time %alloc   %time %alloc

MAIN         MAIN                           <built-in>      138           0    0.0   22.7     0.0  100.0
 CAF         GHC.Internal.Conc.Signal       <entire-module> 262           0    0.0    1.3     0.0    1.3
 CAF         GHC.Internal.IO.Encoding       <entire-module> 208           0    0.0    5.0     0.0    5.0
 CAF         GHC.Internal.IO.Encoding.Iconv <entire-module> 206           0    0.0    0.4     0.0    0.4
 CAF         GHC.Internal.IO.Handle.FD      <entire-module> 197           0    0.0   70.5     0.0   70.5
 CAF         Main                           <entire-module> 145           0    0.0    0.1     0.0    0.1
21:29:28
3 Mar 2026
@iclanzan:matrix.orgiclanzan I figured it out. I am using TemplateHaskell and for that to work with -prof I needed to add -fexternal-interpreter. GHC’s error message indicated that as a possible solution but I didn’t explore it. 🤦 01:34:03
4 Mar 2026
@sternenseemann:systemli.orgsterni (he/him)in this case updating should help recent versions of nixpkgs build cabal2nix against Cabal 3.1421:21:58
20 May 2021
@grahamc:nixos.org@grahamc:nixos.org set the history visibility to "world_readable".22:10:58
@grahamc:nixos.org@grahamc:nixos.org changed the room name to "" from "".22:10:58
@grahamc:nixos.org@grahamc:nixos.org invited @maralorn:maralorn.demaralorn.22:11:05
@maralorn:maralorn.demaralorn joined the room.22:11:13
@andi:kack.itandi- joined the room.22:30:49
@grahamc:nixos.org@grahamc:nixos.orgchanged room power levels.22:36:42
Room Avatar Renderer.22:46:20
@maralorn:maralorn.demaralorn changed the join rule to "public" from "public".22:54:26
@maralorn:maralorn.demaralorn changed the room topic to "For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/" from "For discussions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/".22:56:19
@server_stats:nordgedanken.devServer Stats Discoverer (traveler bot) joined the room.23:05:49
@pennae:matrix.eno.spacepennae joined the room.23:06:26
@justinrestivo:matrix.orgjustinrestivo joined the room.23:07:39
@srid:matrix.orgsrid joined the room.23:07:41
@_xmpp_qy=40xa0.uk:matrix.orgbqv joined the room.23:08:26
@_xmpp_qy=40xa0.uk:matrix.orgbqv changed their display name from qy to bqv.23:08:27
@_xmpp_qy=40xa0.uk:matrix.orgbqv changed their display name from bqv to qy.23:08:28
@_xmpp_qy=40xa0.uk:matrix.orgbqv changed their display name from qy to bqv.23:08:29
@ryantm:matrix.orgryantm joined the room.23:18:05
@voyager:t2bot.ioMatrix Traveler (bot) joined the room.23:18:11
@sternenseemann:systemli.orgsterni (he/him) joined the room.23:18:19
@Ericson2314:matrix.orgJohn Ericson joined the room.23:20:08
@jcie74:matrix.orgpie_ joined the room.23:20:26
@utdemir:matrix.orgutdemir joined the room.23:23:07
@baum:bdisk.eubaum joined the room.23:24:21
@shibayashi:ncrypt.atshibayashi joined the room.23:35:42

Show newer messages


Back to Room ListRoom Version: 6