summaryrefslogtreecommitdiff
path: root/dhall/src/error
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dhall/src/error/builder.rs2
-rw-r--r--dhall/src/error/mod.rs14
2 files changed, 8 insertions, 8 deletions
diff --git a/dhall/src/error/builder.rs b/dhall/src/error/builder.rs
index c0bacb5..3ee65fb 100644
--- a/dhall/src/error/builder.rs
+++ b/dhall/src/error/builder.rs
@@ -6,7 +6,7 @@ use annotate_snippets::{
use crate::syntax::{ParsedSpan, Span};
#[derive(Debug, Clone, Default)]
-pub(crate) struct ErrorBuilder {
+pub struct ErrorBuilder {
title: FreeAnnotation,
annotations: Vec<SpannedAnnotation>,
footer: Vec<FreeAnnotation>,
diff --git a/dhall/src/error/mod.rs b/dhall/src/error/mod.rs
index e28b98b..ef4d41f 100644
--- a/dhall/src/error/mod.rs
+++ b/dhall/src/error/mod.rs
@@ -4,7 +4,7 @@ use crate::semantics::resolve::{ImportLocation, ImportStack};
use crate::syntax::{Import, ParseError};
mod builder;
-pub(crate) use builder::*;
+pub use builder::*;
pub type Result<T> = std::result::Result<T, Error>;
@@ -15,7 +15,7 @@ pub struct Error {
#[derive(Debug)]
#[non_exhaustive]
-pub(crate) enum ErrorKind {
+pub enum ErrorKind {
IO(IOError),
Parse(ParseError),
Decode(DecodeError),
@@ -25,7 +25,7 @@ pub(crate) enum ErrorKind {
}
#[derive(Debug)]
-pub(crate) enum ImportError {
+pub enum ImportError {
Missing,
MissingEnvVar,
SanityCheck,
@@ -53,21 +53,21 @@ pub struct TypeError {
/// The specific type error
#[derive(Debug)]
-pub(crate) enum TypeMessage {
+pub enum TypeMessage {
Custom(String),
}
impl Error {
- pub(crate) fn new(kind: ErrorKind) -> Self {
+ pub fn new(kind: ErrorKind) -> Self {
Error { kind }
}
- pub(crate) fn kind(&self) -> &ErrorKind {
+ pub fn kind(&self) -> &ErrorKind {
&self.kind
}
}
impl TypeError {
- pub(crate) fn new(message: TypeMessage) -> Self {
+ pub fn new(message: TypeMessage) -> Self {
TypeError { message }
}
}