packages feed

rtcm 0.2.2 → 0.2.5

raw patch · 17 files changed

+170/−171 lines, 17 filesdep −resourcetPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependencies removed: resourcet

API changes (from Hackage documentation)

- Data.RTCM3.Types: class HasMsg c_arms where msgRTCM3Crc = (.) msg msgRTCM3Crc msgRTCM3Len = (.) msg msgRTCM3Len msgRTCM3Payload = (.) msg msgRTCM3Payload
+ Data.RTCM3.Types: class HasMsg c_aro9 where msgRTCM3Crc = (.) msg msgRTCM3Crc msgRTCM3Len = (.) msg msgRTCM3Len msgRTCM3Payload = (.) msg msgRTCM3Payload
- Data.RTCM3.Types: msg :: HasMsg c_arms => Lens' c_arms Msg
+ Data.RTCM3.Types: msg :: HasMsg c_aro9 => Lens' c_aro9 Msg
- Data.RTCM3.Types: msgRTCM3Crc :: HasMsg c_arms => Lens' c_arms Word24
+ Data.RTCM3.Types: msgRTCM3Crc :: HasMsg c_aro9 => Lens' c_aro9 Word24
- Data.RTCM3.Types: msgRTCM3Len :: HasMsg c_arms => Lens' c_arms Word16
+ Data.RTCM3.Types: msgRTCM3Len :: HasMsg c_aro9 => Lens' c_aro9 Word16
- Data.RTCM3.Types: msgRTCM3Payload :: HasMsg c_arms => Lens' c_arms Bytes
+ Data.RTCM3.Types: msgRTCM3Payload :: HasMsg c_aro9 => Lens' c_aro9 Bytes

Files

main/json2rtcm3.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE FlexibleContexts  #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} @@ -13,7 +14,6 @@ -- to stdout.  import BasicPrelude                      hiding (lines, mapMaybe)-import Control.Monad.Trans.Resource import Data.Aeson import Data.Conduit import Data.Conduit.Binary@@ -23,14 +23,15 @@ import System.IO  -- | Decode a line of JSON to RTCM3.+-- decodeLine :: ByteString -> Maybe RTCM3Msg decodeLine = decodeStrict  main :: IO () main =-  runResourceT $-    sourceHandle stdin    =$=-      lines               =$=-      mapMaybe decodeLine =$=-      conduitEncode       $$-      sinkHandle stdout+  runConduitRes $+    sourceHandle stdin+      =$= lines+      =$= mapMaybe decodeLine+      =$= conduitEncode+      $$  sinkHandle stdout
main/rtcm32json.hs view
@@ -13,7 +13,6 @@ -- to stdout.  import BasicPrelude                      hiding (map)-import Control.Monad.Trans.Resource import Data.Aeson import Data.ByteString.Lazy              hiding (ByteString, map) import Data.Conduit@@ -24,13 +23,14 @@ import System.IO  -- | Encode a RTCM3Msg to a line of JSON.+-- encodeLine :: RTCM3Msg -> ByteString encodeLine v = toStrict $ encode v <> "\n"  main :: IO () main =-  runResourceT $-    sourceHandle stdin  =$=-      conduitDecode     =$=-      map encodeLine $$-      sinkHandle stdout+  runConduitRes $+    sourceHandle stdin+      =$= conduitDecode+      =$= map encodeLine+      $$  sinkHandle stdout
rtcm.cabal view
@@ -1,5 +1,5 @@ name: rtcm-version: 0.2.2+version: 0.2.5 cabal-version: >=1.22 build-type: Simple license: BSD3@@ -62,7 +62,6 @@         conduit >=1.2.10,         conduit-combinators >=1.0.8.3,         conduit-extra >=1.1.16,-        resourcet >=1.1.9,         rtcm     default-language: Haskell2010     hs-source-dirs: main@@ -77,7 +76,6 @@         binary-conduit >=1.2.4.1,         conduit >=1.2.10,         conduit-extra >=1.1.16,-        resourcet >=1.1.9,         rtcm     default-language: Haskell2010     hs-source-dirs: main
src/Data/RTCM3.hs view
@@ -155,7 +155,7 @@ (<<>>) a b = fromMaybe Null $ do   c <- preview _Object a   d <- preview _Object b-  return $ review _Object $ c <> d+  pure $ review _Object $ c <> d  instance ToJSON RTCM3Msg where   toJSON (RTCM3Msg1001    n m) = toJSON n <<>> toJSON m
src/Data/RTCM3/Antennas.hs view
@@ -70,7 +70,7 @@     _antennaReference_ecef_y       <- getInt64be 38     _antennaReference_quarterCycle <- B.getWord8 2     _antennaReference_ecef_z       <- getInt64be 38-    return AntennaReference {..}+    pure AntennaReference {..}    putBits _n AntennaReference {..} = do     B.putWord16be 12 _antennaReference_num@@ -101,7 +101,7 @@ instance BinaryBit ExtAntennaReference where   getBits _n = do     _extAntennaReference_height <- B.getWord16be 16-    return ExtAntennaReference {..}+    pure ExtAntennaReference {..}    putBits _n ExtAntennaReference {..} =     B.putWord16be 16 _extAntennaReference_height@@ -132,7 +132,7 @@     _antennaDescriptor_n           <- B.getWord8 8     _antennaDescriptor_descriptors <- replicateM (fromIntegral _antennaDescriptor_n) $ B.getWord8 8     _antennaDescriptor_setup       <- B.getWord8 8-    return AntennaDescriptor {..}+    pure AntennaDescriptor {..}    putBits _n AntennaDescriptor {..} = do     B.putWord16be 12 _antennaDescriptor_num@@ -158,7 +158,7 @@   getBits _n = do     _extAntennaDescriptor_n             <- B.getWord8 8     _extAntennaDescriptor_serialNumbers <- replicateM (fromIntegral _extAntennaDescriptor_n) $ B.getWord8 8-    return ExtAntennaDescriptor {..}+    pure ExtAntennaDescriptor {..}    putBits _n ExtAntennaDescriptor {..} = do     B.putWord8 8 _extAntennaDescriptor_n@@ -193,7 +193,7 @@     _receiverDescriptor_firmwareVersions <- replicateM (fromIntegral _receiverDescriptor_m) $ B.getWord8 8     _receiverDescriptor_l                <- B.getWord8 8     _receiverDescriptor_serialNumbers    <- replicateM (fromIntegral _receiverDescriptor_l) $ B.getWord8 8-    return ReceiverDescriptor {..}+    pure ReceiverDescriptor {..}    putBits _n ReceiverDescriptor {..} = do     B.putWord8 8     _receiverDescriptor_n@@ -220,7 +220,7 @@ instance Binary Msg1005 where   get = B.runBitGet $ do     _msg1005_reference <- getBits 0-    return Msg1005 {..}+    pure Msg1005 {..}    put Msg1005 {..} = B.runBitPut $     putBits 0 _msg1005_reference@@ -247,7 +247,7 @@   get = B.runBitGet $ do     _msg1006_reference    <- getBits 0     _msg1006_extReference <- getBits 0-    return Msg1006 {..}+    pure Msg1006 {..}    put Msg1006 {..} = B.runBitPut $ do     putBits 0 _msg1006_reference@@ -272,7 +272,7 @@ instance Binary Msg1007 where   get = B.runBitGet $ do     _msg1007_descriptor <- getBits 0-    return Msg1007 {..}+    pure Msg1007 {..}    put Msg1007 {..} = B.runBitPut $     putBits 0 _msg1007_descriptor@@ -299,7 +299,7 @@   get = B.runBitGet $ do     _msg1008_descriptor    <- getBits 0     _msg1008_extDescriptor <- getBits 0-    return Msg1008 {..}+    pure Msg1008 {..}    put Msg1008 {..} = B.runBitPut $ do     putBits 0 _msg1008_descriptor@@ -330,7 +330,7 @@     _msg1033_antennaDescriptor    <- getBits 0     _msg1033_antennaExtDescriptor <- getBits 0     _msg1033_receiverDescriptor   <- getBits 0-    return Msg1033 {..}+    pure Msg1033 {..}    put Msg1033 {..} = B.runBitPut $ do     putBits 0 _msg1033_antennaDescriptor
src/Data/RTCM3/Ephemerides.hs view
@@ -44,7 +44,7 @@   getBits _n = do     _gpsEphemerisHeader_num <- B.getWord16be 12     _gpsEphemerisHeader_sat <- B.getWord8    6-    return GpsEphemerisHeader {..}+    pure GpsEphemerisHeader {..}    putBits _n GpsEphemerisHeader {..} = do     B.putWord16be 12 _gpsEphemerisHeader_num@@ -142,7 +142,7 @@     _gpsEphemeris_svHealth    <- B.getWord8    6     _gpsEphemeris_l2pFlag     <- B.getBool     _gpsEphemeris_fitInterval <- B.getBool-    return GpsEphemeris {..}+    pure GpsEphemeris {..}    putBits _n GpsEphemeris {..} = do     B.putWord16be 10 _gpsEphemeris_wn@@ -200,7 +200,7 @@     _glonassEphemerisHeader_num <- B.getWord16be  12     _glonassEphemerisHeader_sat <- B.getWord8     6     _glonassEphemerisHeader_channel <- B.getWord8 5-    return GlonassEphemerisHeader {..}+    pure GlonassEphemerisHeader {..}    putBits _n GlonassEphemerisHeader {..} = do     B.putWord16be 12 _glonassEphemerisHeader_num@@ -353,7 +353,7 @@     _glonassEphemeris_mTauGps            <- getInt32be 22     _glonassEphemeris_mln5               <- B.getBool     _glonassEphemeris_reserved           <- B.getWord8 7-    return GlonassEphemeris{..}+    pure GlonassEphemeris{..}    putBits _n GlonassEphemeris{..} = do     B.putBool        _glonassEphemeris_almanacHealth@@ -414,7 +414,7 @@   get = B.runBitGet $ do     _msg1019_header    <- getBits 0     _msg1019_ephemeris <- getBits 0-    return Msg1019 {..}+    pure Msg1019 {..}    put Msg1019 {..} = B.runBitPut $ do     putBits 0 _msg1019_header@@ -447,7 +447,7 @@   get = B.runBitGet $ do     _msg1020_header    <- getBits 0     _msg1020_ephemeris <- getBits 0-    return Msg1020 {..}+    pure Msg1020 {..}    put Msg1020 {..} = B.runBitPut $ do     putBits 0 _msg1020_header
src/Data/RTCM3/Extras.hs view
@@ -72,7 +72,7 @@     b1 <- fromIntegral <$> getWord8     b2 <- fromIntegral <$> getWord8     b3 <- fromIntegral <$> getWord8-    return $ fromInteger $ shiftL b1 16 .|. shiftL b2 8 .|. b3+    pure $ fromInteger $ shiftL b1 16 .|. shiftL b2 8 .|. b3 {-# INLINE getWord24be #-}  putWord24be :: Word24 -> Put
src/Data/RTCM3/Observations.hs view
@@ -60,7 +60,7 @@     _gpsObservationHeader_n                 <- B.getWord8 5     _gpsObservationHeader_smoothing         <- B.getBool     _gpsObservationHeader_smoothingInterval <- B.getWord8 3-    return GpsObservationHeader {..}+    pure GpsObservationHeader {..}    putBits _n GpsObservationHeader {..} = do     B.putWord16be 12 _gpsObservationHeader_num@@ -94,7 +94,7 @@     _gpsL1Observation_pseudorange      <- B.getWord32be 24     _gpsL1Observation_carrierMinusCode <- getInt32be 20     _gpsL1Observation_lockTime         <- B.getWord8 7-    return GpsL1Observation {..}+    pure GpsL1Observation {..}    putBits _n GpsL1Observation {..} = do     B.putBool        _gpsL1Observation_code@@ -119,7 +119,7 @@   getBits _n = do     _gpsL1ExtObservation_ambiguity <- B.getWord8 8     _gpsL1ExtObservation_cnr       <- B.getWord8 8-    return GpsL1ExtObservation {..}+    pure GpsL1ExtObservation {..}    putBits _n GpsL1ExtObservation {..} = do     B.putWord8 8 _gpsL1ExtObservation_ambiguity@@ -148,7 +148,7 @@     _gpsL2Observation_pseudorangeDifference <- getInt16be 14     _gpsL2Observation_carrierMinusCode      <- getInt32be 20     _gpsL2Observation_lockTime              <- B.getWord8 7-    return GpsL2Observation {..}+    pure GpsL2Observation {..}    putBits _n GpsL2Observation {..} = do     B.putWord8 2  _gpsL2Observation_code@@ -170,7 +170,7 @@ instance BinaryBit GpsL2ExtObservation where   getBits _n = do     _gpsL2ExtObservation_cnr <- B.getWord8 8-    return GpsL2ExtObservation {..}+    pure GpsL2ExtObservation {..}    putBits _n GpsL2ExtObservation {..} =     B.putWord8 8 _gpsL2ExtObservation_cnr@@ -207,7 +207,7 @@     _glonassObservationHeader_n                 <- B.getWord8 5     _glonassObservationHeader_smoothing         <- B.getBool     _glonassObservationHeader_smoothingInterval <- B.getWord8 3-    return GlonassObservationHeader {..}+    pure GlonassObservationHeader {..}    putBits _n GlonassObservationHeader {..} = do     B.putWord16be 12 _glonassObservationHeader_num@@ -244,7 +244,7 @@     _glonassL1Observation_pseudorange      <- B.getWord32be 25     _glonassL1Observation_carrierMinusCode <- getInt32be 20     _glonassL1Observation_lockTime         <- B.getWord8 7-    return GlonassL1Observation {..}+    pure GlonassL1Observation {..}    putBits _n GlonassL1Observation {..} = do     B.putBool        _glonassL1Observation_code@@ -270,7 +270,7 @@   getBits _n = do     _glonassL1ExtObservation_ambiguity <- B.getWord8 7     _glonassL1ExtObservation_cnr       <- B.getWord8 8-    return GlonassL1ExtObservation {..}+    pure GlonassL1ExtObservation {..}    putBits _n GlonassL1ExtObservation {..} = do     B.putWord8 7 _glonassL1ExtObservation_ambiguity@@ -299,7 +299,7 @@     _glonassL2Observation_pseudorangeDifference <- getInt16be 14     _glonassL2Observation_carrierMinusCode      <- getInt32be 20     _glonassL2Observation_lockTime              <- B.getWord8 7-    return GlonassL2Observation {..}+    pure GlonassL2Observation {..}    putBits _n GlonassL2Observation {..} = do     B.putWord8 2  _glonassL2Observation_code@@ -321,7 +321,7 @@ instance BinaryBit GlonassL2ExtObservation where   getBits _n = do     _glonassL2ExtObservation_cnr <- B.getWord8 8-    return GlonassL2ExtObservation {..}+    pure GlonassL2ExtObservation {..}    putBits _n GlonassL2ExtObservation {..} =     B.putWord8 8 _glonassL2ExtObservation_cnr@@ -361,7 +361,7 @@     _glonassBias_l1p     <- B.getWord16be 16     _glonassBias_l2ca    <- B.getWord16be 16     _glonassBias_l2p     <- B.getWord16be 16-    return GlonassBias {..}+    pure GlonassBias {..}    putBits _n GlonassBias {..} = do     B.putWord16be 12 _glonassBias_num@@ -393,7 +393,7 @@   getBits n = do     _observation1001_sat <- B.getWord8 6     _observation1001_l1  <- getBits n-    return Observation1001 {..}+    pure Observation1001 {..}    putBits n Observation1001 {..} = do     B.putWord8 6 _observation1001_sat@@ -416,7 +416,7 @@   get = B.runBitGet $ do     _msg1001_header       <- getBits 0     _msg1001_observations <- replicateM (fromIntegral $ _msg1001_header ^. gpsObservationHeader_n) $ getBits 0-    return Msg1001 {..}+    pure Msg1001 {..}    put Msg1001 {..} = B.runBitPut $ do     putBits 0 _msg1001_header@@ -447,7 +447,7 @@     _observation1002_sat <- B.getWord8 6     _observation1002_l1  <- getBits n     _observation1002_l1e <- getBits n-    return Observation1002 {..}+    pure Observation1002 {..}    putBits n Observation1002 {..} = do     B.putWord8 6 _observation1002_sat@@ -471,7 +471,7 @@   get = B.runBitGet $ do     _msg1002_header       <- getBits 0     _msg1002_observations <- replicateM (fromIntegral $ _msg1002_header ^. gpsObservationHeader_n) $ getBits 0-    return Msg1002 {..}+    pure Msg1002 {..}    put Msg1002 {..} = B.runBitPut $ do     putBits 0 _msg1002_header@@ -502,7 +502,7 @@     _observation1003_sat <- B.getWord8 6     _observation1003_l1  <- getBits n     _observation1003_l2  <- getBits n-    return Observation1003 {..}+    pure Observation1003 {..}    putBits n Observation1003 {..} = do     B.putWord8 6 _observation1003_sat@@ -526,7 +526,7 @@   get = B.runBitGet $ do     _msg1003_header       <- getBits 0     _msg1003_observations <- replicateM (fromIntegral $ _msg1003_header ^. gpsObservationHeader_n) $ getBits 0-    return Msg1003 {..}+    pure Msg1003 {..}    put Msg1003 {..} = B.runBitPut $ do     putBits 0 _msg1003_header@@ -563,7 +563,7 @@     _observation1004_l1e <- getBits n     _observation1004_l2  <- getBits n     _observation1004_l2e <- getBits n-    return Observation1004 {..}+    pure Observation1004 {..}    putBits n Observation1004 {..} = do     B.putWord8 6 _observation1004_sat@@ -589,7 +589,7 @@   get = B.runBitGet $ do     _msg1004_header       <- getBits 0     _msg1004_observations <- replicateM (fromIntegral $ _msg1004_header ^. gpsObservationHeader_n) $ getBits 0-    return Msg1004 {..}+    pure Msg1004 {..}    put Msg1004 {..} = B.runBitPut $ do     putBits 0 _msg1004_header@@ -617,7 +617,7 @@   getBits n = do     _observation1009_sat <- B.getWord8 6     _observation1009_l1  <- getBits n-    return Observation1009 {..}+    pure Observation1009 {..}    putBits n Observation1009 {..} = do     B.putWord8 6 _observation1009_sat@@ -640,7 +640,7 @@   get = B.runBitGet $ do     _msg1009_header       <- getBits 0     _msg1009_observations <- replicateM (fromIntegral $ _msg1009_header ^. glonassObservationHeader_n) $ getBits 0-    return Msg1009 {..}+    pure Msg1009 {..}    put Msg1009 {..} = B.runBitPut $ do     putBits 0 _msg1009_header@@ -671,7 +671,7 @@     _observation1010_sat <- B.getWord8 6     _observation1010_l1  <- getBits n     _observation1010_l1e <- getBits n-    return Observation1010 {..}+    pure Observation1010 {..}    putBits n Observation1010 {..} = do     B.putWord8 6 _observation1010_sat@@ -695,7 +695,7 @@   get = B.runBitGet $ do     _msg1010_header       <- getBits 0     _msg1010_observations <- replicateM (fromIntegral $ _msg1010_header ^. glonassObservationHeader_n) $ getBits 0-    return Msg1010 {..}+    pure Msg1010 {..}    put Msg1010 {..} = B.runBitPut $ do     putBits 0 _msg1010_header@@ -726,7 +726,7 @@     _observation1011_sat <- B.getWord8 6     _observation1011_l1  <- getBits n     _observation1011_l2  <- getBits n-    return Observation1011 {..}+    pure Observation1011 {..}    putBits n Observation1011 {..} = do     B.putWord8 6 _observation1011_sat@@ -750,7 +750,7 @@   get = B.runBitGet $ do     _msg1011_header       <- getBits 0     _msg1011_observations <- replicateM (fromIntegral $ _msg1011_header ^. glonassObservationHeader_n) $ getBits 0-    return Msg1011 {..}+    pure Msg1011 {..}    put Msg1011 {..} = B.runBitPut $ do     putBits 0 _msg1011_header@@ -787,7 +787,7 @@     _observation1012_l1e <- getBits n     _observation1012_l2  <- getBits n     _observation1012_l2e <- getBits n-    return Observation1012 {..}+    pure Observation1012 {..}    putBits n Observation1012 {..} = do     B.putWord8 6 _observation1012_sat@@ -813,7 +813,7 @@   get = B.runBitGet $ do     _msg1012_header       <- getBits 0     _msg1012_observations <- replicateM (fromIntegral $ _msg1012_header ^. glonassObservationHeader_n) $ getBits 0-    return Msg1012 {..}+    pure Msg1012 {..}    put Msg1012 {..} = B.runBitPut $ do     putBits 0 _msg1012_header@@ -838,7 +838,7 @@ instance Binary Msg1230 where   get = B.runBitGet $ do     _msg1230_bias <- getBits 0-    return Msg1230 {..}+    pure Msg1230 {..}    put Msg1230 {..} = B.runBitPut $     putBits 0 _msg1230_bias
src/Data/RTCM3/SSR.hs view
@@ -64,7 +64,7 @@     _gpsOrbitCorrectionHeader_provider       <- B.getWord16be 16     _gpsOrbitCorrectionHeader_solution       <- B.getWord8 4     _gpsOrbitCorrectionHeader_n              <- B.getWord8 6-    return GpsOrbitCorrectionHeader {..}+    pure GpsOrbitCorrectionHeader {..}    putBits _n GpsOrbitCorrectionHeader {..} = do     B.putWord16be 12 _gpsOrbitCorrectionHeader_num@@ -112,7 +112,7 @@     _gpsOrbitCorrection_dotDeltaRadial     <- getInt32be 21     _gpsOrbitCorrection_dotDeltaAlongTrack <- getInt32be 19     _gpsOrbitCorrection_dotDeltaCrossTrack <- getInt32be 19-    return GpsOrbitCorrection {..}+    pure GpsOrbitCorrection {..}    putBits _n GpsOrbitCorrection {..} = do     B.putWord8 6  _gpsOrbitCorrection_sat@@ -159,7 +159,7 @@     _gpsClockCorrectionHeader_provider       <- B.getWord16be 16     _gpsClockCorrectionHeader_solution       <- B.getWord8 4     _gpsClockCorrectionHeader_n              <- B.getWord8 6-    return GpsClockCorrectionHeader {..}+    pure GpsClockCorrectionHeader {..}    putBits _n GpsClockCorrectionHeader {..} = do     B.putWord16be 12 _gpsClockCorrectionHeader_num@@ -194,7 +194,7 @@     _gpsClockCorrection_deltaClockC0 <- getInt32be 22     _gpsClockCorrection_deltaClockC1 <- getInt32be 21     _gpsClockCorrection_deltaClockC2 <- getInt32be 27-    return GpsClockCorrection {..}+    pure GpsClockCorrection {..}    putBits _n GpsClockCorrection {..} = do     B.putWord8 6  _gpsClockCorrection_sat@@ -240,7 +240,7 @@     _glonassOrbitCorrectionHeader_provider       <- B.getWord16be 16     _glonassOrbitCorrectionHeader_solution       <- B.getWord8 4     _glonassOrbitCorrectionHeader_n              <- B.getWord8 6-    return GlonassOrbitCorrectionHeader {..}+    pure GlonassOrbitCorrectionHeader {..}    putBits _n GlonassOrbitCorrectionHeader {..} = do     B.putWord16be 12 _glonassOrbitCorrectionHeader_num@@ -288,7 +288,7 @@     _glonassOrbitCorrection_dotDeltaRadial     <- getInt32be 21     _glonassOrbitCorrection_dotDeltaAlongTrack <- getInt32be 19     _glonassOrbitCorrection_dotDeltaCrossTrack <- getInt32be 19-    return GlonassOrbitCorrection {..}+    pure GlonassOrbitCorrection {..}    putBits _n GlonassOrbitCorrection {..} = do     B.putWord8 5  _glonassOrbitCorrection_sat@@ -335,7 +335,7 @@     _glonassClockCorrectionHeader_provider       <- B.getWord16be 16     _glonassClockCorrectionHeader_solution       <- B.getWord8 4     _glonassClockCorrectionHeader_n              <- B.getWord8 6-    return GlonassClockCorrectionHeader {..}+    pure GlonassClockCorrectionHeader {..}    putBits _n GlonassClockCorrectionHeader {..} = do     B.putWord16be 12 _glonassClockCorrectionHeader_num@@ -370,7 +370,7 @@     _glonassClockCorrection_deltaClockC0 <- getInt32be 22     _glonassClockCorrection_deltaClockC1 <- getInt32be 21     _glonassClockCorrection_deltaClockC2 <- getInt32be 27-    return GlonassClockCorrection {..}+    pure GlonassClockCorrection {..}    putBits _n GlonassClockCorrection {..} = do     B.putWord8 5  _glonassClockCorrection_sat@@ -398,7 +398,7 @@   get = B.runBitGet $ do     _msg1057_header      <- getBits 0     _msg1057_corrections <- replicateM (fromIntegral $ _msg1057_header ^. gpsOrbitCorrectionHeader_n) $ getBits 0-    return Msg1057 {..}+    pure Msg1057 {..}    put Msg1057 {..} = B.runBitPut $ do     putBits 0 _msg1057_header@@ -426,7 +426,7 @@   get = B.runBitGet $ do     _msg1058_header      <- getBits 0     _msg1058_corrections <- replicateM (fromIntegral $ _msg1058_header ^. gpsClockCorrectionHeader_n) $ getBits 0-    return Msg1058 {..}+    pure Msg1058 {..}    put Msg1058 {..} = B.runBitPut $ do     putBits 0 _msg1058_header@@ -454,7 +454,7 @@   get = B.runBitGet $ do     _msg1063_header      <- getBits 0     _msg1063_corrections <- replicateM (fromIntegral $ _msg1063_header ^. glonassOrbitCorrectionHeader_n) $ getBits 0-    return Msg1063 {..}+    pure Msg1063 {..}    put Msg1063 {..} = B.runBitPut $ do     putBits 0 _msg1063_header@@ -482,7 +482,7 @@   get = B.runBitGet $ do     _msg1064_header      <- getBits 0     _msg1064_corrections <- replicateM (fromIntegral $ _msg1064_header ^. glonassClockCorrectionHeader_n) $ getBits 0-    return Msg1064 {..}+    pure Msg1064 {..}    put Msg1064 {..} = B.runBitPut $ do     putBits 0 _msg1064_header
src/Data/RTCM3/System.hs view
@@ -54,7 +54,7 @@     _messageHeader_seconds     <- B.getWord32be 17     _messageHeader_n           <- B.getWord8 5     _messageHeader_leapSeconds <- B.getWord8 8-    return MessageHeader {..}+    pure MessageHeader {..}    putBits _n MessageHeader {..} = do     B.putWord16be 12 _messageHeader_num@@ -84,7 +84,7 @@     _message_num         <- B.getWord16be 12     _message_synchronous <- B.getBool     _message_interval    <- B.getWord16be 16-    return Message {..}+    pure Message {..}    putBits _n Message {..} = do     B.putWord16be 12 _message_num@@ -111,7 +111,7 @@   get = B.runBitGet $ do     _msg1013_header <- getBits 0     _msg1013_messages <- replicateM (fromIntegral $ _msg1013_header ^. messageHeader_n) $ getBits 0-    return Msg1013 {..}+    pure Msg1013 {..}    put Msg1013 {..} = B.runBitPut $ do     putBits 0 _msg1013_header
src/Data/RTCM3/Types.hs view
@@ -79,7 +79,7 @@     _msgRTCM3Len     <- getWord16be     _msgRTCM3Payload <- fmap Bytes $ getByteString $ fromIntegral _msgRTCM3Len     _msgRTCM3Crc     <- getWord24be-    return Msg {..}+    pure Msg {..}    put Msg {..} = do     putWord16be _msgRTCM3Len
test/Test/Data/RTCM3/Antennas.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RecordWildCards   #-}-{-# OPTIONS -fno-warn-orphans #-}+{-# OPTIONS -fno-warn-orphans  #-}  -- | -- Module:      Test.Data.RTCM3.Antennas@@ -33,12 +33,12 @@     _antennaReference_ecef_y       <- arbitraryInt 38     _antennaReference_quarterCycle <- arbitraryWord 2     _antennaReference_ecef_z       <- arbitraryInt 38-    return AntennaReference {..}+    pure AntennaReference {..}  instance Arbitrary ExtAntennaReference where   arbitrary = do     _extAntennaReference_height <- arbitraryWord 16-    return ExtAntennaReference {..}+    pure ExtAntennaReference {..}  instance Arbitrary AntennaDescriptor where   arbitrary = do@@ -47,13 +47,13 @@     _antennaDescriptor_n           <- arbitraryWord 8     _antennaDescriptor_descriptors <- replicateM (fromIntegral _antennaDescriptor_n) $ arbitraryWord 8     _antennaDescriptor_setup       <- arbitraryWord 8-    return AntennaDescriptor {..}+    pure AntennaDescriptor {..}  instance Arbitrary ExtAntennaDescriptor where   arbitrary = do     _extAntennaDescriptor_n <- arbitraryWord 8     _extAntennaDescriptor_serialNumbers <- replicateM (fromIntegral _extAntennaDescriptor_n) $ arbitraryWord 8-    return ExtAntennaDescriptor {..}+    pure ExtAntennaDescriptor {..}  instance Arbitrary ReceiverDescriptor where   arbitrary = do@@ -63,7 +63,7 @@     _receiverDescriptor_firmwareVersions <- replicateM (fromIntegral _receiverDescriptor_m) $ arbitraryWord 8     _receiverDescriptor_l                <- arbitraryWord 8     _receiverDescriptor_serialNumbers    <- replicateM (fromIntegral _receiverDescriptor_l) $ arbitraryWord 8-    return ReceiverDescriptor {..}+    pure ReceiverDescriptor {..}  instance Arbitrary Msg1005 where   arbitrary = Msg1005 <$> arbitrary@@ -83,27 +83,27 @@ testMsg1005 :: TestTree testMsg1005 =   testProperty "Roundtrip Msg1005" $ \m ->-    (decode $ encode m) == (m :: Msg1005)+    decode (encode m) == (m :: Msg1005)  testMsg1006 :: TestTree testMsg1006 =   testProperty "Roundtrip Msg1006" $ \m ->-    (decode $ encode m) == (m :: Msg1006)+    decode (encode m) == (m :: Msg1006)  testMsg1007 :: TestTree testMsg1007 =   testProperty "Roundtrip Msg1007" $ \m ->-    (decode $ encode m) == (m :: Msg1007)+    decode (encode m) == (m :: Msg1007)  testMsg1008 :: TestTree testMsg1008 =   testProperty "Roundtrip Msg1008" $ \m ->-    (decode $ encode m) == (m :: Msg1008)+    decode (encode m) == (m :: Msg1008)  testMsg1033 :: TestTree testMsg1033 =   testProperty "Roundtrip Msg1033" $ \m ->-    (decode $ encode m) == (m :: Msg1033)+    decode (encode m) == (m :: Msg1033)  tests :: TestTree tests =
test/Test/Data/RTCM3/Ephemerides.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RecordWildCards   #-}-{-# OPTIONS -fno-warn-orphans #-}+{-# OPTIONS -fno-warn-orphans  #-}  -- | -- Module:      Test.Data.RTCM3.Ephemerides@@ -25,7 +25,7 @@   arbitrary = do     _gpsEphemerisHeader_num <- arbitraryWord 12     _gpsEphemerisHeader_sat <- arbitraryWord 6-    return GpsEphemerisHeader {..}+    pure GpsEphemerisHeader {..}  instance Arbitrary GpsEphemeris where   arbitrary = do@@ -58,25 +58,20 @@     _gpsEphemeris_svHealth    <- arbitraryWord 6     _gpsEphemeris_l2pFlag     <- arbitrary     _gpsEphemeris_fitInterval <- arbitrary-    return GpsEphemeris {..}+    pure GpsEphemeris {..}  instance Arbitrary Msg1019 where   arbitrary = do     _msg1019_header    <- arbitrary     _msg1019_ephemeris <- arbitrary-    return Msg1019 {..}--testMsg1019 :: TestTree-testMsg1019 =-  testProperty "Roundtrip Msg1019" $ \m ->-    (decode $ encode m) == (m :: Msg1019)+    pure Msg1019 {..}  instance Arbitrary GlonassEphemerisHeader where   arbitrary = do     _glonassEphemerisHeader_num <- arbitraryWord 12     _glonassEphemerisHeader_sat <- arbitraryWord 6     _glonassEphemerisHeader_channel <- arbitraryWord 5-    return GlonassEphemerisHeader{..}+    pure GlonassEphemerisHeader{..}  instance Arbitrary GlonassEphemeris where   arbitrary = do@@ -114,18 +109,23 @@     _glonassEphemeris_mTauGps            <- arbitraryInt 22     _glonassEphemeris_mln5               <- arbitrary     _glonassEphemeris_reserved           <- arbitraryWord 7-    return GlonassEphemeris{..}+    pure GlonassEphemeris{..}  instance Arbitrary Msg1020 where   arbitrary = do     _msg1020_header <- arbitrary     _msg1020_ephemeris <- arbitrary-    return Msg1020 {..}+    pure Msg1020 {..} +testMsg1019 :: TestTree+testMsg1019 =+  testProperty "Roundtrip Msg1019" $ \m ->+    decode (encode m) == (m :: Msg1019)+ testMsg1020 :: TestTree testMsg1020 =   testProperty "Roundtrip Msg1020" $ \m ->-    (decode $ encode m) == (m :: Msg1020)+    decode (encode m) == (m :: Msg1020)  tests :: TestTree tests =
test/Test/Data/RTCM3/Extras.hs view
@@ -36,7 +36,7 @@ arbitraryTestInt b = do   n <- choose (1, b-1)   i <- arbitraryInt n-  return $ TestInt n i+  pure $ TestInt n i  instance Arbitrary (TestInt Int8) where   arbitrary = arbitraryTestInt 8@@ -67,27 +67,27 @@ testInt8 :: TestTree testInt8 =   testProperty "Roundtrip Int8" $ \(TestInt n i) ->-    (decodeBits (getInt8 n) $ encodeBits (putInt8 n i)) == (i :: Int8)+    decodeBits (getInt8 n) (encodeBits (putInt8 n i)) == (i :: Int8)  testInt16be :: TestTree testInt16be =   testProperty "Roundtrip Int16" $ \(TestInt n i) ->-    (decodeBits (getInt16be n) $ encodeBits (putInt16be n i)) == (i :: Int16)+    decodeBits (getInt16be n) (encodeBits (putInt16be n i)) == (i :: Int16)  testInt32be :: TestTree testInt32be =   testProperty "Roundtrip Int32" $ \(TestInt n i) ->-    (decodeBits (getInt32be n) $ encodeBits (putInt32be n i)) == (i :: Int32)+    decodeBits (getInt32be n) (encodeBits (putInt32be n i)) == (i :: Int32)  testInt64be :: TestTree testInt64be =   testProperty "Roundtrip Int64be" $ \(TestInt n i) ->-    (decodeBits (getInt64be n) $ encodeBits (putInt64be n i)) == (i :: Int64)+    decodeBits (getInt64be n) (encodeBits (putInt64be n i)) == (i :: Int64)  testWord24be :: TestTree testWord24be =   testProperty "Roundtrip Word24be" $ \i ->-    (decode $ encode i) === (i :: Word24)+    decode (encode i) === (i :: Word24)  tests :: TestTree tests =
test/Test/Data/RTCM3/Observations.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RecordWildCards   #-}-{-# OPTIONS -fno-warn-orphans #-}+{-# OPTIONS -fno-warn-orphans  #-}  -- | -- Module:      Test.Data.RTCM3.Observations@@ -31,7 +31,7 @@     _gpsObservationHeader_n                 <- arbitraryWord 5     _gpsObservationHeader_smoothing         <- arbitrary     _gpsObservationHeader_smoothingInterval <- arbitraryWord 3-    return GpsObservationHeader {..}+    pure GpsObservationHeader {..}  instance Arbitrary GpsL1Observation where   arbitrary = do@@ -39,13 +39,13 @@     _gpsL1Observation_pseudorange      <- arbitraryWord 24     _gpsL1Observation_carrierMinusCode <- arbitraryInt 20     _gpsL1Observation_lockTime         <- arbitraryWord 7-    return GpsL1Observation {..}+    pure GpsL1Observation {..}  instance Arbitrary GpsL1ExtObservation where   arbitrary = do     _gpsL1ExtObservation_ambiguity <- arbitraryWord 8     _gpsL1ExtObservation_cnr       <- arbitraryWord 8-    return GpsL1ExtObservation {..}+    pure GpsL1ExtObservation {..}  instance Arbitrary GpsL2Observation where   arbitrary = do@@ -53,12 +53,12 @@     _gpsL2Observation_pseudorangeDifference <- arbitraryInt 14     _gpsL2Observation_carrierMinusCode      <- arbitraryInt 20     _gpsL2Observation_lockTime              <- arbitraryWord 7-    return GpsL2Observation {..}+    pure GpsL2Observation {..}  instance Arbitrary GpsL2ExtObservation where   arbitrary = do     _gpsL2ExtObservation_cnr <- arbitraryWord 8-    return GpsL2ExtObservation {..}+    pure GpsL2ExtObservation {..}  instance Arbitrary GlonassObservationHeader where   arbitrary = do@@ -69,7 +69,7 @@     _glonassObservationHeader_n                 <- arbitraryWord 5     _glonassObservationHeader_smoothing         <- arbitrary     _glonassObservationHeader_smoothingInterval <- arbitraryWord 3-    return GlonassObservationHeader {..}+    pure GlonassObservationHeader {..}  instance Arbitrary GlonassL1Observation where   arbitrary = do@@ -78,13 +78,13 @@     _glonassL1Observation_pseudorange      <- arbitraryWord 25     _glonassL1Observation_carrierMinusCode <- arbitraryInt 20     _glonassL1Observation_lockTime         <- arbitraryWord 7-    return GlonassL1Observation {..}+    pure GlonassL1Observation {..}  instance Arbitrary GlonassL1ExtObservation where   arbitrary = do     _glonassL1ExtObservation_ambiguity <- arbitraryWord 7     _glonassL1ExtObservation_cnr       <- arbitraryWord 8-    return GlonassL1ExtObservation {..}+    pure GlonassL1ExtObservation {..}  instance Arbitrary GlonassL2Observation where   arbitrary = do@@ -92,12 +92,12 @@     _glonassL2Observation_pseudorangeDifference <- arbitraryInt 14     _glonassL2Observation_carrierMinusCode      <- arbitraryInt 20     _glonassL2Observation_lockTime              <- arbitraryWord 7-    return GlonassL2Observation {..}+    pure GlonassL2Observation {..}  instance Arbitrary GlonassL2ExtObservation where   arbitrary = do     _glonassL2ExtObservation_cnr <- arbitraryWord 8-    return GlonassL2ExtObservation {..}+    pure GlonassL2ExtObservation {..}  instance Arbitrary GlonassBias where   arbitrary = do@@ -109,7 +109,7 @@     _glonassBias_l1p     <- arbitraryWord 16     _glonassBias_l2ca    <- arbitraryWord 16     _glonassBias_l2p     <- arbitraryWord 16-    return GlonassBias {..}+    pure GlonassBias {..}  instance Arbitrary Observation1001 where   arbitrary = Observation1001 <$> arbitraryWord 6 <*> arbitrary@@ -117,8 +117,8 @@ instance Arbitrary Msg1001 where   arbitrary = do     _msg1001_header       <- arbitrary-    _msg1001_observations <- replicateM (fromIntegral $ _msg1001_header ^. gpsObservationHeader_n) $ arbitrary-    return Msg1001 {..}+    _msg1001_observations <- replicateM (fromIntegral $ _msg1001_header ^. gpsObservationHeader_n) arbitrary+    pure Msg1001 {..}  instance Arbitrary Observation1002 where   arbitrary = Observation1002 <$> arbitraryWord 6 <*> arbitrary <*> arbitrary@@ -126,8 +126,8 @@ instance Arbitrary Msg1002 where   arbitrary = do     _msg1002_header       <- arbitrary-    _msg1002_observations <- replicateM (fromIntegral $ _msg1002_header ^. gpsObservationHeader_n) $ arbitrary-    return Msg1002 {..}+    _msg1002_observations <- replicateM (fromIntegral $ _msg1002_header ^. gpsObservationHeader_n) arbitrary+    pure Msg1002 {..}  instance Arbitrary Observation1003 where   arbitrary = Observation1003 <$> arbitraryWord 6 <*> arbitrary <*> arbitrary@@ -135,8 +135,8 @@ instance Arbitrary Msg1003 where   arbitrary = do     _msg1003_header       <- arbitrary-    _msg1003_observations <- replicateM (fromIntegral $ _msg1003_header ^. gpsObservationHeader_n) $ arbitrary-    return Msg1003 {..}+    _msg1003_observations <- replicateM (fromIntegral $ _msg1003_header ^. gpsObservationHeader_n) arbitrary+    pure Msg1003 {..}  instance Arbitrary Observation1004 where   arbitrary = Observation1004 <$> arbitraryWord 6 <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary@@ -144,8 +144,8 @@ instance Arbitrary Msg1004 where   arbitrary = do     _msg1004_header       <- arbitrary-    _msg1004_observations <- replicateM (fromIntegral $ _msg1004_header ^. gpsObservationHeader_n) $ arbitrary-    return Msg1004 {..}+    _msg1004_observations <- replicateM (fromIntegral $ _msg1004_header ^. gpsObservationHeader_n) arbitrary+    pure Msg1004 {..}  instance Arbitrary Observation1009 where   arbitrary = Observation1009 <$> arbitraryWord 6 <*> arbitrary@@ -153,8 +153,8 @@ instance Arbitrary Msg1009 where   arbitrary = do     _msg1009_header       <- arbitrary-    _msg1009_observations <- replicateM (fromIntegral $ _msg1009_header ^. glonassObservationHeader_n) $ arbitrary-    return Msg1009 {..}+    _msg1009_observations <- replicateM (fromIntegral $ _msg1009_header ^. glonassObservationHeader_n) arbitrary+    pure Msg1009 {..}  instance Arbitrary Observation1010 where   arbitrary = Observation1010 <$> arbitraryWord 6 <*> arbitrary <*> arbitrary@@ -162,8 +162,8 @@ instance Arbitrary Msg1010 where   arbitrary = do     _msg1010_header       <- arbitrary-    _msg1010_observations <- replicateM (fromIntegral $ _msg1010_header ^. glonassObservationHeader_n) $ arbitrary-    return Msg1010 {..}+    _msg1010_observations <- replicateM (fromIntegral $ _msg1010_header ^. glonassObservationHeader_n) arbitrary+    pure Msg1010 {..}  instance Arbitrary Observation1011 where   arbitrary = Observation1011 <$> arbitraryWord 6 <*> arbitrary <*> arbitrary@@ -171,8 +171,8 @@ instance Arbitrary Msg1011 where   arbitrary = do     _msg1011_header       <- arbitrary-    _msg1011_observations <- replicateM (fromIntegral $ _msg1011_header ^. glonassObservationHeader_n) $ arbitrary-    return Msg1011 {..}+    _msg1011_observations <- replicateM (fromIntegral $ _msg1011_header ^. glonassObservationHeader_n) arbitrary+    pure Msg1011 {..}  instance Arbitrary Observation1012 where   arbitrary = Observation1012 <$> arbitraryWord 6 <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary@@ -180,8 +180,8 @@ instance Arbitrary Msg1012 where   arbitrary = do     _msg1012_header       <- arbitrary-    _msg1012_observations <- replicateM (fromIntegral $ _msg1012_header ^. glonassObservationHeader_n) $ arbitrary-    return Msg1012 {..}+    _msg1012_observations <- replicateM (fromIntegral $ _msg1012_header ^. glonassObservationHeader_n) arbitrary+    pure Msg1012 {..}  instance Arbitrary Msg1230 where   arbitrary = Msg1230 <$> arbitrary@@ -189,47 +189,47 @@ testMsg1001 :: TestTree testMsg1001 =   testProperty "Roundtrip Msg1001" $ \m ->-    (decode $ encode m) == (m :: Msg1001)+    decode (encode m) == (m :: Msg1001)  testMsg1002 :: TestTree testMsg1002 =   testProperty "Roundtrip Msg1002" $ \m ->-    (decode $ encode m) == (m :: Msg1002)+    decode (encode m) == (m :: Msg1002)  testMsg1003 :: TestTree testMsg1003 =   testProperty "Roundtrip Msg1003" $ \m ->-    (decode $ encode m) == (m :: Msg1003)+    decode (encode m) == (m :: Msg1003)  testMsg1004 :: TestTree testMsg1004 =   testProperty "Roundtrip Msg1004" $ \m ->-    (decode $ encode m) == (m :: Msg1004)+    decode (encode m) == (m :: Msg1004)  testMsg1009 :: TestTree testMsg1009 =   testProperty "Roundtrip Msg1009" $ \m ->-    (decode $ encode m) == (m :: Msg1009)+    decode (encode m) == (m :: Msg1009)  testMsg1010 :: TestTree testMsg1010 =   testProperty "Roundtrip Msg1010" $ \m ->-    (decode $ encode m) == (m :: Msg1010)+    decode (encode m) == (m :: Msg1010)  testMsg1011 :: TestTree testMsg1011 =   testProperty "Roundtrip Msg1011" $ \m ->-    (decode $ encode m) == (m :: Msg1011)+    decode (encode m) == (m :: Msg1011)  testMsg1012 :: TestTree testMsg1012 =   testProperty "Roundtrip Msg1012" $ \m ->-    (decode $ encode m) == (m :: Msg1012)+    decode (encode m) == (m :: Msg1012)  testMsg1230 :: TestTree testMsg1230 =   testProperty "Roundtrip Msg1230" $ \m ->-    (decode $ encode m) == (m :: Msg1230)+    decode (encode m) == (m :: Msg1230)  tests :: TestTree tests =
test/Test/Data/RTCM3/SSR.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RecordWildCards   #-}-{-# OPTIONS -fno-warn-orphans #-}+{-# OPTIONS -fno-warn-orphans  #-}  -- | -- Module:      Test.Data.RTCM3.SSR@@ -33,7 +33,7 @@     _gpsOrbitCorrectionHeader_provider       <- arbitraryWord 16     _gpsOrbitCorrectionHeader_solution       <- arbitraryWord 4     _gpsOrbitCorrectionHeader_n              <- arbitraryWord 6-    return GpsOrbitCorrectionHeader {..}+    pure GpsOrbitCorrectionHeader {..}  instance Arbitrary GpsOrbitCorrection where   arbitrary = do@@ -45,7 +45,7 @@     _gpsOrbitCorrection_dotDeltaRadial     <- arbitraryInt 21     _gpsOrbitCorrection_dotDeltaAlongTrack <- arbitraryInt 19     _gpsOrbitCorrection_dotDeltaCrossTrack <- arbitraryInt 19-    return GpsOrbitCorrection {..}+    pure GpsOrbitCorrection {..}  instance Arbitrary GpsClockCorrectionHeader where   arbitrary = do@@ -57,7 +57,7 @@     _gpsClockCorrectionHeader_provider       <- arbitraryWord 16     _gpsClockCorrectionHeader_solution       <- arbitraryWord 4     _gpsClockCorrectionHeader_n              <- arbitraryWord 6-    return GpsClockCorrectionHeader {..}+    pure GpsClockCorrectionHeader {..}  instance Arbitrary GpsClockCorrection where   arbitrary = do@@ -65,7 +65,7 @@     _gpsClockCorrection_deltaClockC0 <- arbitraryInt 22     _gpsClockCorrection_deltaClockC1 <- arbitraryInt 21     _gpsClockCorrection_deltaClockC2 <- arbitraryInt 27-    return GpsClockCorrection {..}+    pure GpsClockCorrection {..}  instance Arbitrary GlonassOrbitCorrectionHeader where   arbitrary = do@@ -78,7 +78,7 @@     _glonassOrbitCorrectionHeader_provider       <- arbitraryWord 16     _glonassOrbitCorrectionHeader_solution       <- arbitraryWord 4     _glonassOrbitCorrectionHeader_n              <- arbitraryWord 6-    return GlonassOrbitCorrectionHeader {..}+    pure GlonassOrbitCorrectionHeader {..}  instance Arbitrary GlonassOrbitCorrection where   arbitrary = do@@ -90,7 +90,7 @@     _glonassOrbitCorrection_dotDeltaRadial     <- arbitraryInt 21     _glonassOrbitCorrection_dotDeltaAlongTrack <- arbitraryInt 19     _glonassOrbitCorrection_dotDeltaCrossTrack <- arbitraryInt 19-    return GlonassOrbitCorrection {..}+    pure GlonassOrbitCorrection {..}  instance Arbitrary GlonassClockCorrectionHeader where   arbitrary = do@@ -102,7 +102,7 @@     _glonassClockCorrectionHeader_provider       <- arbitraryWord 16     _glonassClockCorrectionHeader_solution       <- arbitraryWord 4     _glonassClockCorrectionHeader_n              <- arbitraryWord 6-    return GlonassClockCorrectionHeader {..}+    pure GlonassClockCorrectionHeader {..}  instance Arbitrary GlonassClockCorrection where   arbitrary = do@@ -110,51 +110,51 @@     _glonassClockCorrection_deltaClockC0 <- arbitraryInt 22     _glonassClockCorrection_deltaClockC1 <- arbitraryInt 21     _glonassClockCorrection_deltaClockC2 <- arbitraryInt 27-    return GlonassClockCorrection {..}+    pure GlonassClockCorrection {..}  instance Arbitrary Msg1057 where   arbitrary = do     _msg1057_header      <- arbitrary-    _msg1057_corrections <- replicateM (fromIntegral $ _msg1057_header ^. gpsOrbitCorrectionHeader_n) $ arbitrary-    return Msg1057 {..}+    _msg1057_corrections <- replicateM (fromIntegral $ _msg1057_header ^. gpsOrbitCorrectionHeader_n) arbitrary+    pure Msg1057 {..}  instance Arbitrary Msg1058 where   arbitrary = do     _msg1058_header      <- arbitrary-    _msg1058_corrections <- replicateM (fromIntegral $ _msg1058_header ^. gpsClockCorrectionHeader_n) $ arbitrary-    return Msg1058 {..}+    _msg1058_corrections <- replicateM (fromIntegral $ _msg1058_header ^. gpsClockCorrectionHeader_n) arbitrary+    pure Msg1058 {..}  instance Arbitrary Msg1063 where   arbitrary = do     _msg1063_header      <- arbitrary-    _msg1063_corrections <- replicateM (fromIntegral $ _msg1063_header ^. glonassOrbitCorrectionHeader_n) $ arbitrary-    return Msg1063 {..}+    _msg1063_corrections <- replicateM (fromIntegral $ _msg1063_header ^. glonassOrbitCorrectionHeader_n) arbitrary+    pure Msg1063 {..}  instance Arbitrary Msg1064 where   arbitrary = do     _msg1064_header      <- arbitrary-    _msg1064_corrections <- replicateM (fromIntegral $ _msg1064_header ^. glonassClockCorrectionHeader_n) $ arbitrary-    return Msg1064 {..}+    _msg1064_corrections <- replicateM (fromIntegral $ _msg1064_header ^. glonassClockCorrectionHeader_n) arbitrary+    pure Msg1064 {..}  testMsg1057 :: TestTree testMsg1057 =   testProperty "Roundtrip Msg1057" $ \m ->-    (decode $ encode m) == (m :: Msg1057)+    decode (encode m) == (m :: Msg1057)  testMsg1058 :: TestTree testMsg1058 =   testProperty "Roundtrip Msg1058" $ \m ->-    (decode $ encode m) == (m :: Msg1058)+    decode (encode m) == (m :: Msg1058)  testMsg1063 :: TestTree testMsg1063 =   testProperty "Roundtrip Msg1063" $ \m ->-    (decode $ encode m) == (m :: Msg1063)+    decode (encode m) == (m :: Msg1063)  testMsg1064 :: TestTree testMsg1064 =   testProperty "Roundtrip Msg1064" $ \m ->-    (decode $ encode m) == (m :: Msg1064)+    decode (encode m) == (m :: Msg1064)  tests :: TestTree tests =
test/Test/Data/RTCM3/System.hs view
@@ -1,6 +1,6 @@+{-# OPTIONS -fno-warn-orphans  #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RecordWildCards   #-}-{-# OPTIONS -fno-warn-orphans #-}  -- | -- Module:      Test.Data.RTCM3.System@@ -30,25 +30,25 @@     _messageHeader_seconds     <- arbitraryWord 17     _messageHeader_n           <- arbitraryWord 5     _messageHeader_leapSeconds <- arbitraryWord 8-    return MessageHeader {..}+    pure MessageHeader {..}  instance Arbitrary Message where   arbitrary = do     _message_num         <- arbitraryWord 12     _message_synchronous <- arbitrary     _message_interval    <- arbitraryWord 16-    return Message {..}+    pure Message {..}  instance Arbitrary Msg1013 where   arbitrary = do     header   <- arbitrary     messages <- replicateM (fromIntegral $ header ^. messageHeader_n) arbitrary-    return $ Msg1013 header messages+    pure $ Msg1013 header messages  testMsg1013 :: TestTree testMsg1013 =   testProperty "Roundtrip Msg1013" $ \m ->-    (decode $ encode m) == (m :: Msg1013)+    decode (encode m) == (m :: Msg1013)  tests :: TestTree tests =