mirror of
https://github.com/github/semantic.git
synced 2024-11-28 18:23:44 +03:00
State is the other way around now.
This commit is contained in:
parent
ddbd2690bb
commit
ea9b24a903
@ -124,7 +124,7 @@ tagGraph :: forall a . (Eq a, Hashable a) => Graph a -> Graph (a, Tag)
|
||||
tagGraph = unwrap . traverse go where
|
||||
|
||||
unwrap :: Eff '[Fresh, State (HashMap a Tag)] (Graph (a, Tag)) -> Graph (a, Tag)
|
||||
unwrap = run . fmap fst . runState HashMap.empty . runFresh 1
|
||||
unwrap = run . fmap snd . runState HashMap.empty . runFresh 1
|
||||
|
||||
go :: a -> Eff '[Fresh, State (HashMap a Tag)] (a, Tag)
|
||||
go v = gets (HashMap.lookup v) >>= \case
|
||||
|
Loading…
Reference in New Issue
Block a user