phoityne / ghci-dap Goto Github PK
View Code? Open in Web Editor NEWghci having DAP interface.
Home Page: https://hackage.haskell.org/package/ghci-dap
License: Other
ghci having DAP interface.
Home Page: https://hackage.haskell.org/package/ghci-dap
License: Other
not only through STDIO, but by file socket, tcp port socket.
ghci-dap does not work on AArch64.
Raspberry Pi 3
os : ubuntu
ref: https://gitlab.haskell.org/ghc/ghc/issues/16796
seems same issue with
https://gitlab.haskell.org/ghc/ghc/issues/15275
I'm building a haskell cabal project that uses Relude as the standard library.
In the project's .cabal
file, I have a mixins stanza :
mixins:
base hiding (Prelude),
relude (Relude as Prelude, Relude.Container.One),
relude
When I then use the Haskell GHCi Debug Adapter VS Code plugin, I get an error from ghci-dap
Configuration read.
Starting GHCi.
Wait for a moment.
CWD: /workspace
CMD: cabal repl lib:local-library -w ghci-dap --repl-no-load --builddir=/workspace/.vscode/dist-cabal-repl -v
Now, waiting for an initial prompt("> ") from ghci.
this build was affected by the following (project) config files:
Build profile: -w ghc-9.2.7 -O1
In order, the following will be built:
- local-library-0.1.0.0 (lib) (first run)
creating /workspace/.vscode/dist-cabal-repl/build
creating /workspace/.vscode/dist-cabal-repl/tmp
creating /workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0
creating /workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/cache
whenReRegister: nothing to register
Using self-exec internal setup method with build-type Simple and args:
["act-as-setup","--build-type=Simple","--","repl","--verbose=2","--builddir=/workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0","--repl-no-load","lib:local-library"]
/nix/store/mm39g8n54mxvn0myxq06kaidhs1hsr53-cabal-install-3.10.1.0/bin/.cabal-wrapped
act-as-setup --build-type=Simple -- repl --verbose=2
--builddir=/workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0
--repl-no-load lib:local-library
Running: /nix/store/mm39g8n54mxvn0myxq06kaidhs1hsr53-cabal-install-3.10.1.0/bin/.cabal-wrapped act-as-setup '--build-type=Simple' -- repl '--verbose=2' '--builddir=/workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0' --repl-no-load 'lib:local-library'
Running: /nix/store/q2v7kijwr4blwz0cc7n1yfby3dz009kd-ghc-9.2.7-with-packages/bin/ghc-pkg init /workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/package.conf.inplace
creating /workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/build
creating /workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/build/autogen
creating /workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/build/autogen
creating /workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/build/autogen
Preprocessing library for local-library-0.1.0.0..
creating /workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/build
Running: /nix/store/hph2sf6qi9lnpr0civ0dr250yapd0qwk-ghci-dap-0.0.20.0/bin/ghci-dap --interactive -fbuilding-cabal-package -O0 -outputdir /workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/build -odir /workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/build -hidir /workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/build -stubdir /workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/build -i -i/workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/build -isrc -i/workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/build/autogen -i/workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/build/global-autogen -I/workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/build/autogen -I/workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/build/global-autogen -I/workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/build -optP-include -optP/workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/build/autogen/cabal_macros.h -this-unit-id local-library-0.1.0.0-inplace -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /home/code/.local/state/cabal/store/ghc-9.2.7/package.db -package-db /workspace/.vscode/dist-cabal-repl/packagedb/ghc-9.2.7 -package-db /workspace/.vscode/dist-cabal-repl/build/x86_64-linux/ghc-9.2.7/local-library-0.1.0.0/package.conf.inplace -package-id 'base-4.16.4.0 (Control.Applicative, Control.Arrow, Control.Category, Control.Concurrent, Control.Concurrent.Chan, Control.Concurrent.MVar, Control.Concurrent.QSem, Control.Concurrent.QSemN, Control.Exception, Control.Exception.Base, Control.Monad, Control.Monad.Fail, Control.Monad.Fix, Control.Monad.IO.Class, Control.Monad.Instances, Control.Monad.ST, Control.Monad.ST.Lazy, Control.Monad.ST.Lazy.Safe, Control.Monad.ST.Lazy.Unsafe, Control.Monad.ST.Safe, Control.Monad.ST.Strict, Control.Monad.ST.Unsafe, Control.Monad.Zip, Data.Bifoldable, Data.Bifunctor, Data.Bitraversable, Data.Bits, Data.Bool, Data.Char, Data.Coerce, Data.Complex, Data.Data, Data.Dynamic, Data.Either, Data.Eq, Data.Fixed, Data.Foldable, Data.Function, Data.Functor, Data.Functor.Classes, Data.Functor.Compose, Data.Functor.Const, Data.Functor.Contravariant, Data.Functor.Identity, Data.Functor.Product, Data.Functor.Sum, Data.IORef, Data.Int, Data.Ix, Data.Kind, Data.List, Data.List.NonEmpty, Data.Maybe, Data.Monoid, Data.Ord, Data.Proxy, Data.Ratio, Data.STRef, Data.STRef.Lazy, Data.STRef.Strict, Data.Semigroup, Data.String, Data.Traversable, Data.Tuple, Data.Type.Bool, Data.Type.Coercion, Data.Type.Equality, Data.Type.Ord, Data.Typeable, Data.Unique, Data.Version, Data.Void, Data.Word, Debug.Trace, Foreign, Foreign.C, Foreign.C.Error, Foreign.C.String, Foreign.C.Types, Foreign.Concurrent, Foreign.ForeignPtr, Foreign.ForeignPtr.Safe, Foreign.ForeignPtr.Unsafe, Foreign.Marshal, Foreign.Marshal.Alloc, Foreign.Marshal.Array, Foreign.Marshal.Error, Foreign.Marshal.Pool, Foreign.Marshal.Safe, Foreign.Marshal.Unsafe, Foreign.Marshal.Utils, Foreign.Ptr, Foreign.Safe, Foreign.StablePtr, Foreign.Storable, GHC.Arr, GHC.Base, GHC.Bits, GHC.ByteOrder, GHC.Char, GHC.Clock, GHC.Conc, GHC.Conc.IO, GHC.Conc.Signal, GHC.Conc.Sync, GHC.ConsoleHandler, GHC.Constants, GHC.Desugar, GHC.Enum, GHC.Environment, GHC.Err, GHC.Event, GHC.Event.TimeOut, GHC.Exception, GHC.Exception.Type, GHC.ExecutionStack, GHC.ExecutionStack.Internal, GHC.Exts, GHC.Fingerprint, GHC.Fingerprint.Type, GHC.Float, GHC.Float.ConversionUtils, GHC.Float.RealFracMethods, GHC.Foreign, GHC.ForeignPtr, GHC.GHCi, GHC.GHCi.Helpers, GHC.Generics, GHC.IO, GHC.IO.Buffer, GHC.IO.BufferedIO, GHC.IO.Device, GHC.IO.Encoding, GHC.IO.Encoding.CodePage, GHC.IO.Encoding.Failure, GHC.IO.Encoding.Iconv, GHC.IO.Encoding.Latin1, GHC.IO.Encoding.Types, GHC.IO.Encoding.UTF16, GHC.IO.Encoding.UTF32, GHC.IO.Encoding.UTF8, GHC.IO.Exception, GHC.IO.FD, GHC.IO.Handle, GHC.IO.Handle.FD, GHC.IO.Handle.Internals, GHC.IO.Handle.Lock, GHC.IO.Handle.Text, GHC.IO.Handle.Types, GHC.IO.IOMode, GHC.IO.StdHandles, GHC.IO.SubSystem, GHC.IO.Unsafe, GHC.IOArray, GHC.IOPort, GHC.IORef, GHC.Int, GHC.Integer, GHC.Integer.Logarithms, GHC.Ix, GHC.List, GHC.MVar, GHC.Maybe, GHC.Natural, GHC.Num, GHC.Num.BigNat, GHC.Num.Integer, GHC.Num.Natural, GHC.OldList, GHC.OverloadedLabels, GHC.Pack, GHC.Profiling, GHC.Ptr, GHC.RTS.Flags, GHC.Read, GHC.Real, GHC.Records, GHC.ResponseFile, GHC.ST, GHC.STRef, GHC.Show, GHC.Stable, GHC.StableName, GHC.Stack, GHC.Stack.CCS, GHC.Stack.Types, GHC.StaticPtr, GHC.Stats, GHC.Storable, GHC.TopHandler, GHC.TypeLits, GHC.TypeLits.Internal, GHC.TypeNats, GHC.TypeNats.Internal, GHC.Unicode, GHC.Weak, GHC.Word, Numeric, Numeric.Natural, System.CPUTime, System.Console.GetOpt, System.Environment, System.Environment.Blank, System.Exit, System.IO, System.IO.Error, System.IO.Unsafe, System.Info, System.Mem, System.Mem.StableName, System.Mem.Weak, System.Posix.Internals, System.Posix.Types, System.Timeout, Text.ParserCombinators.ReadP, Text.ParserCombinators.ReadPrec, Text.Printf, Text.Read, Text.Read.Lex, Text.Show, Text.Show.Functions, Type.Reflection, Type.Reflection.Unsafe, Unsafe.Coerce)' -package-id 'relude-1.1.0.0-B6zcHDYI1P31kfRGCmdMyN (Relude as Prelude, Relude.Container.One)' -package-id relude-1.1.0.0-B6zcHDYI1P31kfRGCmdMyN -package-id aeson-2.0.3.0-E1Z0tCMH7LG1C85dTvi65b -package-id async-2.2.4-4hewjgHC8JJEf9gl0RbqkV -package-id beam-core-0.9.2.1-K8Qh3pynzaiAbDP7iybWtp -package-id beam-migrate-0.5.1.2-8hIrHFtz9GjE3xv5OYfRwz -package-id beam-postgres-0.5.2.1-2OmE4AgBZZdCZyKRu0AL0s -package-id blaze-html-0.9.1.2-BkR3GiYXrrV13D0VszY94A -package-id cassava-0.5.3.0-2ZHasGLBVRLJL0WAKWawQi -package-id conduit-1.3.4.3-5blWhtQ3BTS4N9Us6TxFxJ -package-id data-default-0.7.1.1-JljmhNSdFHDL8LUWBWCV1e -package-id directory-1.3.6.2 -package-id exceptions-0.10.4 -package-id fast-logger-3.1.2-HuPsttmhxMPJHZoaOhGc1P -package-id filepath-1.4.2.2 -package-id generic-lens-2.2.1.0-L7L7kXpKOjcEO05ALWqmAH -package-id hs-opentelemetry-api-0.0.3.6-Lh9GCRB64PVEIam62sr9Wi -package-id http-client-0.7.13.1-LD6phKgeaaB2pE4kDnhU46 -package-id http-types-0.12.3-5oPb87Y9mmT2cli2uNSI69 -package-id linear-base-0.3.1-5rfo9gH9ToyCtieJMAJMDo -package-id monad-logger-0.3.39-JqwR4XyfP6DDk4nqD48PfS -package-id mtl-2.2.2 -package-id optics-core-0.4.1-4r1bYmt53v96GsUSz861mz -package-id optics-th-0.4.1-9e84KfRCIhN3OMRqJQWGmE -package-id prettyprinter-1.7.1-HrDU9aNhok13fjOTXkGJhy -package-id profunctors-5.6.2-28W6WTT1AzNEExqBOSGSNs -package-id resource-pool-0.2.3.2-51Ethz7yeJqKh0qeAptG82 -package-id resourcet-1.2.6-JS79KQRrH9P1h5FgIhYZFP -package-id servant-auth-0.4.1.0-F7kYXWaZ0YOC40E0YeVpXv -package-id servant-auth-client-0.4.1.0-AIO6AWRXvbM7ncSkUAnbGW -package-id servant-auth-server-0.4.7.0-Cq9eIIOD6NNBByq20x3kxG -package-id servant-auth-swagger-0.2.10.1-77OaZLeJvMZ52at2Bn3KE8 -package-id servant-blaze-0.9.1-6cuNAeu6EGKJSDlJpMr1LN -package-id servant-cassava-0.10.2-4QySMxm4FMe6Jga9VsDR9P -package-id servant-client-0.19-84mSTwIgf3yCYqdewPXKdn -package-id servant-conduit-0.15.1-5FGQCfG8HIYJxwg53rJWSQ -package-id servant-multipart-0.12.1-IfFQExrnEyexgVzH1jP7p -package-id servant-multipart-api-0.12.1-2vjy9CRgSuN6fdbYPlN0h0 -package-id servant-multipart-client-0.12.1-KtZbL5qXXdFJSckljtxtH3 -package-id servant-serialization-0.2.1-8vw9c2nqfMlGizRLJRU2lG -package-id servant-server-0.19.2-BXLflmxfJOwIyBH9ESfx1C -package-id servant-swagger-1.1.11-IvuTwwcbBKN1SpfyvCQFJT -package-id servant-swagger-ui-0.3.5.4.5.0-B2GTvufylC78lTrEmVKr6M -package-id shower-0.2.0.3-GvfKuHv4xBsAUlQAcBB9V6 -package-id swagger2-2.8.6-ECczarnX5nFKKqKyuHiUB1 -package-id time-1.11.1.1 -package-id wai-3.2.3-Ig9tz4vaOPq7YSPCUKI8Mv -package-id warp-3.3.23-K4FNB0SGWzy8OXjax2ezr7 -package-id with-utf8-1.0.2.3-5PXESi3Jm7c9uwrAgRH4SD -XHaskell2010 -XNoFieldSelectors -XNoStarIsType -XBangPatterns -XConstraintKinds -XDataKinds -XDeriveAnyClass -XDeriveDataTypeable -XDeriveFoldable -XDeriveFunctor -XDeriveGeneric -XDeriveLift -XDeriveTraversable -XDerivingStrategies -XDerivingVia -XDuplicateRecordFields -XEmptyCase -XEmptyDataDecls -XEmptyDataDeriving -XExistentialQuantification -XExplicitForAll -XFlexibleContexts -XFlexibleInstances -XGADTSyntax -XGeneralisedNewtypeDeriving -XImportQualifiedPost -XKindSignatures -XLambdaCase -XLinearTypes -XMultiParamTypeClasses -XMultiWayIf -XNumericUnderscores -XOverloadedLabels -XOverloadedStrings -XPolyKinds -XPostfixOperators -XRankNTypes -XScopedTypeVariables -XStandaloneDeriving -XStandaloneKindSignatures -XTupleSections -XTypeApplications -XTypeFamilies -XTypeOperators -XUnicodeSyntax -XViewPatterns -Wall -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Wunused-foralls -Wunused-foralls -fprint-explicit-foralls -fprint-explicit-kinds -hide-all-packages
[DAP][INFO] start ghci-dap-0.0.20.0.
GHCi, version 9.2.7: https://www.haskell.org/ghc/ :? for help
<command line>: cannot satisfy -package-id relude-1.1.0.0-B6zcHDYI1P31kfRGCmdMyN (Relude as Prelude, Relude.Container.One)
(use -v for more information)
CallStack (from HasCallStack):
withMetadata, called at src/Distribution/Simple/Utils.hs:368:14 in Cabal-3.10.1.0-5sSVeMY5t4HKsrW2wqIvsr:Distribution.Simple.Utils
Error: cabal: repl failed for local-library-0.1.0.0-inplace.
invalid HANDLE. eof.
I followed the plugin's default config which executes ghci-dap
via
cabal repl -w ghci-dap --repl-no-load --builddir=${workspaceFolder}/.vscode/dist-cabal-repl
My setup is VS Code using a dev-container from https://github.com/xtruder/nix-devcontainer that provisions nix and all the nix derived tools including ghci-dap
. I have in my flake.nix
{# See https://github.com/srid/haskell-flake/blob/master/example/flake.nix
haskellProjects.default = {
# packages.local-library.root = ./.; # Auto-discovered by haskell-flake
overrides = self: super: { };
devShell = {
tools = hp: {
inherit (hp) haskell-debug-adapter ghci-dap;
treefmt = config.treefmt.build.wrapper;
} // config.treefmt.build.programs;
hlsCheck.enable = true;
};
autoWire = [ "packages" "apps" "checks" ]; # Wire all but the devShell
};
}
Package versions
$ cabal --version
cabal-install version 3.10.1.0
compiled using version 3.10.1.0 of the Cabal library
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.2.7
$ ghci-dap --version
[DAP][INFO] start ghci-dap-0.0.20.0.
The Glorious Glasgow Haskell Compilation System, version 9.2.7
Scenario:
STACK_ROOT\global-project\stack.yaml contains resolver: lts-15.9
current_project_directory\stack.yaml contains resolver: lts-14.27
ghci-dap is installed by stack globally, installing ghci-dap.exe in the bin folder.
Issue:
Occurs whenever --with-ghc=ghci-dap
is used
[DAP][INFO] start ghci-dap-0.0.14.0.
GHCi, version 8.8.3: https://www.haskell.org/ghc/ :? for help
<interactive>:1:1: error:
Failed to load interface for `GHC.Base'
There are files missing in the `base-4.12.0.0' package,
try running 'ghc-pkg check'.
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
I tested this by creating a new stack project, using resolver: lts-15.9
, and the issue did not occur.
(OS: Windows 10)
hello, I have posted earlier about issues surrounding ghci-dap and eclipse che (web-based cloud-native IDE), those are fixed now.
current situation is a heap overflow inside the sidecar container for haskell, probably because it's getting the wrong available memory (host's) instead of the kubernete's namespace limited resources for the pod/container.
could there be a way to tell the debugger we're in a container so we can manually set the heap limits?.
this is proc/meminfo in the sidecar container(runc):
user@workspace8my3rva3bxml8pet:/projects/src/github.com/che-samples/haskell-demo$ cat /proc/meminfo
MemTotal: 32105908 kB
MemFree: 18852320 kB
MemAvailable: 26451328 kB
Buffers: 2880 kB
Cached: 6740600 kB
SwapCached: 0 kB
Active: 6435680 kB
Inactive: 3846800 kB
Active(anon): 3051572 kB
Inactive(anon): 52984 kB
Active(file): 3384108 kB
Inactive(file): 3793816 kB
Unevictable: 73740 kB
Mlocked: 73740 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 14836 kB
Writeback: 0 kB
AnonPages: 2967500 kB
Mapped: 944676 kB
Shmem: 57952 kB
KReclaimable: 877492 kB
Slab: 1599504 kB
SReclaimable: 877492 kB
SUnreclaim: 722012 kB
KernelStack: 35108 kB
PageTables: 45384 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 16052952 kB
Committed_AS: 20420012 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
Percpu: 112736 kB
HardwareCorrupted: 0 kB
AnonHugePages: 923648 kB
ShmemHugePages: 0 kB
ShmemPmdMapped: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 0 kB
DirectMap4k: 3139556 kB
DirectMap2M: 12806144 kB
DirectMap1G: 17825792 kB
here's a "codeready workspaces" devfile so anyone can use their free service to start the ide with the projects and mentioned extensions/settings (even run/debug settings are preset).
apiVersion: 1.0.0
metadata:
name: haskell1
projects:
- name: haskell-demo
source:
location: '[email protected]:gattytto/example-servant-minimal'
type: github
branch: 8.10.3
clonePath: src/github.com/che-samples/haskell-demo
- name: haskell-examples
source:
location: '[email protected]:gattytto/haskell-examples'
type: git
branch: master
clonePath: src/github.com/che-samples/haskell-examples
components:
- cpuLimit: 1750m
id: eclipse/che-theia/latest
cpuRequest: 200m
type: cheEditor
- cpuLimit: 8001m
memoryLimit: 4048Mi
preferences:
haskell.languageServerVariant: ghcide
cpuRequest: 800m
type: chePlugin
reference: 'https://raw.githubusercontent.com/gattytto/cheplugins/master/haskell/meta-osio-8.10.3.yaml'
memoryRequest: 512Mi
- id: redhat/vscode-yaml/latest
type: chePlugin
I have macOS 11. Big Sur and run GHC 8.10.3 with current master branch of ghci-dap end related packages. When starting ghci with
stack ghci --with-ghc=ghci-dap conzone:lib conzone:exe:conzone --test --no-load --no-build --main-is conzone:exe:conzone
it starts regularly. But after loading the main file and therefore the whole project ghci crashes with
[12 of 94] Compiling Model ( /Users/tkx/devel/conzone/conzone-web-app/conzone/src/Model.hs, interpreted )
[1] 98871 segmentation fault stack ghci --with-ghc=ghci-dap conzone:lib conzone:exe:conzone --test
My project is based on the Yesod scaffold and contains huge amounts of Template Haskell therefore. The interpreter does not always crash on exactly the same Module but it seems to be always one that contains template Haskell code. And it prefers to crash on the more complex ones.
VSCode
Configuration read.
Starting GHCi.
Wait for a moment.
CWD: /work/haskell/sample-cabal
CMD: cabal repl -w ghci-dap --repl-no-load --builddir=/work/haskell/sample-cabal/.vscode/dist-cabal-repl
Now, waiting for an initial prompt("> ") from ghci.
Resolving dependencies...
Build profile: -w ghc-9.4.3 -O1
In order, the following will be built (use -v for more details):
- sample-cabal-0.1.0.0 (lib) (first run)
/root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-pkg-9.4.3: /lib64/libtinfo.so.6: no version information available (required by /root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-pkg-9.4.3)
/root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-pkg-9.4.3: /lib64/libtinfo.so.6: no version information available (required by /root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/../lib/aarch64-linux-ghc-9.4.3/libHSterminfo-0.4.1.5-ghc9.4.3.so)
Configuring library for sample-cabal-0.1.0.0..
[DAP][INFO] start ghci-dap-0.0.20.0.
/root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-pkg-9.4.3: /lib64/libtinfo.so.6: no version information available (required by /root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-pkg-9.4.3)
/root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-pkg-9.4.3: /lib64/libtinfo.so.6: no version information available (required by /root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/../lib/aarch64-linux-ghc-9.4.3/libHSterminfo-0.4.1.5-ghc9.4.3.so)
Preprocessing library for sample-cabal-0.1.0.0..
[DAP][INFO] start ghci-dap-0.0.20.0.
GHCi, version 9.4.3: https://www.haskell.org/ghc/ :? for help
ghci-dap: internal error: ASSERTION FAILED: file rts/linker/elf_reloc_aarch64.c, line 118
(GHC version 9.4.3 for aarch64_unknown_linux)
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
Error: cabal: repl failed for sample-cabal-0.1.0.0. The build process
terminated with exit code -6
3
invalid HANDLE. eof.
CLI.
[root@localhost sample-cabal]# cabal repl -w ghci-dap --repl-no-load --builddir=/work/haskell/sample-cabal/.vscode/dist-cabal-repl
Build profile: -w ghc-9.4.3 -O1
In order, the following will be built (use -v for more details):
- sample-cabal-0.1.0.0 (lib) (first run)
/root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-pkg-9.4.3: /lib64/libtinfo.so.6: no version information available (required by /root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-pkg-9.4.3)
/root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-pkg-9.4.3: /lib64/libtinfo.so.6: no version information available (required by /root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/../lib/aarch64-linux-ghc-9.4.3/libHSterminfo-0.4.1.5-ghc9.4.3.so)
Preprocessing library for sample-cabal-0.1.0.0..
[DAP][INFO] start ghci-dap-0.0.20.0.
GHCi, version 9.4.3: https://www.haskell.org/ghc/ :? for help
ghci-dap: internal error: ASSERTION FAILED: file rts/linker/elf_reloc_aarch64.c, line 118
(GHC version 9.4.3 for aarch64_unknown_linux)
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
Error: cabal: repl failed for sample-cabal-0.1.0.0. The build process
terminated with exit code -6
[root@localhost sample-cabal]#
works well with the ghci.
[root@localhost sample-cabal]#
[root@localhost sample-cabal]# cabal repl --repl-no-load --builddir=/work/haskell/sample-cabal/.vscode/dist-cabal-repl
Resolving dependencies...
Build profile: -w ghc-9.4.3 -O1
In order, the following will be built (use -v for more details):
- sample-cabal-0.1.0.0 (lib) (configuration changed)
Configuring library for sample-cabal-0.1.0.0..
/root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-9.4.3: /lib64/libtinfo.so.6: no version information available (required by /root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/../lib/aarch64-linux-ghc-9.4.3/libHShaskeline-0.8.2-ghc9.4.3.so)
/root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-9.4.3: /lib64/libtinfo.so.6: no version information available (required by /root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/../lib/aarch64-linux-ghc-9.4.3/libHSghc-9.4.3-ghc9.4.3.so)
/root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-9.4.3: /lib64/libtinfo.so.6: no version information available (required by /root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/../lib/aarch64-linux-ghc-9.4.3/libHSterminfo-0.4.1.5-ghc9.4.3.so)
/root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-pkg-9.4.3: /lib64/libtinfo.so.6: no version information available (required by /root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-pkg-9.4.3)
/root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-pkg-9.4.3: /lib64/libtinfo.so.6: no version information available (required by /root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/../lib/aarch64-linux-ghc-9.4.3/libHSterminfo-0.4.1.5-ghc9.4.3.so)
Preprocessing library for sample-cabal-0.1.0.0..
/root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-9.4.3: /lib64/libtinfo.so.6: no version information available (required by /root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/../lib/aarch64-linux-ghc-9.4.3/libHShaskeline-0.8.2-ghc9.4.3.so)
/root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-9.4.3: /lib64/libtinfo.so.6: no version information available (required by /root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/../lib/aarch64-linux-ghc-9.4.3/libHSghc-9.4.3-ghc9.4.3.so)
/root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/./ghc-9.4.3: /lib64/libtinfo.so.6: no version information available (required by /root/.ghcup/ghc/9.4.3/lib/ghc-9.4.3/bin/../lib/aarch64-linux-ghc-9.4.3/libHSterminfo-0.4.1.5-ghc9.4.3.so)
GHCi, version 9.4.3: https://www.haskell.org/ghc/ :? for help
ghci> :q
Leaving GHCi.
[root@localhost sample-cabal]#
ghc-9.4.3
file rts/linker/elf_reloc_aarch64.c, line 116-125
case COMPAT_R_AARCH64_ADR_GOT_PAGE: {
/* range is -2^32 <= X < 2^32 */
CHECK(isInt64(21+12, addend)); /* X in range */
CHECK((addend & 0xfff) == 0); /* page relative */
*(inst_t *)P = (*(inst_t *)P & 0x9f00001f)
| (inst_t)(((uint64_t)addend << 17) & 0x60000000) // lo
| (inst_t)(((uint64_t)addend >> 9) & 0x00ffffe0); // hi
break;
}
Configuration:
LTS-15.5 GHC 8.8.3
macOS 10.15.4 Catalina
installed via:
stack install haskell-dap ghci-dap haskell-debug-adapter
as mentioned in Haskell GHCi Debug Adapter plug-in of VS Code.
I'm trying to run:
stack ghci --with-ghc=ghci-dap --no-build --main-is main
on a sample project generated with:
stack new dbg2
And it gave me:
/Users/vasko/Projects/haskell/test/dbg2/dbg2.cabal was modified manually. Ignoring /Users/vasko/Projects/haskell/test/dbg2/package.yaml in favor of the cabal file.
If you want to use the package.yaml file instead of the cabal file,
then please delete the cabal file.
Configuring GHCi with the following packages: dbg2
[DAP][INFO] start ghci-dap-0.0.14.0.
GHCi, version 8.6.5: http://www.haskell.org/ghc/ :? for help:1:6: error:
Not in scope: ‘System.IO.hSetBuffering’
No module named ‘System.IO’ is imported.:1:30: error:
Not in scope: ‘System.IO.stdin’
No module named ‘System.IO’ is imported.:1:46: error:
Not in scope: data constructor ‘System.IO.NoBuffering’
No module named ‘System.IO’ is imported.:1:70: error:
Not in scope: ‘System.IO.hSetBuffering’
No module named ‘System.IO’ is imported.:1:94: error:
Not in scope: ‘System.IO.stdout’
No module named ‘System.IO’ is imported.:1:111: error:
Not in scope: data constructor ‘System.IO.NoBuffering’
No module named ‘System.IO’ is imported.:1:135: error:
Not in scope: ‘System.IO.hSetBuffering’
No module named ‘System.IO’ is imported.:1:159: error:
Not in scope: ‘System.IO.stderr’
No module named ‘System.IO’ is imported.:1:176: error:
Not in scope: data constructor ‘System.IO.NoBuffering’
No module named ‘System.IO’ is imported.
I have tried also without --no-build option:
stack ghci --with-ghc=ghci-dap --main-is main
and it was the same.
What can I do more?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.