Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quasar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
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
Jens Nolte
quasar
Commits
c23144b3
Commit
c23144b3
authored
2 years ago
by
Jens Nolte
Browse files
Options
Downloads
Patches
Plain Diff
Support GHC 9.2.2
Co-authored-by:
Jan Beinke
<
git@janbeinke.com
>
parent
82ebde4f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#2853
passed
2 years ago
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
flake.lock
+7
-5
7 additions, 5 deletions
flake.lock
flake.nix
+10
-4
10 additions, 4 deletions
flake.nix
quasar.cabal
+1
-0
1 addition, 0 deletions
quasar.cabal
src/Quasar/Async.hs
+4
-4
4 additions, 4 deletions
src/Quasar/Async.hs
src/Quasar/Async/Fork.hs
+2
-2
2 additions, 2 deletions
src/Quasar/Async/Fork.hs
with
24 additions
and
15 deletions
flake.lock
+
7
−
5
View file @
c23144b3
...
...
@@ -2,16 +2,18 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 164
5334
86
1
,
"narHash": "sha256-
We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs
=",
"lastModified": 164
9225
86
9
,
"narHash": "sha256-
u1zLtPmQzhT9mNXyM8Ey9pk7orDrIKdwooeGDEXm5xM
=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "
d5f237872975e6fb6f76eef1368b5634ffcd266f
",
"rev": "
b6966d911da89e5a7301aaef8b4f0a44c77e103c
",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
...
...
This diff is collapsed.
Click to expand it.
flake.nix
+
10
−
4
View file @
c23144b3
{
inputs
=
{
nixpkgs
.
url
=
github
:
NixOS/nixpkgs/nixos-unstable
;
};
outputs
=
{
self
,
nixpkgs
}:
with
nixpkgs
.
lib
;
let
...
...
@@ -7,7 +11,11 @@
in
{
packages
=
forAllSystems
(
system
:
let
pkgs
=
import
nixpkgs
{
inherit
system
;
overlays
=
[
self
.
overlay
];
};
in
{
quasar
=
pkgs
.
haskellPackages
.
quasar
;
}
in
rec
{
default
=
ghc922
.
quasar
;
quasar
=
pkgs
.
haskellPackages
.
quasar
;
ghc922
.
quasar
=
pkgs
.
haskell
.
packages
.
ghc922
.
quasar
;
}
);
overlay
=
final
:
prev
:
{
...
...
@@ -21,13 +29,11 @@
};
};
defaultPackage
=
forAllSystems
(
system
:
self
.
packages
.
${
system
}
.
quasar
);
devShell
=
forAllSystems
(
system
:
let
pkgs
=
nixpkgs
.
legacyPackages
.
${
system
};
in
pkgs
.
mkShell
{
inputsFrom
=
pkgs
.
lib
.
mapAttrsToList
(
k
:
v
:
v
.
env
or
v
)
self
.
packages
.
${
system
};
inputsFrom
=
[
self
.
packages
.
${
system
}
.
default
.
env
]
;
packages
=
[
pkgs
.
cabal-install
pkgs
.
zsh
...
...
This diff is collapsed.
Click to expand it.
quasar.cabal
+
1
−
0
View file @
c23144b3
...
...
@@ -55,6 +55,7 @@ common shared-properties
-Weverything
-Wno-all-missed-specialisations
-Wno-missing-safe-haskell-mode
-Wno-missing-kind-signatures
-Wno-missing-import-lists
-Wno-unsafe
-Werror=incomplete-patterns
...
...
This diff is collapsed.
Click to expand it.
src/Quasar/Async.hs
+
4
−
4
View file @
c23144b3
...
...
@@ -44,10 +44,10 @@ instance IsFuture a (Async a) where
async
::
(
MonadQuasar
m
,
MonadIO
m
)
=>
QuasarIO
a
->
m
(
Async
a
)
async
fn
=
asyncWithUnmask
(
$
fn
)
async
fn
=
asyncWithUnmask
(
\
unmask
->
unmask
fn
)
async_
::
(
MonadQuasar
m
,
MonadIO
m
)
=>
QuasarIO
()
->
m
()
async_
fn
=
void
$
asyncWithUnmask
(
$
fn
)
async_
fn
=
void
$
asyncWithUnmask
(
\
unmask
->
unmask
fn
)
asyncWithUnmask
::
(
MonadQuasar
m
,
MonadIO
m
)
=>
((
forall
b
.
QuasarIO
b
->
QuasarIO
b
)
->
QuasarIO
a
)
->
m
(
Async
a
)
asyncWithUnmask
fn
=
do
...
...
@@ -64,7 +64,7 @@ asyncWithUnmask_ fn = void $ asyncWithUnmask fn
async'
::
(
MonadQuasar
m
,
MonadIO
m
)
=>
IO
a
->
m
(
Async
a
)
async'
fn
=
asyncWithUnmask'
(
$
fn
)
async'
fn
=
asyncWithUnmask'
(
\
unmask
->
unmask
fn
)
asyncWithUnmask'
::
forall
a
m
.
(
MonadQuasar
m
,
MonadIO
m
)
=>
((
forall
b
.
IO
b
->
IO
b
)
->
IO
a
)
->
m
(
Async
a
)
asyncWithUnmask'
fn
=
liftQuasarIO
do
...
...
@@ -74,7 +74,7 @@ asyncWithUnmask' fn = liftQuasarIO do
unmanagedAsync
::
forall
a
m
.
MonadIO
m
=>
TIOWorker
->
ExceptionSink
->
IO
a
->
m
(
Async
a
)
unmanagedAsync
worker
exSink
fn
=
liftIO
$
unmanagedAsyncWithUnmask
worker
exSink
(
$
fn
)
unmanagedAsync
worker
exSink
fn
=
liftIO
$
unmanagedAsyncWithUnmask
worker
exSink
(
\
unmask
->
unmask
fn
)
unmanagedAsyncWithUnmask
::
forall
a
m
.
MonadIO
m
=>
TIOWorker
->
ExceptionSink
->
((
forall
b
.
IO
b
->
IO
b
)
->
IO
a
)
->
m
(
Async
a
)
unmanagedAsyncWithUnmask
worker
exSink
fn
=
liftIO
$
spawnAsync
(
\
_
->
pure
()
)
worker
exSink
fn
...
...
This diff is collapsed.
Click to expand it.
src/Quasar/Async/Fork.hs
+
2
−
2
View file @
c23144b3
...
...
@@ -56,7 +56,7 @@ forkAsyncWithUnmaskSTM fn worker exChan = join <$> startShortIOSTM (unsafeShortI
-- * Fork in IO, redirecting errors to an ExceptionSink
fork
::
IO
()
->
ExceptionSink
->
IO
ThreadId
fork
fn
exSink
=
forkWithUnmask
(
$
fn
)
exSink
fork
fn
exSink
=
forkWithUnmask
(
\
unmask
->
unmask
fn
)
exSink
fork_
::
IO
()
->
ExceptionSink
->
IO
()
fork_
fn
exSink
=
void
$
fork
fn
exSink
...
...
@@ -74,7 +74,7 @@ forkWithUnmask_ fn exChan = void $ forkWithUnmask fn exChan
-- * Fork in IO while collecting the result, redirecting errors to an ExceptionSink
forkFuture
::
forall
a
.
IO
a
->
ExceptionSink
->
IO
(
Future
a
)
forkFuture
fn
=
forkFutureWithUnmask
(
$
fn
)
forkFuture
fn
=
forkFutureWithUnmask
(
\
unmask
->
unmask
fn
)
forkFutureWithUnmask
::
forall
a
.
((
forall
b
.
IO
b
->
IO
b
)
->
IO
a
)
->
ExceptionSink
->
IO
(
Future
a
)
forkFutureWithUnmask
fn
exChan
=
do
...
...
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