foundation
foundation copied to clipboard
error stacktrace is broken
I created two projects with stack
- stack new error simple
- stack new errorf foundation
This is created today, so i use lts-10.2 with ghc 8.2.2
Prelude
module Main where
main :: IO ()
main = do
someIO
putStrLn "hello world"
someIO :: IO ()
someIO = error "foo"
error: foo
CallStack (from HasCallStack):
error, called at src/Main.hs:9:10 in main:Main
Foundation
module Main where
import Foundation
main :: IO ()
main = do
someIO
putStrLn $ "hello " <> "world"
someIO :: IO ()
someIO = error "foo"
errorf: foo
Prelude with HasCallstack on all functions
module Main where
import GHC.Stack (HasCallStack)
main :: HasCallStack => IO ()
main = do
someIO
putStrLn "hello world"
someIO :: HasCallStack => IO ()
someIO = error "foo"
error: foo
CallStack (from HasCallStack):
error, called at src/Main.hs:11:10 in main:Main
someIO, called at src/Main.hs:7:3 in main:Main
main, called at src/Main.hs:6:1 in main:Main
Foundation with HasCallstack on all functions
module Main where
import Foundation
import GHC.Stack (HasCallStack)
main :: HasCallStack => IO ()
main = do
someIO
putStrLn $ "hello " <> "world"
someIO :: HasCallStack => IO ()
someIO = error "foo"
errorf: foo
I think this is related so i put it in the same issue
stack ghci --ghci-options="-fexternal-interpreter -prof"
Building all executables for `extprof' once. After a successful build of all of them, only specified executables will be rebuilt.
extprof-0.1.0.0: configure (exe)
Configuring extprof-0.1.0.0...
extprof-0.1.0.0: initial-build-steps (exe)
Configuring GHCi with the following packages: extprof
Using main module: 1. Package `extprof' component exe:extprof with main-is file: /home/flip111/haskell/extprof/src/Main.hs
GHCi, version 8.2.2: http://www.haskell.org/ghc/ :? for help
<command line>: can't load .so/.DLL for: libHSbasement-0.0.4-7pJikASNmAFFwadsMZ0ihV.so (libHSbasement-0.0.4-7pJikASNmAFFwadsMZ0ihV.so: cannot open shared object file: No such file or directory)
This was for a fresh project created with stack new extprof foundation (lts-10.2)
I don't have this problem with the simple stack template