File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,16 @@ data Context m t = Context
2020 }
2121
2222instance Has (Context m t ) (Scopes m t ) where
23- hasLens f ( Context x y z w) = (\ x' -> Context x' y z w ) <$> f x
23+ hasLens f a = (\ x -> a { scopes = x } ) <$> f (scopes a)
2424
2525instance Has (Context m t ) SrcSpan where
26- hasLens f ( Context x y z w) = (\ y' -> Context x y' z w ) <$> f y
26+ hasLens f a = (\ x -> a { source = x } ) <$> f (source a)
2727
2828instance Has (Context m t ) Frames where
29- hasLens f ( Context x y z w) = (\ z' -> Context x y z' w ) <$> f z
29+ hasLens f a = (\ x -> a { frames = x } ) <$> f (frames a)
3030
3131instance Has (Context m t ) Options where
32- hasLens f ( Context x y z w) = (\ w' -> Context x y z w' ) <$> f w
32+ hasLens f a = (\ x -> a { options = x } ) <$> f (options a)
3333
3434newContext :: Options -> Context m t
3535newContext = Context emptyScopes nullSpan []
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ data Options = Options
99 , tracing :: Bool
1010 , thunks :: Bool
1111 , values :: Bool
12- , scopes :: Bool
12+ , showScopes :: Bool
1313 , reduce :: Maybe FilePath
1414 , reduceSets :: Bool
1515 , reduceLists :: Bool
@@ -42,7 +42,7 @@ defaultOptions current = Options { verbose = ErrorsOnly
4242 , tracing = False
4343 , thunks = False
4444 , values = False
45- , scopes = False
45+ , showScopes = False
4646 , reduce = Nothing
4747 , reduceSets = False
4848 , reduceLists = False
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ renderEvalFrame level f = do
106106 opts :: Options <- asks (view hasLens)
107107 case f of
108108 EvaluatingExpr scope e@ (Fix (Compose (Ann ann _))) -> do
109- let scopeInfo | scopes opts = [pretty $ show scope]
109+ let scopeInfo | showScopes opts = [pretty $ show scope]
110110 | otherwise = []
111111 fmap (\ x -> scopeInfo ++ [x])
112112 $ renderLocation ann
You can’t perform that action at this time.
0 commit comments