diff options
author | Nadrieril Feneanar | 2020-03-05 16:20:07 +0000 |
---|---|---|
committer | GitHub | 2020-03-05 16:20:07 +0000 |
commit | 3f9194f47185fe30c9e410aa7c5e651df9694b3f (patch) | |
tree | 6d24b2e824822134da4976b65b413dc09ca4e567 /dhall/src/lib.rs | |
parent | 2ca97e97f1718141d826a78ab3da8197b2d55c69 (diff) | |
parent | 8e6b020ba1426c215382a81395b809b688fa7726 (diff) |
Merge pull request #139 from Nadrieril/missing-features
Implement a bunch of missing features
Diffstat (limited to '')
-rw-r--r-- | dhall/src/lib.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dhall/src/lib.rs b/dhall/src/lib.rs index 34d7bc3..d68ad6b 100644 --- a/dhall/src/lib.rs +++ b/dhall/src/lib.rs @@ -17,11 +17,12 @@ pub mod syntax; use std::fmt::Display; use std::path::Path; +use url::Url; use crate::error::{EncodeError, Error, TypeError}; use crate::semantics::parse; use crate::semantics::resolve; -use crate::semantics::resolve::ImportRoot; +use crate::semantics::resolve::ImportLocation; use crate::semantics::{ typecheck, typecheck_with, Hir, Nir, NirKind, Tir, Type, }; @@ -34,7 +35,7 @@ pub type ResolvedExpr = Expr; pub type NormalizedExpr = Expr; #[derive(Debug, Clone)] -pub struct Parsed(ParsedExpr, ImportRoot); +pub struct Parsed(ParsedExpr, ImportLocation); /// An expression where all imports have been resolved /// @@ -66,6 +67,9 @@ impl Parsed { pub fn parse_file(f: &Path) -> Result<Parsed, Error> { parse::parse_file(f) } + pub fn parse_remote(url: Url) -> Result<Parsed, Error> { + parse::parse_remote(url) + } pub fn parse_str(s: &str) -> Result<Parsed, Error> { parse::parse_str(s) } |