mirror of
https://github.com/anoma/juvix.git
synced 2025-01-07 16:22:14 +03:00
Remove redundant embed @IO
(#2637)
Since we upgraded to ghc-9.8.1 and dropped the dependency on [with-utf8](https://hackage.haskell.org/package/with-utf8), the function `writeFileEnsureLn` no longer has the constraint `MonadMask m`, so the `embed @IO` has become redundant
This commit is contained in:
parent
d09f15226e
commit
c8da68d3db
@ -38,4 +38,4 @@ writeCoreFile pa@Compile.PipelineArg {..} = do
|
|||||||
Left e -> exitJuvixError e
|
Left e -> exitJuvixError e
|
||||||
Right md -> do
|
Right md -> do
|
||||||
let txt = show (Core.ppOutDefault (Core.disambiguateNames md ^. Core.moduleInfoTable))
|
let txt = show (Core.ppOutDefault (Core.disambiguateNames md ^. Core.moduleInfoTable))
|
||||||
embed @IO $ writeFileEnsureLn coreFile txt
|
writeFileEnsureLn coreFile txt
|
||||||
|
@ -58,7 +58,7 @@ runCPipeline pa@PipelineArg {..} = do
|
|||||||
entryPoint <- getEntry pa
|
entryPoint <- getEntry pa
|
||||||
C.MiniCResult {..} <- getRight (run (runReader entryPoint (runError (coreToMiniC _pipelineArgModule :: Sem '[Error JuvixError, Reader EntryPoint] C.MiniCResult))))
|
C.MiniCResult {..} <- getRight (run (runReader entryPoint (runError (coreToMiniC _pipelineArgModule :: Sem '[Error JuvixError, Reader EntryPoint] C.MiniCResult))))
|
||||||
cFile <- inputCFile _pipelineArgFile
|
cFile <- inputCFile _pipelineArgFile
|
||||||
embed @IO $ writeFileEnsureLn cFile _resultCCode
|
writeFileEnsureLn cFile _resultCCode
|
||||||
outfile <- Compile.outputFile _pipelineArgOptions _pipelineArgFile
|
outfile <- Compile.outputFile _pipelineArgOptions _pipelineArgFile
|
||||||
Compile.runCommand
|
Compile.runCommand
|
||||||
_pipelineArgOptions
|
_pipelineArgOptions
|
||||||
@ -100,7 +100,7 @@ runVampIRPipeline pa@PipelineArg {..} = do
|
|||||||
entryPoint <- getEntry pa
|
entryPoint <- getEntry pa
|
||||||
vampirFile <- Compile.outputFile _pipelineArgOptions _pipelineArgFile
|
vampirFile <- Compile.outputFile _pipelineArgOptions _pipelineArgFile
|
||||||
VampIR.Result {..} <- getRight (run (runReader entryPoint (runError (coreToVampIR _pipelineArgModule :: Sem '[Error JuvixError, Reader EntryPoint] VampIR.Result))))
|
VampIR.Result {..} <- getRight (run (runReader entryPoint (runError (coreToVampIR _pipelineArgModule :: Sem '[Error JuvixError, Reader EntryPoint] VampIR.Result))))
|
||||||
embed @IO $ writeFileEnsureLn vampirFile _resultCode
|
writeFileEnsureLn vampirFile _resultCode
|
||||||
|
|
||||||
runAsmPipeline :: (Members '[Embed IO, App, TaggedLock] r) => PipelineArg -> Sem r ()
|
runAsmPipeline :: (Members '[Embed IO, App, TaggedLock] r) => PipelineArg -> Sem r ()
|
||||||
runAsmPipeline pa@PipelineArg {..} = do
|
runAsmPipeline pa@PipelineArg {..} = do
|
||||||
@ -113,7 +113,7 @@ runAsmPipeline pa@PipelineArg {..} = do
|
|||||||
$ _pipelineArgModule
|
$ _pipelineArgModule
|
||||||
tab' <- getRight r
|
tab' <- getRight r
|
||||||
let code = Asm.ppPrint tab' tab'
|
let code = Asm.ppPrint tab' tab'
|
||||||
embed @IO $ writeFileEnsureLn asmFile code
|
writeFileEnsureLn asmFile code
|
||||||
|
|
||||||
runRegPipeline :: (Members '[Embed IO, App, TaggedLock] r) => PipelineArg -> Sem r ()
|
runRegPipeline :: (Members '[Embed IO, App, TaggedLock] r) => PipelineArg -> Sem r ()
|
||||||
runRegPipeline pa@PipelineArg {..} = do
|
runRegPipeline pa@PipelineArg {..} = do
|
||||||
@ -126,7 +126,7 @@ runRegPipeline pa@PipelineArg {..} = do
|
|||||||
$ _pipelineArgModule
|
$ _pipelineArgModule
|
||||||
tab' <- getRight r
|
tab' <- getRight r
|
||||||
let code = Reg.ppPrint tab' tab'
|
let code = Reg.ppPrint tab' tab'
|
||||||
embed @IO $ writeFileEnsureLn regFile code
|
writeFileEnsureLn regFile code
|
||||||
|
|
||||||
runTreePipeline :: (Members '[Embed IO, App, TaggedLock] r) => PipelineArg -> Sem r ()
|
runTreePipeline :: (Members '[Embed IO, App, TaggedLock] r) => PipelineArg -> Sem r ()
|
||||||
runTreePipeline pa@PipelineArg {..} = do
|
runTreePipeline pa@PipelineArg {..} = do
|
||||||
@ -139,7 +139,7 @@ runTreePipeline pa@PipelineArg {..} = do
|
|||||||
$ _pipelineArgModule
|
$ _pipelineArgModule
|
||||||
tab' <- getRight r
|
tab' <- getRight r
|
||||||
let code = Tree.ppPrint tab' tab'
|
let code = Tree.ppPrint tab' tab'
|
||||||
embed @IO $ writeFileEnsureLn treeFile code
|
writeFileEnsureLn treeFile code
|
||||||
|
|
||||||
runNockmaPipeline :: (Members '[Embed IO, App, TaggedLock] r) => PipelineArg -> Sem r ()
|
runNockmaPipeline :: (Members '[Embed IO, App, TaggedLock] r) => PipelineArg -> Sem r ()
|
||||||
runNockmaPipeline pa@PipelineArg {..} = do
|
runNockmaPipeline pa@PipelineArg {..} = do
|
||||||
@ -152,4 +152,4 @@ runNockmaPipeline pa@PipelineArg {..} = do
|
|||||||
$ _pipelineArgModule
|
$ _pipelineArgModule
|
||||||
tab' <- getRight r
|
tab' <- getRight r
|
||||||
let code = Nockma.ppSerialize tab'
|
let code = Nockma.ppSerialize tab'
|
||||||
embed @IO $ writeFileEnsureLn nockmaFile code
|
writeFileEnsureLn nockmaFile code
|
||||||
|
@ -84,7 +84,7 @@ runAsmPipeline pa@PipelineArg {..} = do
|
|||||||
$ _pipelineArgTable
|
$ _pipelineArgTable
|
||||||
tab' <- getRight r
|
tab' <- getRight r
|
||||||
let code = Asm.ppPrint tab' tab'
|
let code = Asm.ppPrint tab' tab'
|
||||||
embed @IO $ writeFileEnsureLn asmFile code
|
writeFileEnsureLn asmFile code
|
||||||
|
|
||||||
runRegPipeline :: (Members '[Embed IO, App, TaggedLock] r) => PipelineArg -> Sem r ()
|
runRegPipeline :: (Members '[Embed IO, App, TaggedLock] r) => PipelineArg -> Sem r ()
|
||||||
runRegPipeline pa@PipelineArg {..} = do
|
runRegPipeline pa@PipelineArg {..} = do
|
||||||
@ -97,7 +97,7 @@ runRegPipeline pa@PipelineArg {..} = do
|
|||||||
$ _pipelineArgTable
|
$ _pipelineArgTable
|
||||||
tab' <- getRight r
|
tab' <- getRight r
|
||||||
let code = Reg.ppPrint tab' tab'
|
let code = Reg.ppPrint tab' tab'
|
||||||
embed @IO $ writeFileEnsureLn regFile code
|
writeFileEnsureLn regFile code
|
||||||
|
|
||||||
runNockmaPipeline :: (Members '[Embed IO, App, TaggedLock] r) => PipelineArg -> Sem r ()
|
runNockmaPipeline :: (Members '[Embed IO, App, TaggedLock] r) => PipelineArg -> Sem r ()
|
||||||
runNockmaPipeline pa@PipelineArg {..} = do
|
runNockmaPipeline pa@PipelineArg {..} = do
|
||||||
@ -110,4 +110,4 @@ runNockmaPipeline pa@PipelineArg {..} = do
|
|||||||
$ _pipelineArgTable
|
$ _pipelineArgTable
|
||||||
tab' <- getRight r
|
tab' <- getRight r
|
||||||
let code = Nockma.ppSerialize tab'
|
let code = Nockma.ppSerialize tab'
|
||||||
embed @IO $ writeFileEnsureLn nockmaFile code
|
writeFileEnsureLn nockmaFile code
|
||||||
|
Loading…
Reference in New Issue
Block a user