Earlier today, I tried to debug the version below solve , which was giving me problems:
newtype Audience = Audience { byShyness :: [Int] } solve :: Audience -> Int solve (Audience originalCounts) = numFriendsAdded where numFriendsAdded = length $ filter id friendAdded friendAdded = zipWith3 (\ict -> i >= c + t) [0..] originalCounts alreadyStanding alreadyStanding = scanl (+) 0 modifiedCounts modifiedCounts = zipWith (\ac -> if a then 1 else c) friendAdded originalCounts
In GHCi (7.8.2), I tried to break solve by name and then row / column, but it did not bring the names associated with the where clause into scope:
λ :b solve Breakpoint 0 activated at StandingOvation.hs:(20,1)-(24,89) λ :main StandingOvation.example-input Case #1: Stopped at StandingOvation.hs:(20,1)-(24,89) _result :: Int = _ λ numFriendsAdded <interactive>:5:1: Not in scope: 'numFriendsAdded' λ :delete 0 λ :b 20 35 Breakpoint 1 activated at StandingOvation.hs:20:35-49 λ :main StandingOvation.example-input Case #1: Stopped at StandingOvation.hs:20:35-49 _result :: Int = _ numFriendsAdded :: Int = _ λ numFriendsAdded 0 λ friendAdded <interactive>:10:1: Not in scope: 'friendAdded'
Obviously they are in a separate scope with regard to Haskell, but what do I need to do to make them visible when debugging?
source share