Skip to content
Snippets Groups Projects
Commit c23144b3 authored by Jens Nolte's avatar Jens Nolte
Browse files

Support GHC 9.2.2


Co-authored-by: default avatarJan Beinke <git@janbeinke.com>
parent 82ebde4f
No related branches found
No related tags found
No related merge requests found
Pipeline #2853 passed
......@@ -2,16 +2,18 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1645334861,
"narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=",
"lastModified": 1649225869,
"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": {
......
{
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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment