Skip to content

Commit

Permalink
Nicer error printing
Browse files Browse the repository at this point in the history
  • Loading branch information
glguy committed Dec 18, 2024
1 parent 67a4d29 commit 233168c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/Cryptol/ModuleSystem/Base.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import qualified Data.List.NonEmpty as NE
import Data.List.NonEmpty (NonEmpty(..))
import Data.Function(on)
import Data.Monoid ((<>),Endo(..), Any(..))
import qualified Data.Text as T
import Data.Text.Encoding (decodeUtf8')
import System.Directory (doesFileExist, canonicalizePath)
import System.FilePath ( addExtension
Expand Down Expand Up @@ -134,7 +133,7 @@ renameImpNameInCurrentEnv (P.ImpNested pname) =
fail ("Undefined submodule name: " ++ show (pp pname))
_:_:_ -> do
fail ("Ambiguous submodule name: " ++ show (pp pname))
[name] -> pure (P.ImpNested name)
[n] -> pure (P.ImpNested n)

-- NoPat -----------------------------------------------------------------------

Expand Down
3 changes: 2 additions & 1 deletion src/Cryptol/REPL/Command.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2259,7 +2259,8 @@ loadProjectREPL cfg =
M.InFile path ->
case v of
Proj.Invalid e ->
do rPrint ("Failed to process module: " <> text path <> ":" $$ ppInvalidStatus e)
do rPrint ("Failed to process module:" <+> (text path <> ":") $$
indent 2 (ppInvalidStatus e))
pure (fpAcc, False) -- report failure
Proj.Scanned Proj.Unchanged _ ((m,_):_) ->
do let name = P.thing (P.mName m)
Expand Down

0 comments on commit 233168c

Please sign in to comment.