Skip to content

Commit

Permalink
Derive Semigroup & Monoid instances for Facet.Graph.
Browse files Browse the repository at this point in the history
  • Loading branch information
robrix committed Oct 23, 2020
1 parent ac89909 commit 36339a2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Facet/Graph.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import Facet.Stack
import Prelude hiding (lookup)

newtype Graph = Graph { getGraph :: Map.Map MName (FilePath, Module) }
deriving (Semigroup, Monoid)

insert :: FilePath -> Module -> Graph -> Graph
insert p m@Module{ name } = Graph . Map.insert name (p, m) . getGraph
Expand Down

0 comments on commit 36339a2

Please sign in to comment.