Skip to content

Commit

Permalink
move ReadableIORef to util sublibrary (#1700)
Browse files Browse the repository at this point in the history
As title.
  • Loading branch information
kostmo authored Jan 1, 2024
1 parent f6f01b2 commit 1da74a7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/Swarm/App.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ import Graphics.Vty.Platform.Unix qualified as VS
import Swarm.Game.Failure (SystemFailure)
import Swarm.Language.Pretty (prettyText)
import Swarm.Log (LogSource (SystemLog), Severity (..))
import Swarm.ReadableIORef (mkReadonly)
import Swarm.TUI.Controller
import Swarm.TUI.Model
import Swarm.TUI.Model.StateUpdate
import Swarm.TUI.Model.UI (uiAttrMap)
import Swarm.TUI.View
import Swarm.Util.ReadableIORef (mkReadonly)
import Swarm.Version (getNewerReleaseVersion)
import Swarm.Web
import System.IO (stderr)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
--
-- Ensures that access to an 'IORef' is read-only
-- by hiding behind a newtype.
module Swarm.ReadableIORef (mkReadonly, ReadableIORef, readIORef) where
module Swarm.Util.ReadableIORef (mkReadonly, ReadableIORef, readIORef) where

import Data.IORef (IORef)
import Data.IORef qualified as R (readIORef)
Expand Down
2 changes: 1 addition & 1 deletion src/swarm-web/Swarm/Web.hs
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ import Swarm.Language.Module
import Swarm.Language.Pipeline
import Swarm.Language.Pretty (prettyTextLine)
import Swarm.Language.Syntax
import Swarm.ReadableIORef
import Swarm.TUI.Model
import Swarm.TUI.Model.Goal
import Swarm.TUI.Model.UI
import Swarm.Util.ReadableIORef
import Swarm.Util.RingBuffer
import Swarm.Web.Worldview
import System.Timeout (timeout)
Expand Down
3 changes: 2 additions & 1 deletion swarm.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ library swarm-util
Swarm.Util.Lens
Swarm.Util.OccurrenceEncoder
Swarm.Util.Parse
Swarm.Util.ReadableIORef
Swarm.Util.RingBuffer
Swarm.Util.UnitInterval
Swarm.Util.WindowedCounter
Expand Down Expand Up @@ -284,7 +285,6 @@ library
Swarm.Language.Typed
Swarm.Language.Types
Swarm.Language.Value
Swarm.ReadableIORef
Swarm.TUI.View
Swarm.TUI.View.Achievement
Swarm.TUI.View.Attribute.Attr
Expand Down Expand Up @@ -424,6 +424,7 @@ executable swarm
vty,
swarm,
swarm-web,
swarm-util,
if os(windows)
build-depends: vty-windows >= 0.1.0.3 && < 0.2,
else
Expand Down

0 comments on commit 1da74a7

Please sign in to comment.