Skip to content

Commit

Permalink
clean Repl
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira committed Aug 13, 2024
1 parent e9d0dd5 commit 309d15f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions app/Commands/Repl.hs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ loadFile :: Prepath File -> Repl ()
loadFile f = do
entryPoint <- getReplEntryPointFromPrepath f
loadEntryPoint entryPoint
t <- getScopedInfoTable
putStrLn ("Loaded File: " <> Concrete.ppTrace (t ^. Scoped.infoBuiltins))

loadDefaultPrelude :: Repl ()
loadDefaultPrelude =
Expand All @@ -151,9 +149,6 @@ getReplEntryPointFromPath = getReplEntryPoint (\r a -> runM . runTaggedLockPermi
displayVersion :: String -> Repl ()
displayVersion _ = liftIO (putStrLn versionTag)

getArtifacts :: Repl Artifacts
getArtifacts = (^. replContextArtifacts) <$> replGetContext

replCommand :: ReplOptions -> String -> Repl ()
replCommand opts input_ = catchAll $ do
ctx <- replGetContext
Expand All @@ -167,9 +162,7 @@ replCommand opts input_ = catchAll $ do
| otherwise -> renderOutLn (Core.ppOut opts n)
where
compileThenEval :: ReplContext -> String -> Repl (Maybe Core.Node)
compileThenEval ctx s = do
putStrLn (Concrete.ppTrace (artif ^. artifactScopeTable . Scoped.infoBuiltins))
compileString >>= mapM eval
compileThenEval ctx s = compileString >>= mapM eval
where
artif :: Artifacts
artif = ctx ^. replContextArtifacts
Expand Down

0 comments on commit 309d15f

Please sign in to comment.