Skip to content

Instantly share code, notes, and snippets.

> sources = import nix/sources.nix
> pkgs = import sources.nixpkgs {}
> pkgs.haskell.packages.
pkgs.haskell.packages.ghc8101 pkgs.haskell.packages.ghc865 pkgs.haskell.packages.ghc883 pkgs.haskell.packages.ghcjs86
pkgs.haskell.packages.ghc822Binary pkgs.haskell.packages.ghc865Binary pkgs.haskell.packages.ghcHEAD pkgs.haskell.packages.integer-simple
pkgs.haskell.packages.ghc844 pkgs.haskell.packages.ghc882 pkgs.haskell.packages.ghcjs
Jul 27 21:04:52 <fendor> Hi! I have a question regarding per-component builds. In the context of my gsoc, I am trying to extend Cabal/cabal-install to open a repl session for multiple components at once, e.g. it should support `caal repl <lib> <exe>`. My first step was to allow in Cabal `runghc Setup.hs repl <lib> <exe>` which works if the project is configured via `cabal configure`, which seems to be the old way of doing stuff. As far as I can tell, cabal
Jul 27 21:04:52 <fendor> uses per-component builds, e.g. it configures a component, then builds it immediately. The problem now is that I can not call Cabal directly via `runghc Setup.hs repl <lib> <exe>` because the library component is not configured.
Jul 27 21:05:46 <fendor> It is not configured, since <exe> got configured after building the lib, which causes lib to be un-configured, afaict.
Jul 27 21:07:48 <fendor> My first question is, are these findings correct? If yes, the follow-up question is how can we change Cabal or cabal, to either allow to
• Couldn't match type ‘PackageIdentifier’
with ‘PackageIdentifier’
NB: ‘PackageIdentifier’
is defined in ‘Distribution.Types.PackageId’
in package ‘Cabal-3.3.0.0’
‘PackageIdentifier’
is defined in ‘Distribution.Types.PackageId’ in package ‘fake_uid’
Expected type: PackageIdentifier
Actual type: PackageId
• In the second argument of ‘Sec.indexLookupHash’, namely ‘pkgid’
Compute Avails for A from unitA
Compute Avails info
imp_mods [(Prelude, [ImportedByUser Prelude])]
imp_dep_mods []
imp_dep_pkgs {base-4.15.0.0, ghc-bignum-1.0, ghc-prim-0.7.0}
imp_trust_pkgs {}
imp_orphs [GHC.Float, GHC.Base]
imp_finsts [Control.Applicative, Control.Arrow, Data.Functor.Const,
Data.Functor.Identity, Data.Monoid, Data.Semigroup.Internal,
GHC.Generics, GHC.IO.Exception]
{
"resource": "/",
"owner": "Haskell HIE (ghc)",
"severity": 8,
"message": "ghcide: panic! (the 'impossible' happened)\n (GHC version 8.8.3 for x86_64-unknown-linux):\n\tv_unsafeGlobalDynFlags: settings not initialised\n\nPlease report this as a GHC bug: https://www.haskell.org/ghc/reportabug\n",
"source": "compiler",
"startLineNumber": 1,
"startColumn": 1,
"endLineNumber": 2,
"endColumn": 1
> ghc --show-iface A.hi
Magic: Wanted 33214052,
got 33214052
Version: Wanted 811020200619,
got 811020200619
Way: Wanted [],
got []
interface A 811020200619
interface hash: 120b821b3411beeb07e93a2bc9f9e1fb
ABI hash: d5211d2744c739022b3b8359f5964daa
attempting to use module ‘fake_uid:GHC.Prelude’ (/home/munin/Documents/haskell/ghc/compiler/GHC/Prelude.hs) which is not loaded
/home/munin/.cache/ghcide/ghc-28550f3bded7653efbc0f19994a3f4227f88ca8e/GHC/Builtin/PrimOps.hi-boot: openBinaryFile: does not exist (No such file or directory)
cradle:
stack:
cradle:
multi:
- path: ./.
config:
cradle:
cabal:
- path: ./mylib/test
config:
cradle:
cabal: