summaryrefslogtreecommitdiff
path: root/compiler/GHC
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2019-09-26 11:31:44 -0400
committercgibbard <cgibbard@gmail.com>2020-04-24 12:07:14 -0400
commitb0fbfc7582fb81314dc28a056536737fb5eeaa6e (patch)
tree9e0107a08fd5a7f4f20d28d4a4e1b086bc29af3e /compiler/GHC
parent0ac29c885fba7ed69de83a597cdbd03696c9ed13 (diff)
downloadhaskell-b0fbfc7582fb81314dc28a056536737fb5eeaa6e.tar.gz
Switch order on `GhcMake.IsBoot`
In !1798 we were requested to replace many `Bool`s with this data type. But those bools had `False` meaning `NotBoot`, so the `Ord` instance would be flipped if we use this data-type as-is. Since the planned formally-`Bool` occurrences vastly outnumber the current occurrences, we figured it would be better to conform the `Ord` instance to how the `Bool` is used now, fixing any issues, rather than fix them currently with the bigger refactor later in !1798. That way, !1798 can be a "pure" refactor with no behavioral changes.
Diffstat (limited to 'compiler/GHC')
-rw-r--r--compiler/GHC/Driver/Make.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/Driver/Make.hs b/compiler/GHC/Driver/Make.hs
index 7df02dd7c8..b81b045ed6 100644
--- a/compiler/GHC/Driver/Make.hs
+++ b/compiler/GHC/Driver/Make.hs
@@ -935,7 +935,7 @@ type BuildModule = (Module, IsBoot)
-- | 'Bool' indicating if a module is a boot module or not. We need to treat
-- boot modules specially when building compilation graphs, since they break
-- cycles. Regular source files and signature files are treated equivalently.
-data IsBoot = IsBoot | NotBoot
+data IsBoot = NotBoot | IsBoot
deriving (Ord, Eq, Show, Read)
-- | Tests if an 'HscSource' is a boot file, primarily for constructing