You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dhall takes a file, parsers it, resolves imports, type checks, normalizes and then prints - along with a bunch of error checking. A lot of these steps would be useful to have in Dhall. I find myself often playing around in GHCI and wanting a way to take a FilePath and have a Expr s X that is type checked and normalized, but not extracted.
I propose adding
load :: FilePath -> IO (Expr s X)
and having dhall use this. The error checking that dhall does probably gets moved into a new Exception type, with a handler that knows how to print out specific errors.
The text was updated successfully, but these errors were encountered:
Change the argument to a Text value representing Dhall source code. Importing a file then becomes a special case of Dhall's import system, plus you can then load URLs or inline Dhall expressions
I recommend naming this rawOutput because there is a similar rawInput function in the Dhall module
dhall
takes a file, parsers it, resolves imports, type checks, normalizes and then prints - along with a bunch of error checking. A lot of these steps would be useful to have in Dhall. I find myself often playing around in GHCI and wanting a way to take aFilePath
and have aExpr s X
that is type checked and normalized, but not extracted.I propose adding
and having
dhall
use this. The error checking thatdhall
does probably gets moved into a newException
type, with a handler that knows how to print out specific errors.The text was updated successfully, but these errors were encountered: