@@ -17,7 +17,7 @@ import Data.Text.IO qualified as Text
1717import Data.Traversable (for )
1818import LambdaBuffers.Frontend.PPrint ()
1919import LambdaBuffers.Frontend.Parsec qualified as Parsec
20- import LambdaBuffers.Frontend.Syntax (Constructor (Constructor ), Import (Import , importInfo , importModuleName ), Module (moduleImports , moduleName , moduleTyDefs ), ModuleAlias (ModuleAlias ), ModuleName (ModuleName ), ModuleNamePart (ModuleNamePart ), Product (Product ), SourceInfo ( SourceInfo ), SourcePos ( SourcePos ), Ty (TyApp , TyRef' , TyVar ), TyBody (Opaque , Sum ), TyDef (TyDef , tyBody , tyDefInfo , tyName ), TyName (TyName ), TyRef (TyRef ))
20+ import LambdaBuffers.Frontend.Syntax (Constructor (Constructor ), Import (Import , importInfo , importModuleName ), Module (moduleImports , moduleName , moduleTyDefs ), ModuleAlias (ModuleAlias ), ModuleName (ModuleName ), ModuleNamePart (ModuleNamePart ), Product (Product ), SourceInfo , Ty (TyApp , TyRef' , TyVar ), TyBody (Opaque , Sum ), TyDef (TyDef , tyBody , tyDefInfo , tyName ), TyName (TyName ), TyRef (TyRef ), defSourceInfo )
2121import Prettyprinter (Doc , LayoutOptions (layoutPageWidth ), PageWidth (Unbounded ), Pretty (pretty ), defaultLayoutOptions , layoutPretty , (<+>) )
2222import Prettyprinter.Render.String (renderShowS )
2323import System.Directory (findFiles )
@@ -77,10 +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.
7878runFrontend :: MonadIO m => [FilePath ] -> FilePath -> m (Either FrontendError FrontendResult )
7979runFrontend importPaths modFp = do
80- let stM = runReaderT (processFile modFp) (FrontRead (ModuleName [] defaultSouceInfo) ) [] importPaths)
80+ let stM = runReaderT (processFile modFp) (FrontRead (ModuleName [] defSourceInfo ) [] importPaths)
8181 exM = runStateT stM (FrontState mempty )
8282 ioM = runExceptT exM
83- fmap (FrontendResult . importedModules . snd ) <$> runExceptT exM
83+ fmap (FrontendResult . importedModules . snd ) <$> ioM
8484
8585throwE' :: FrontendError -> FrontendT m a
8686throwE' = lift . lift . throwE
0 commit comments