nri-prelude 0.6.0.5 → 0.6.0.6
raw patch · 4 files changed
+23/−12 lines, 4 filesdep +lensdep ~basedep ~ghcdep ~textnew-uploader
Dependencies added: lens
Dependency ranges changed: base, ghc, text
Files
- CHANGELOG.md +4/−0
- LICENSE +1/−1
- nri-prelude.cabal +11/−9
- src/Platform/DevLog.hs +7/−2
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Unreleased next version +# 0.6.0.6++- Permit `text-2.0.x`, `base-4.16.x` and `template-haskell-2.18.x`+ # 0.6.0.5 - Support `time-1.x`.
LICENSE view
@@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2021, NoRedInk+Copyright (c) 2022, NoRedInk All rights reserved. Redistribution and use in source and binary forms, with or without
nri-prelude.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.18 --- This file has been generated from package.yaml by hpack version 0.34.4.+-- This file has been generated from package.yaml by hpack version 0.34.5. -- -- see: https://github.com/sol/hpack name: nri-prelude-version: 0.6.0.5+version: 0.6.0.6 synopsis: A Prelude inspired by the Elm programming language description: Please see the README at <https://github.com/NoRedInk/haskell-libraries/tree/trunk/nri-prelude#readme>. category: Web@@ -13,7 +13,7 @@ bug-reports: https://github.com/NoRedInk/haskell-libraries/issues author: NoRedInk maintainer: haskell-open-source@noredink.com-copyright: 2021 NoRedInk Corp.+copyright: 2022 NoRedInk Corp. license: BSD3 license-file: LICENSE build-type: Simple@@ -88,22 +88,23 @@ , aeson-pretty >=0.8.0 && <0.9 , async >=2.2.2 && <2.3 , auto-update >=0.1.6 && <0.2- , base >=4.12.0.0 && <4.16+ , base >=4.12.0.0 && <4.17 , bytestring >=0.10.8.2 && <0.12 , containers >=0.6.0.1 && <0.7 , directory >=1.3.3.0 && <1.4 , exceptions >=0.10.4 && <0.11 , filepath >=1.4.2.1 && <1.5- , ghc >=8.6.1 && <9.1+ , ghc >=8.6.1 && <9.3 , hedgehog >=1.0.2 && <1.1 , junit-xml >=0.1.0.0 && <0.2.0.0+ , lens >=4.16.1 && <5.1 , pretty-diff >=0.4.0.2 && <0.5 , pretty-show >=1.9.5 && <1.11 , safe-coloured-text >=0.1.0.0 && <0.2 , safe-coloured-text-terminfo >=0.0.0.0 && <0.1 , safe-exceptions >=0.1.7.0 && <1.3 , terminal-size >=0.3.2.1 && <0.4- , text >=1.2.3.1 && <1.3+ , text >=1.2.3.1 && <2.1 , time >=1.8.0.2 && <2 , unix >=2.7.2.2 && <2.8.0.0 , vector >=0.12.1.2 && <0.13@@ -180,22 +181,23 @@ , aeson-pretty >=0.8.0 && <0.9 , async >=2.2.2 && <2.3 , auto-update >=0.1.6 && <0.2- , base >=4.12.0.0 && <4.16+ , base >=4.12.0.0 && <4.17 , bytestring >=0.10.8.2 && <0.12 , containers >=0.6.0.1 && <0.7 , directory >=1.3.3.0 && <1.4 , exceptions >=0.10.4 && <0.11 , filepath >=1.4.2.1 && <1.5- , ghc >=8.6.1 && <9.1+ , ghc >=8.6.1 && <9.3 , hedgehog >=1.0.2 && <1.1 , junit-xml >=0.1.0.0 && <0.2.0.0+ , lens >=4.16.1 && <5.1 , pretty-diff >=0.4.0.2 && <0.5 , pretty-show >=1.9.5 && <1.11 , safe-coloured-text >=0.1.0.0 && <0.2 , safe-coloured-text-terminfo >=0.0.0.0 && <0.1 , safe-exceptions >=0.1.7.0 && <1.3 , terminal-size >=0.3.2.1 && <0.4- , text >=1.2.3.1 && <1.3+ , text >=1.2.3.1 && <2.1 , time >=1.8.0.2 && <2 , unix >=2.7.2.2 && <2.8.0.0 , vector >=0.12.1.2 && <0.13
src/Platform/DevLog.hs view
@@ -6,6 +6,7 @@ where import qualified Control.Concurrent.MVar as MVar+import qualified Control.Monad import qualified Data.Aeson as Aeson import qualified Data.ByteString.Lazy import qualified Data.Time as Time@@ -13,7 +14,7 @@ import qualified Platform.Internal import qualified System.IO import qualified System.IO.Unsafe-import qualified System.Posix.Files+import qualified System.Posix.Files as Files import qualified Prelude -- | Write a tracing span to the development log, where it can be found by@@ -27,7 +28,11 @@ logFile System.IO.AppendMode ( \handle -> do- System.Posix.Files.setFileMode logFile System.Posix.Files.stdFileMode+ fileStatus <- Files.getFileStatus logFile+ let fileMode = Files.fileMode fileStatus+ let fileAccessModes = Files.intersectFileModes fileMode Files.accessModes+ Control.Monad.unless (fileAccessModes == Files.stdFileMode) <|+ Files.setFileMode logFile Files.stdFileMode Data.ByteString.Lazy.hPut handle (Aeson.encode (now, span)) Data.ByteString.Lazy.hPut handle "\n" )