Skip to content

Commit

Permalink
Remove warp dependency from engine (#2122)
Browse files Browse the repository at this point in the history
...just for one type-alias:
```Haskell
type Port = Int
```

* part of #2109
  • Loading branch information
xsebek authored Aug 16, 2024
1 parent 76e6202 commit 403c9a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/swarm-engine/Swarm/Game/State/Runtime.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import Control.Lens
import Data.Map (Map)
import Data.Sequence (Seq)
import Data.Text (Text)
import Network.Wai.Handler.Warp (Port)
import Swarm.Game.Failure (SystemFailure)
import Swarm.Game.Land
import Swarm.Game.Recipe (loadRecipes)
Expand All @@ -43,7 +42,7 @@ import Swarm.Util.Lens (makeLensesNoSigs)
import Swarm.Version (NewReleaseFailure (..))

data RuntimeState = RuntimeState
{ _webPort :: Maybe Port
{ _webPort :: Maybe Int
, _upstreamRelease :: Either NewReleaseFailure String
, _eventLog :: Notifications LogEntry
, _scenarios :: ScenarioCollection
Expand Down Expand Up @@ -110,7 +109,7 @@ initRuntimeState pause = do
makeLensesNoSigs ''RuntimeState

-- | The port on which the HTTP debug service is running.
webPort :: Lens' RuntimeState (Maybe Port)
webPort :: Lens' RuntimeState (Maybe Int)

-- | The upstream release version.
upstreamRelease :: Lens' RuntimeState (Either NewReleaseFailure String)
Expand Down
1 change: 0 additions & 1 deletion swarm.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,6 @@ library swarm-engine
time >=1.9 && <1.15,
transformers >=0.5 && <0.7,
unordered-containers >=0.2.14 && <0.3,
warp,
witch >=1.1.1.0 && <1.3,
yaml >=0.11 && <0.11.12.0,

Expand Down

0 comments on commit 403c9a9

Please sign in to comment.