on master help sign in
Enable -O2 and unpack a field that doesn't get unpacked by default
f979db0Andrzej Rybczak
effectful.cabal+2
@@ -48,6 +48,8 @@ common language
48library
48library
49 import: language
49 import: language
50
50
51+ ghc-options: -O2
52+
51 build-depends: base >= 4.12 && <5
53 build-depends: base >= 4.12 && <5
52 , containers
54 , containers
53 , exceptions
55 , exceptions
src/Effectful/Internal/Env.hs+1−1
@@ -66,7 +66,7 @@ globalFid :: ForkId
66globalFid = ForkId 0 0
66globalFid = ForkId 0 0
67
67
68-- | Local forks of the environment.
68-- | Local forks of the environment.
69−data Forks = Forks ForkId (IORef EnvRef) Forks | NoFork
69+data Forks = Forks {-# UNPACK #-} ForkId (IORef EnvRef) Forks | NoFork
70
70
71data EnvRef = EnvRef
71data EnvRef = EnvRef
72 { _capacity :: Int
72 { _capacity :: Int