Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Stack/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import qualified Data.Set as S
import qualified Data.Text as T
import Data.Text.Encoding (encodeUtf8, decodeUtf8)
import qualified Data.Yaml as Yaml
import Distribution.System (OS (Windows), Platform (..), buildPlatform)
import Distribution.System (OS (..), Platform (..), buildPlatform)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change appears unnecessary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops... true.

import qualified Distribution.Text
import Distribution.Version (simplifyVersionRange)
import Network.HTTP.Client.Conduit (HasHttpManager, getHttpManager, Manager, parseUrl)
Expand Down
4 changes: 2 additions & 2 deletions src/Stack/Package.hs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import Distribution.Package hiding (Package,PackageName,packageName,pa
import Distribution.PackageDescription hiding (FlagName)
import Distribution.PackageDescription.Parse
import Distribution.Simple.Utils
import Distribution.System (OS, Arch, Platform (..))
import Distribution.System (OS (..), Arch, Platform (..))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As does this one

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need Windows.

import Distribution.Text (display)
import Distribution.Version (intersectVersionRanges)
import Path as FL
Expand Down Expand Up @@ -615,7 +615,7 @@ mkResolveConditions :: Version -- ^ GHC version
mkResolveConditions ghcVersion (Platform arch os) flags = ResolveConditions
{ rcFlags = flags
, rcGhcVersion = ghcVersion
, rcOS = os
, rcOS = if isWindows os then Windows else os
, rcArch = arch
}

Expand Down
5 changes: 0 additions & 5 deletions src/Stack/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,6 @@ stripTrailingSlashT t = fromMaybe t $ T.stripSuffix
(T.singleton FP.pathSeparator)
t

isWindows :: OS -> Bool
isWindows Windows = True
isWindows (OtherOS "windowsintegersimple") = True
isWindows _ = False

-- | Ensure GHC is installed and provide the PATHs to add if necessary
ensureGHC :: (MonadIO m, MonadMask m, MonadLogger m, MonadReader env m, HasConfig env, HasHttpManager env, MonadBaseControl IO m)
=> SetupOpts
Expand Down
9 changes: 8 additions & 1 deletion src/Stack/Types/BuildPlan.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module Stack.Types.BuildPlan
, MiniPackageInfo (..)
, renderSnapName
, parseSnapName
, isWindows
) where

import Control.Applicative
Expand Down Expand Up @@ -51,7 +52,7 @@ import Data.Time (Day)
import qualified Data.Traversable as T
import Data.Typeable (TypeRep, Typeable, typeOf)
import Data.Vector (Vector)
import Distribution.System (Arch, OS)
import Distribution.System (Arch, OS (..))
import qualified Distribution.Text as DT
import qualified Distribution.Version as C
import GHC.Generics (Generic)
Expand Down Expand Up @@ -386,3 +387,9 @@ data MiniPackageInfo = MiniPackageInfo
}
deriving (Generic, Show, Eq)
instance Binary.Binary MiniPackageInfo


isWindows :: OS -> Bool
isWindows Windows = True
isWindows (OtherOS "windowsintegersimple") = True
isWindows _ = False