move ReadableIORef to util sublibrary (#1700)

As title.
This commit is contained in:
Karl Ostmo 2023-12-31 18:29:07 -08:00 committed by GitHub
parent f6f01b264c
commit 1da74a79dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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
@ -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
@ -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