diff options
Diffstat (limited to 'src/Language/Fiddle/Compiler/ImportResolution.hs')
-rw-r--r-- | src/Language/Fiddle/Compiler/ImportResolution.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Language/Fiddle/Compiler/ImportResolution.hs b/src/Language/Fiddle/Compiler/ImportResolution.hs index f3ddee0..6ecfc86 100644 --- a/src/Language/Fiddle/Compiler/ImportResolution.hs +++ b/src/Language/Fiddle/Compiler/ImportResolution.hs @@ -12,6 +12,7 @@ import qualified Codec.Compression.GZip as GZip import Control.Arrow (Arrow (second)) import Control.Monad (filterM, when) import Control.Monad.Identity (Identity) +import Control.Monad.State (put) import Control.Monad.Trans.Maybe (MaybeT (MaybeT, runMaybeT)) import Control.Monad.Writer.Lazy (MonadTrans (lift), MonadWriter (tell), WriterT (..), execWriterT) import Data.Aeson (eitherDecode, encode) @@ -31,7 +32,6 @@ import Options.Applicative import System.Directory import System.FilePath import Text.Printf (printf) -import Control.Monad.State (put) newtype Flags = Flags { importDirectories :: [FilePath] @@ -168,8 +168,8 @@ getImportResolutionState parseFile compileToChecked flags unit = do $ execWriterT $ walk doWalk unit () where - doWalk :: forall t'. (Walk t', Typeable t') => t' Identity Annot -> () -> WriterT ([Diagnostic], ResolvedImports) IO () - doWalk u () = + doWalk :: forall t'. (Walk t', Typeable t') => t' Identity Annot -> () -> WriterT ([Diagnostic], ResolvedImports) IO (WalkContinuation ()) + doWalk u () = do case () of () | Just @@ -184,6 +184,7 @@ getImportResolutionState parseFile compileToChecked flags unit = do ResolvedImports $ Map.singleton path (diagnostics, unitInterface) ) _ -> return () + return $ Continue () castTS :: ( Typeable t', |