Skip to content

Commit 8c8ea2a

Browse files
Gabriella439sjakobi
authored andcommitted
Change dhall type to resolve imports (#1281)
* Change `dhall type` to resolve imports Fixes #1277 The original motivation was that `dhall type` would represent a type-inference-only phase. However, in practice that wasn't very useful so `dhall type` now performs import resolution followed by type inference. * Fix loading relative to root directory ... as caught by @sjakobi Co-Authored-By: Simon Jakobi <[email protected]>
1 parent cdbeb61 commit 8c8ea2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dhall/src/Dhall/Main.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ command (Options {..}) = do
460460
Type {..} -> do
461461
expression <- getExpression file
462462

463-
resolvedExpression <- Dhall.Import.assertNoImports expression
463+
resolvedExpression <- Dhall.Import.loadRelativeTo (rootDirectory file) expression
464464

465465
inferredType <- Dhall.Core.throws (Dhall.TypeCheck.typeOf resolvedExpression)
466466

0 commit comments

Comments
 (0)