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 @@ ...@@ -2,16 +2,18 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1645334861, "lastModified": 1649225869,
"narHash": "sha256-We9ECiMglthzbZ5S6Myqqf+RHzBFZPoM2qL5/jDkUjs=", "narHash": "sha256-u1zLtPmQzhT9mNXyM8Ey9pk7orDrIKdwooeGDEXm5xM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d5f237872975e6fb6f76eef1368b5634ffcd266f", "rev": "b6966d911da89e5a7301aaef8b4f0a44c77e103c",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "owner": "NixOS",
"type": "indirect" "ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
} }
}, },
"root": { "root": {
......
{ {
inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
};
outputs = { self, nixpkgs }: outputs = { self, nixpkgs }:
with nixpkgs.lib; with nixpkgs.lib;
let let
...@@ -7,7 +11,11 @@ ...@@ -7,7 +11,11 @@
in { in {
packages = forAllSystems (system: packages = forAllSystems (system:
let pkgs = import nixpkgs { inherit system; overlays = [ self.overlay ]; }; 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: { overlay = final: prev: {
...@@ -21,13 +29,11 @@ ...@@ -21,13 +29,11 @@
}; };
}; };
defaultPackage = forAllSystems (system: self.packages.${system}.quasar);
devShell = forAllSystems (system: devShell = forAllSystems (system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
in pkgs.mkShell { in pkgs.mkShell {
inputsFrom = pkgs.lib.mapAttrsToList (k: v: v.env or v) self.packages.${system}; inputsFrom = [ self.packages.${system}.default.env ];
packages = [ packages = [
pkgs.cabal-install pkgs.cabal-install
pkgs.zsh pkgs.zsh
......
...@@ -55,6 +55,7 @@ common shared-properties ...@@ -55,6 +55,7 @@ common shared-properties
-Weverything -Weverything
-Wno-all-missed-specialisations -Wno-all-missed-specialisations
-Wno-missing-safe-haskell-mode -Wno-missing-safe-haskell-mode
-Wno-missing-kind-signatures
-Wno-missing-import-lists -Wno-missing-import-lists
-Wno-unsafe -Wno-unsafe
-Werror=incomplete-patterns -Werror=incomplete-patterns
......
...@@ -44,10 +44,10 @@ instance IsFuture a (Async a) where ...@@ -44,10 +44,10 @@ instance IsFuture a (Async a) where
async :: (MonadQuasar m, MonadIO m) => QuasarIO a -> m (Async a) 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_ :: (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 :: (MonadQuasar m, MonadIO m) => ((forall b. QuasarIO b -> QuasarIO b) -> QuasarIO a) -> m (Async a)
asyncWithUnmask fn = do asyncWithUnmask fn = do
...@@ -64,7 +64,7 @@ asyncWithUnmask_ fn = void $ asyncWithUnmask fn ...@@ -64,7 +64,7 @@ asyncWithUnmask_ fn = void $ asyncWithUnmask fn
async' :: (MonadQuasar m, MonadIO m) => IO a -> m (Async a) 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' :: forall a m. (MonadQuasar m, MonadIO m) => ((forall b. IO b -> IO b) -> IO a) -> m (Async a)
asyncWithUnmask' fn = liftQuasarIO do asyncWithUnmask' fn = liftQuasarIO do
...@@ -74,7 +74,7 @@ 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 :: 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 :: 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 unmanagedAsyncWithUnmask worker exSink fn = liftIO $ spawnAsync (\_ -> pure ()) worker exSink fn
......
...@@ -56,7 +56,7 @@ forkAsyncWithUnmaskSTM fn worker exChan = join <$> startShortIOSTM (unsafeShortI ...@@ -56,7 +56,7 @@ forkAsyncWithUnmaskSTM fn worker exChan = join <$> startShortIOSTM (unsafeShortI
-- * Fork in IO, redirecting errors to an ExceptionSink -- * Fork in IO, redirecting errors to an ExceptionSink
fork :: IO () -> ExceptionSink -> IO ThreadId fork :: IO () -> ExceptionSink -> IO ThreadId
fork fn exSink = forkWithUnmask ($ fn) exSink fork fn exSink = forkWithUnmask (\unmask -> unmask fn) exSink
fork_ :: IO () -> ExceptionSink -> IO () fork_ :: IO () -> ExceptionSink -> IO ()
fork_ fn exSink = void $ fork fn exSink fork_ fn exSink = void $ fork fn exSink
...@@ -74,7 +74,7 @@ forkWithUnmask_ fn exChan = void $ forkWithUnmask fn exChan ...@@ -74,7 +74,7 @@ forkWithUnmask_ fn exChan = void $ forkWithUnmask fn exChan
-- * Fork in IO while collecting the result, redirecting errors to an ExceptionSink -- * Fork in IO while collecting the result, redirecting errors to an ExceptionSink
forkFuture :: forall a. IO a -> ExceptionSink -> IO (Future a) 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 :: forall a. ((forall b. IO b -> IO b) -> IO a) -> ExceptionSink -> IO (Future a)
forkFutureWithUnmask fn exChan = do 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