File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -9,24 +9,25 @@ import Nix.Expr.Types.Annotated ( SrcSpan
99 )
1010
1111-- 2021-07-18: NOTE: It should be Options -> Scopes -> Frames -> Source(span)
12- data Context m t = Context
13- { scopes :: Scopes m t
14- , source :: SrcSpan
15- , frames :: Frames
16- , options :: Options
12+ data Context m t =
13+ Context
14+ { getOptions :: Options
15+ , getScopes :: Scopes m t
16+ , getSource :: SrcSpan
17+ , getFrames :: Frames
1718 }
1819
1920instance Has (Context m t ) (Scopes m t ) where
20- hasLens f a = (\ x -> a { scopes = x }) <$> f (scopes a)
21+ hasLens f a = (\ x -> a { getScopes = x }) <$> f (getScopes a)
2122
2223instance Has (Context m t ) SrcSpan where
23- hasLens f a = (\ x -> a { source = x }) <$> f (source a)
24+ hasLens f a = (\ x -> a { getSource = x }) <$> f (getSource a)
2425
2526instance Has (Context m t ) Frames where
26- hasLens f a = (\ x -> a { frames = x }) <$> f (frames a)
27+ hasLens f a = (\ x -> a { getFrames = x }) <$> f (getFrames a)
2728
2829instance Has (Context m t ) Options where
29- hasLens f a = (\ x -> a { options = x }) <$> f (options a)
30+ hasLens f a = (\ x -> a { getOptions = x }) <$> f (getOptions a)
3031
3132newContext :: Options -> Context m t
32- newContext = Context mempty nullSpan mempty
33+ newContext o = Context o mempty nullSpan mempty
You can’t perform that action at this time.
0 commit comments