Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stack
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Commercial Haskell
stack
Commits
62c24fa0
Commit
62c24fa0
authored
5 years ago
by
Emanuel Borsboom
Browse files
Options
Downloads
Patches
Plain Diff
Support rio-0.1.11.0
parent
d64ba5b7
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
snapshot-lts-12.yaml
+2
-1
2 additions, 1 deletion
snapshot-lts-12.yaml
snapshot-nightly.yaml
+2
-1
2 additions, 1 deletion
snapshot-nightly.yaml
snapshot.yaml
+2
-2
2 additions, 2 deletions
snapshot.yaml
src/Stack/Prelude.hs
+4
-21
4 additions, 21 deletions
src/Stack/Prelude.hs
with
10 additions
and
25 deletions
snapshot-lts-12.yaml
+
2
−
1
View file @
62c24fa0
...
...
@@ -9,7 +9,8 @@ packages:
-
yaml-0.10.4.0@rev:0
#for hpack-0.31
-
persistent-2.9.2@rev:0
-
persistent-sqlite-2.9.3@rev:0
-
rio-0.1.10.0@rev:0
-
rio-0.1.11.0@rev:0
-
unliftio-0.2.12@rev:0
#for rio-0.1.11.0
-
ansi-terminal-0.9@rev:0
-
ansi-wl-pprint-0.6.8.2@rev:1
# for ansi-terminal-0.9
-
hedgehog-0.6.1@rev:4
# for ansi-terminal-0.9
...
...
This diff is collapsed.
Click to expand it.
snapshot-nightly.yaml
+
2
−
1
View file @
62c24fa0
resolver
:
nightly-2019-07-1
1
resolver
:
nightly-2019-07-1
5
name
:
snapshot-for-building-stack-with-ghc-8.6.5
packages
:
...
...
@@ -11,6 +11,7 @@ packages:
-
cryptonite-0.26@rev:0
-
git
:
https://github.com/snoyberg/filelock.git
commit
:
97e83ecc133cd60a99df8e1fa5a3c2739ad007dc
-
rio-0.1.11.0@rev:0
-
persistent-template-2.7.1@rev:0
-
persistent-2.10.0@rev:0
-
persistent-sqlite-2.10.1@rev:0
...
...
This diff is collapsed.
Click to expand it.
snapshot.yaml
+
2
−
2
View file @
62c24fa0
...
...
@@ -13,13 +13,13 @@ packages:
-
hackage-security-0.5.3.0@rev:2
-
http-api-data-0.3.8.1@rev:1
-
cabal-doctest-1.0.6@rev:2
-
unliftio-0.2.
8.0@sha256:5a47f12ffcee837215c67b05abf35dffb792096564a6f81652d75a54668224cd,225
0
-
unliftio-0.2.
12@rev:0
#for rio-0.1.11.
0
-
happy-1.19.9@sha256:f8c774230735a390c287b2980cfcd2703d24d8dde85a01ea721b7b4b4c82944f,4667
-
fsnotify-0.3.0.1@rev:1
-
process-1.6.3.0@sha256:fc77cfe75a9653b8c54ae455ead8c06cb8adc4d7a340984d84d8ca880b579919,2370
#because of https://github.com/haskell/process/pull/101
-
persistent-2.9.2@rev:0
-
persistent-sqlite-2.9.3@rev:0
-
rio-0.1.1
0
.0@rev:0
-
rio-0.1.1
1
.0@rev:0
-
ansi-wl-pprint-0.6.8.2@rev:1
# for ansi-terminal-0.9
-
hedgehog-0.6.1@rev:4
# for ansi-terminal-0.9
-
typed-process-0.2.6.0@rev:0
# for rio-0.1.10.0
...
...
This diff is collapsed.
Click to expand it.
src/Stack/Prelude.hs
+
4
−
21
View file @
62c24fa0
...
...
@@ -25,7 +25,7 @@ module Stack.Prelude
)
where
import
RIO
as
X
import
RIO.File
as
X
import
RIO.File
as
X
hiding
(
writeBinaryFileAtomic
)
import
Data.Conduit
as
X
(
ConduitM
,
runConduit
,
(
.|
))
import
Path
as
X
(
Abs
,
Dir
,
File
,
Path
,
Rel
,
toFilePath
)
...
...
@@ -46,9 +46,6 @@ import Data.Text.Encoding.Error (lenientDecode)
import
qualified
Data.Text.IO
as
T
import
qualified
RIO.Text
as
T
import
System.Permissions
(
osIsWindows
)
import
Conduit
-- | Path version
withSystemTempDir
::
MonadUnliftIO
m
=>
String
->
(
Path
Abs
Dir
->
m
a
)
->
m
a
...
...
@@ -216,21 +213,7 @@ defaultFirstFalse :: (a -> FirstFalse) -> Bool
defaultFirstFalse
_
=
False
-- | Write a @Builder@ to a file and atomically rename.
--
-- In the future: replace with a function in rio
writeBinaryFileAtomic
::
MonadIO
m
=>
Path
absrel
File
->
Builder
->
m
()
writeBinaryFileAtomic
fp
builder
-- Atomic file writing is not supported on Windows yet, unfortunately.
-- withSinkFileCautious needs to be implemented properly for Windows to make
-- this work.
|
osIsWindows
=
liftIO
$
withBinaryFile
(
toFilePath
fp
)
WriteMode
$
\
h
->
hPutBuilder
h
builder
|
otherwise
=
liftIO
$
withSinkFileCautious
(
toFilePath
fp
)
$
\
sink
->
runConduit
$
yield
builder
.|
unsafeBuilderToByteString
.|
sink
writeBinaryFileAtomic
fp
builder
=
liftIO
$
withBinaryFileAtomic
(
toFilePath
fp
)
WriteMode
(
\
h
->
hPutBuilder
h
builder
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment