8000 Implement maybeM here and remove Data.Maybe.Exts · github/semantic@de53808 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit de53808

Browse files
committed
Implement maybeM here and remove Data.Maybe.Exts
1 parent d894237 commit de53808

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

8000 semantic-scope-graph/semantic-scope-graph.cabal

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ library
3737
Data.Hole
3838
Data.Module
3939
Data.ScopeGraph
40+
Data.Functor.Tagged
4041
build-depends:
4142
base >= 4.13 && < 5
4243
, aeson
@@ -57,6 +58,7 @@ library
5758
, streaming-process
5859
, text ^>= 1.2.3.1
5960
, temporary
61+
, comonad
6062
hs-source-dirs: src
6163
default-language: Haskell2010
6264
ghc-options:

semantic-scope-graph/src/Stack/Graph.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ module Stack.Graph
3232
, root
3333
-- * Miscellany
3434
, tagGraphUniquely
35-
, simplify
3635
-- * Testing stuff
3736
, testGraph
3837
, testGraph2
@@ -52,7 +51,7 @@ import Data.Function
5251
import Data.Functor.Tagged
5352
import Data.Map.Strict (Map)
5453
import qualified Data.Map.Strict as Map
55-
import Data.Maybe.Exts
54+
import Data.Maybe
5655
import Data.Semilattice.Lower
5756
import qualified Scope.Types as Scope
5857

@@ -153,6 +152,9 @@ newScope name edges graph =
153152
simplify :: Ord a => Graph a -> Graph a
154153
simplify = Graph . Algebraic.simplify . unGraph
155154

155+
maybeM :: Applicative f => f a -> Maybe a -> f a
156+
maybeM f = maybe f pure
157+
156158
testEdgeList :: [Node]
157159
testEdgeList =
158160
[ Scope "current"

0 commit comments

Comments
 (0)
0