Consider:
module Main where
import Data.List (sort, nub)
import qualified Data.Map.Strict as Map
import Other (process)
main :: IO ()
main = do
let xs = [3, 1, 4, 1, 5, 9, 2, 6] :: [Int]
let m = Map.fromList [("a", 1), ("b", 2)] :: Map.Map String Int
check xs m
process xs
check :: [Int] -> Map.Map String Int -> IO ()
check xs m = do
print xs
print m
module Other where
process :: [Int] -> IO ()
process xs = do
let n = length xs
print n
Stop at the call to process in Main.hs, line 15. Map is in scope, so evaluating Map.fromList [...] at the REPL should succeed.
Then, run until you stop at a second breakpoint inside the definition of process, say line 4 (call to print). Evaluating Map.fromList at the REPL now shouldn't work (because Map is no longer in scope), but it does.
What do we make of that behavior? I'm not sure if that's expected.
Consider:
Stop at the call to
processinMain.hs, line 15.Mapis in scope, so evaluatingMap.fromList [...]at the REPL should succeed.Then, run until you stop at a second breakpoint inside the definition of
process, say line 4 (call toprint). EvaluatingMap.fromListat the REPL now shouldn't work (becauseMapis no longer in scope), but it does.What do we make of that behavior? I'm not sure if that's expected.