Skip to content

Instantly share code, notes, and snippets.

whileM :: Monad m => MaybeT m a -> m a
whileM = fix $ \f x -> maybe (f x) return =<< runMaybeT x
@kindaro
kindaro / gist:afbb13eaef42cfe43dc6de27b96e5911
Created July 10, 2019 18:43
Stack 2.1.1.1 build optparse-applicative-1.14.3.0 failure
2.1.1.1 x86_64 hpack-0.31.2
2019-07-10 21:42:46.487217: [debug] Checking for project config at: /tmp/optparse-applicative-0.14.3.0/stack.yaml
2019-07-10 21:42:46.487412: [debug] Loading project config file stack.yaml
2019-07-10 21:42:46.494693: [debug] SELECT COUNT(*) FROM "last_performed" WHERE ("action"=?) AND ("timestamp">=?); [PersistInt64 1,PersistUTCTime 2019-07-09 18:42:46.494620975 UTC]
2019-07-10 21:42:46.495365: [debug] Using package location completions from a lock file
2019-07-10 21:42:46.680505: [debug] Asking for a supported GHC version
2019-07-10 21:42:46.680776: [debug] Installed tools:
- ghc-tinfo6-8.6.5
2019-07-10 21:42:46.680896: [debug] Run process: /sbin/ldconfig -p
2019-07-10 21:42:46.682594: [debug] Process finished in 2ms: /sbin/ldconfig -p
import System.Exit (exitWith, ExitCode(ExitSuccess))
import Graphics.UI.GLUT
main = do
(progName, _args) <- getArgsAndInitialize
initialDisplayMode $= [ SingleBuffered, RGBMode ]
initialWindowSize $= Size 500 500
_ <- createWindow progName
exitWith ExitSuccess
Mon Oct 7 18:58 2019 Time and Allocation Profiling Report (Final)
draw-graph +RTS -p -RTS --output x.png --width 200
total time = 1.07 secs (1073 ticks @ 1000 us, 1 processor)
total alloc = 2,133,008,976 bytes (excludes profiling overheads)
COST CENTRE MODULE SRC %time %alloc
clipLine Graphics.Rasterific.Line src/Graphics/Rasterific/Line.hs:(69,1)-(120,58) 95.1 99.0
This file has been truncated, but you can view the full file.
0009:trace:d3d:wined3d_dll_init Use 512MiB = 0x20000000 bytes for emulated_textureram
0009:trace:ddraw:DirectDrawCreateEx driver_guid (null), ddraw 00E8507C, interface_iid {15e65ec0-3b9c-11d2-b92f-00609797ea5b}, outer 00000000.
0009:trace:ddraw:DDRAW_Create driver_guid (null), ddraw 00E8507C, outer_unknown 00000000, interface_iid {15e65ec0-3b9c-11d2-b92f-00609797ea5b}.
0009:trace:d3d:wined3d_init Initialising adapters.
0009:trace:d3d:wined3d_adapter_gl_init adapter_gl 0x16b218, ordinal 0, wined3d_creation_flags 0x1cb5.
0009:trace:d3d:wined3d_adapter_init Display device: L"\\\\.\\DISPLAY1".
0009:trace:d3d:wined3d_adapter_init Allocated LUID 00000000:000003f2 for adapter 0x16b218.
0009:trace:d3d:wined3d_caps_gl_ctx_create getting context...
0009:trace:d3d:wined3d_adapter_init_gl_caps adapter 0x16b218.
0009:trace:d3d:wined3d_adapter_init_gl_caps GL_RENDERER: "AMD RAVEN (DRM 3.32.0, 5.2.13-arch1-1-ARCH, LLVM 8.0.1)".
0009:err:module:import_dll Library IFC22.dll (which is needed by L"Z:\\srv\\shared\\games\\Black_and_White\\drive_c\\Program Files (x86)\\Black & White. Gold\\runblack.exe") not found
0009:err:module:import_dll Library LHLogR.dll (which is needed by L"Z:\\srv\\shared\\games\\Black_and_White\\drive_c\\Program Files (x86)\\Black & White. Gold\\runblack.exe") not found
0009:err:module:import_dll Library LHaudiodllR.dll (which is needed by L"Z:\\srv\\shared\\games\\Black_and_White\\drive_c\\Program Files (x86)\\Black & White. Gold\\runblack.exe") not found
0009:err:module:import_dll Library LHMultiplayerR.dll (which is needed by L"Z:\\srv\\shared\\games\\Black_and_White\\drive_c\\Program Files (x86)\\Black & White. Gold\\runblack.exe") not found
0009:err:module:import_dll Library LHDialogLib.dll (which is needed by L"Z:\\srv\\shared\\games\\Black_and_White\\drive_c\\Program Files (x86)\\Black & White. Gold\\runblack.exe") not found
0009:err:module:import_dll Library wearasr.dll (which is needed by L"Z:\\srv\\shar
% cabal install optparse-applicative --lib
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: base-4.12.0.0/installed-4.12.0.0 (user goal)
[__1] trying: containers-0.6.2.1 (user goal)
[__2] next goal: ghc (user goal)
[__2] rejecting: ghc-8.6.5/installed-8.6.5 (conflict: containers==0.6.2.1, ghc
=> containers==0.6.0.1/installed-0.6.0.1)
[__2] trying: ghc-8.6.5
[__3] rejecting: ghc:-buildable (conflict: base==4.12.0.0/installed-4.12.0.0,
% cabal install --verbose optparse-applicative --lib
Reading available packages of hackage.haskell.org...
Using most recent state specified from most recent cabal update
index-state(hackage.haskell.org) = 2020-01-25T23:43:04Z
/nix/var/nix/profiles/default/bin/ghc --numeric-version
looking for tool ghc-pkg near compiler in /nix/var/nix/profiles/default/bin
found ghc-pkg in /nix/var/nix/profiles/default/bin/ghc-pkg
/nix/var/nix/profiles/default/bin/ghc-pkg --version
/nix/var/nix/profiles/default/bin/ghc --supported-languages
/nix/var/nix/profiles/default/bin/ghc --info
% find -L ~/.stack/programs/ -maxdepth 4 -type f -executable -a -name ghc | while read x; do echo "=========== $x"; cabal install --dry-run --with-ghc $x singletons --lib; done
=========== /home/kindaro/.stack/programs/x86_64-linux/ghc-tinfo6-8.0.2/bin/ghc
Resolving dependencies...
Build profile: -w ghc-8.0.2 -O1
In order, the following would be built (use -v for more details):
- mtl-2.2.2 (lib) (requires build)
- primitive-0.7.0.0 (lib) (requires build)
- safe-0.3.18 (lib) (requires build)
- syb-0.7.1 (lib) (requires build)
- text-1.2.4.0 (lib) (requires build)
% /home/kindaro/.stack/programs/x86_64-linux/ghc-tinfo6-8.6.5/bin/ghc --print-global-package-db
/home/kindaro/.stack/programs/x86_64-linux/ghc-tinfo6-8.6.5/lib/ghc-8.6.5/package.conf.d
% /nix/var/nix/profiles/default/bin/ghc --print-global-package-db
/nix/store/67g6vwr5mx26h5mickgw17k2irdx1c0d-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d