@@ -17,7 +17,7 @@ import Data.Text.IO qualified as Text
17
17
import Data.Traversable (for )
18
18
import LambdaBuffers.Frontend.PPrint ()
19
19
import 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 )
21
21
import Prettyprinter (Doc , LayoutOptions (layoutPageWidth ), PageWidth (Unbounded ), Pretty (pretty ), defaultLayoutOptions , layoutPretty , (<+>) )
22
22
import Prettyprinter.Render.String (renderShowS )
23
23
import System.Directory (findFiles )
@@ -77,10 +77,10 @@ type FrontendT m a = MonadIO m => ReaderT FrontRead (StateT FrontState (ExceptT
77
77
-- | Run a Frontend compilation action on a "lbf" file, return the entire compilation closure or a frontend error.
78
78
runFrontend :: MonadIO m => [FilePath ] -> FilePath -> m (Either FrontendError FrontendResult )
79
79
runFrontend importPaths modFp = do
80
- let stM = runReaderT (processFile modFp) (FrontRead (ModuleName [] defaultSouceInfo) ) [] importPaths)
80
+ let stM = runReaderT (processFile modFp) (FrontRead (ModuleName [] defSourceInfo ) [] importPaths)
81
81
exM = runStateT stM (FrontState mempty )
82
82
ioM = runExceptT exM
83
- fmap (FrontendResult . importedModules . snd ) <$> runExceptT exM
83
+ fmap (FrontendResult . importedModules . snd ) <$> ioM
84
84
85
85
throwE' :: FrontendError -> FrontendT m a
86
86
throwE' = lift . lift . throwE
0 commit comments