diff options
author | Nadrieril Feneanar | 2019-10-12 19:22:14 +0100 |
---|---|---|
committer | GitHub | 2019-10-12 19:22:14 +0100 |
commit | 8a8eeeac3b4f7761fd0916ee69d182597090039d (patch) | |
tree | 5613752829163cbdbcdb9ecec3b6889cfe827425 /dhall_syntax/src/core | |
parent | d022cd7e807104ffed60a76058c4ccd478ac187a (diff) | |
parent | 88eadcfe795181a3fda138e92d7f787793248e5f (diff) |
Merge pull request #99 from FintanH/fintan/canonicalize
Introduce Canonicalize
Diffstat (limited to 'dhall_syntax/src/core')
-rw-r--r-- | dhall_syntax/src/core/import.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/dhall_syntax/src/core/import.rs b/dhall_syntax/src/core/import.rs index 43597df..da3e99b 100644 --- a/dhall_syntax/src/core/import.rs +++ b/dhall_syntax/src/core/import.rs @@ -11,10 +11,15 @@ pub enum FilePrefix { Home, } +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub struct FilePath { + pub file_path: Vec<String>, +} + /// The location of import (i.e. local vs. remote vs. environment) #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ImportLocation<SubExpr> { - Local(FilePrefix, Vec<String>), + Local(FilePrefix, FilePath), Remote(URL<SubExpr>), Env(String), Missing, @@ -24,7 +29,7 @@ pub enum ImportLocation<SubExpr> { pub struct URL<SubExpr> { pub scheme: Scheme, pub authority: String, - pub path: Vec<String>, + pub path: FilePath, pub query: Option<String>, pub headers: Option<SubExpr>, } |