Skip to content

Commit 7c3aee3

Browse files
bladyjokercstml
andauthored
Apply suggestions from code review
Co-authored-by: Vlad <[email protected]>
1 parent 030b423 commit 7c3aee3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lambda-buffers-frontend/resources/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/sh
12
function lbf {
23
cabal run lbf -- $@
34
}

lambda-buffers-frontend/src/LambdaBuffers/Frontend.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,10 @@ type FrontendT m a = MonadIO m => ReaderT FrontRead (StateT FrontState (ExceptT
7777
-- | Run a Frontend compilation action on a "lbf" file, return the entire compilation closure or a frontend error.
7878
runFrontend :: MonadIO m => [FilePath] -> FilePath -> m (Either FrontendError FrontendResult)
7979
runFrontend importPaths modFp = do
80-
let stM = runReaderT (processFile modFp) (FrontRead (ModuleName [] (SourceInfo "" (SourcePos 0 0) (SourcePos 0 0))) [] importPaths)
80+
let stM = runReaderT (processFile modFp) (FrontRead (ModuleName [] defaultSouceInfo)) [] importPaths)
8181
exM = runStateT stM (FrontState mempty)
8282
ioM = runExceptT exM
83-
_ <- ioM
84-
fmap (FrontendResult . importedModules . snd) <$> ioM
83+
fmap (FrontendResult . importedModules . snd) <$> runExceptT exM
8584

8685
throwE' :: FrontendError -> FrontendT m a
8786
throwE' = lift . lift . throwE

0 commit comments

Comments
 (0)