From 8da784ae24406d4328e111b3db13f64dc943f738 Mon Sep 17 00:00:00 2001 From: Joshua Grosso Date: Fri, 22 Jul 2022 23:56:42 -0700 Subject: [PATCH] Fix linter errors --- src/Axel/Eff/Process.hs | 2 +- src/Axel/Eff/Random.hs | 2 +- src/Axel/Haskell/Project.hs | 10 +++------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/Axel/Eff/Process.hs b/src/Axel/Eff/Process.hs index 90fb5da..1a055a4 100644 --- a/src/Axel/Eff/Process.hs +++ b/src/Axel/Eff/Process.hs @@ -42,7 +42,7 @@ runProcess = , P.std_out = P.CreatePipe , P.std_err = P.CreatePipe } - -- The handles will always be created because of `CreatePipe`, so we can safely unwrap them. + -- The handles will always be created because of `CreatePipe`, so we can safely unwrap them. (Just stdinHandle, Just stdoutHandle, Just stderrHandle, processHandle) <- P.createProcess config pure (stdinHandle, stdoutHandle, stderrHandle, processHandle) diff --git a/src/Axel/Eff/Random.hs b/src/Axel/Eff/Random.hs index fd4050b..b878d83 100644 --- a/src/Axel/Eff/Random.hs +++ b/src/Axel/Eff/Random.hs @@ -19,4 +19,4 @@ runRandom :: (IOE :> effs) => Eff (Random ': effs) a -> Eff effs a runRandom = interpret $ \_ -> \case - Random -> liftIO $ R.randomIO + Random -> liftIO R.randomIO diff --git a/src/Axel/Haskell/Project.hs b/src/Axel/Haskell/Project.hs index 2e5ce70..ebdca09 100644 --- a/src/Axel/Haskell/Project.hs +++ b/src/Axel/Haskell/Project.hs @@ -50,7 +50,7 @@ import qualified Effectful.State.Static.Local as Eff type ProjectPath = FilePath newProject :: - '[ Effs.FileSystem, Effs.Process, Effs.Resource] :>> effs + ('[ Effs.FileSystem, Effs.Process, Effs.Resource] :>> effs) => Text -> Eff.Eff effs () newProject projectName = do @@ -76,9 +76,7 @@ data ProjectFileType | Backend getProjectFiles :: - (Effs.FileSystem :> effs) - => ProjectFileType - -> Eff.Eff effs [FilePath] + (Effs.FileSystem :> effs) => ProjectFileType -> Eff.Eff effs [FilePath] getProjectFiles fileType = do files <- concatMapM @@ -97,9 +95,7 @@ transpileProject = Ghci.withGhci $ do axelFiles <- getProjectFiles Axel initialModuleInfo <- readModuleInfo axelFiles - moduleInfo <- - Eff.execState initialModuleInfo $ mapM transpileFileInPlace axelFiles - pure moduleInfo + Eff.execState initialModuleInfo $ mapM transpileFileInPlace axelFiles buildProject :: ('[ Effs.Console, Eff.Error Error, Effs.FileSystem, Effs.Ghci, Effs.Log, Effs.Process, Effs.Resource] :>> effs)