Commit b0fbfc75 authored by John Ericson's avatar John Ericson Committed by cgibbard
Browse files

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.
parent 0ac29c88
...@@ -935,7 +935,7 @@ type BuildModule = (Module, IsBoot) ...@@ -935,7 +935,7 @@ type BuildModule = (Module, IsBoot)
-- | 'Bool' indicating if a module is a boot module or not. We need to treat -- | '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 -- boot modules specially when building compilation graphs, since they break
-- cycles. Regular source files and signature files are treated equivalently. -- cycles. Regular source files and signature files are treated equivalently.
data IsBoot = IsBoot | NotBoot data IsBoot = NotBoot | IsBoot
deriving (Ord, Eq, Show, Read) deriving (Ord, Eq, Show, Read)
-- | Tests if an 'HscSource' is a boot file, primarily for constructing -- | Tests if an 'HscSource' is a boot file, primarily for constructing
......
[1 of 5] Compiling D ( D.hs, D.o ) [1 of 5] Compiling D ( D.hs, D.o )
[2 of 5] Compiling E[boot] ( E.hs-boot, E.o-boot ) [2 of 5] Compiling E[boot] ( E.hs-boot, E.o-boot )
[3 of 5] Compiling Y[boot] ( Y.hs-boot, Y.o-boot ) [3 of 5] Compiling Y[boot] ( Y.hs-boot, Y.o-boot )
[4 of 5] Compiling E ( E.hs, E.o ) [4 of 5] Compiling Y ( Y.hs, Y.o )
[5 of 5] Compiling Y ( Y.hs, Y.o ) [5 of 5] Compiling E ( E.hs, E.o )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment