diff options
Diffstat (limited to 'compiler/GHC/Platform/Ways.hs')
-rw-r--r-- | compiler/GHC/Platform/Ways.hs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/compiler/GHC/Platform/Ways.hs b/compiler/GHC/Platform/Ways.hs index f9e70b7b92..71337187d8 100644 --- a/compiler/GHC/Platform/Ways.hs +++ b/compiler/GHC/Platform/Ways.hs @@ -24,7 +24,9 @@ module GHC.Platform.Ways ( Way(..) , Ways , hasWay + , hasNotWay , addWay + , removeWay , allowed_combination , wayGeneralFlags , wayUnsetGeneralFlags @@ -72,14 +74,22 @@ data Way type Ways = Set Way --- | Test if a ways is enabled +-- | Test if a way is enabled hasWay :: Ways -> Way -> Bool hasWay ws w = Set.member w ws +-- | Test if a way is not enabled +hasNotWay :: Ways -> Way -> Bool +hasNotWay ws w = Set.notMember w ws + -- | Add a way addWay :: Way -> Ways -> Ways addWay = Set.insert +-- | Remove a way +removeWay :: Way -> Ways -> Ways +removeWay = Set.delete + -- | Check if a combination of ways is allowed allowed_combination :: Ways -> Bool allowed_combination ways = not disallowed |