mirror of
https://github.com/anoma/juvix.git
synced 2024-12-15 18:13:56 +03:00
efb7f2abd0
Filepaths within a Loc must now be absolute or an error is thrown when mkLoc is called. This Loc is used when displaying errors. This commit uses imaginary absolute file paths in the Core repl and Asm commands in the cases (parsing a single expression for example). Before this fix, the `core {repl, read, eval}` and `asm` commands would crash if it encountered an error when invoked with a relative path, or in the case of a repl when parsing a single expression.
8 lines
174 B
Haskell
8 lines
174 B
Haskell
module Commands.Extra.Paths where
|
|
|
|
import Juvix.Prelude
|
|
|
|
-- | imaginary file path for error messages in the repl.
|
|
replPath :: Path Abs File
|
|
replPath = $(mkAbsFile "/<repl>")
|