sport 0.1.0.0 → 0.2.0.0
raw patch · 4 files changed
+19/−1 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Sport: getSportCfg :: Sport -> STM (Maybe SportCfg)
+ Sport.Sport: getSportCfg :: Sport -> STM (Maybe SportCfg)
Files
- CHANGELOG.md +5/−0
- lib/Sport.hs +3/−0
- lib/Sport/Sport.hs +10/−0
- sport.cabal +1/−1
CHANGELOG.md view
@@ -1,5 +1,10 @@ # Revision history for sport +## 0.2.0.0 -- 4-21-2026++* Expose current configuration in STM+* Re-export baud rate from unix package+ ## 0.1.0.0 -- 4-20-2026 * First version. Released on an unsuspecting world.
lib/Sport.hs view
@@ -17,9 +17,11 @@ , runSport , -- *** Open & Close openSport+ , getSportCfg , defSportCfg , SportCfg(..) , BufferMode(..)+ , BaudRate(..) , Parity(..) , StopBits(..) , closeSport@@ -34,3 +36,4 @@ import Sport.Serial import Sport.Sport import System.IO+import System.Posix
lib/Sport/Sport.hs view
@@ -5,6 +5,7 @@ , withSport , runSport , openSport+ , getSportCfg , defSportCfg , SportCfg(..) , closeSport@@ -101,6 +102,15 @@ case result of Left err -> throwSTM err Right () -> return ()++-- | Get current configuration.+getSportCfg :: Sport -> STM (Maybe SportCfg)+getSportCfg (Sport s _ _) = do+ st <- readTVar s+ return $ case st of+ Closed -> Nothing+ Opening cfg _ -> Just cfg+ Open cfg _ -> Just cfg -- | Close the serial port. closeSport :: Sport -> IO ()
sport.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: sport-version: 0.1.0.0+version: 0.2.0.0 synopsis: UNIX serial port description: Concurrent serial IO license: MIT