summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Wilson <douglas.wilson@gmail.com>2021-12-19 11:09:02 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-04-28 18:54:44 -0400
commitc7a3dc292a7ee7d1639955b6343b0d3c755c7248 (patch)
tree3f7a33d07ead88e2e8d398c4aa939529484c6190
parentf6a8185d741adec8b0cc89749bc660128eca57fe (diff)
downloadhaskell-c7a3dc292a7ee7d1639955b6343b0d3c755c7248.tar.gz
hadrian: Add Monoid instance to Way
-rw-r--r--hadrian/src/Way/Type.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/hadrian/src/Way/Type.hs b/hadrian/src/Way/Type.hs
index 5945d48137..4a719eb501 100644
--- a/hadrian/src/Way/Type.hs
+++ b/hadrian/src/Way/Type.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE DerivingStrategies #-}
module Way.Type where
import Data.IntSet (IntSet)
@@ -37,9 +39,10 @@ instance Read WayUnit where
"dyn" -> [(Dynamic,"")]
_ -> []
--- | Collection of 'WayUnit's that stands for the different ways source code
+-- | Collection of 'WayUnit's that stands for the different ways source codeA
-- is to be built.
newtype Way = Way IntSet
+ deriving newtype (Semigroup, Monoid)
instance Binary Way where
put (Way w) = put w