1 // Copyright (c) Facebook, Inc. and its affiliates.
3 // This source code is licensed under the MIT license found in the
4 // LICENSE file in the "hack" directory of this source tree.
5 use crate::parsing_error::ParsingError;
6 use ty::local_error::TypingError;
7 use ty::reason::Reason;
10 pub enum HackError<R: Reason> {
11 Parsing(ParsingError),
12 Typing(TypingError<R>),
15 impl<R: Reason> From<ParsingError> for HackError<R> {
16 fn from(e: ParsingError) -> Self {
21 impl<R: Reason> From<TypingError<R>> for HackError<R> {
22 fn from(e: TypingError<R>) -> Self {