treesitter-types-haskell 1.0.0

Pre-generated strongly-typed AST types for Haskell (tree-sitter-haskell)
Documentation
//! Strongly-typed AST types for Haskell, auto-generated from
//! [`tree-sitter-haskell`](https://docs.rs/tree-sitter-haskell)'s `node-types.json`.
//!
//! This crate is generated by [`treesitter-types`](https://docs.rs/treesitter-types) and is
//! automatically kept up to date when a new version of the grammar crate is released.
//!
//! These types have been tested by parsing the
//! [Cabal](https://github.com/haskell/cabal) source code.
//!
//! See the [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) project for more
//! information about the underlying parser framework.
//!
//! # Example
//!
//! ```
//! use treesitter_types_haskell::*;
//!
//! // A minimal Haskell hello-world program.
//! let src = b"\
//! module Main where
//!
//! main :: IO ()
//! main = putStrLn \"Hello, World!\"
//! ";
//!
//! // Parse the source with tree-sitter and convert into typed AST.
//! let mut parser = tree_sitter::Parser::new();
//! parser.set_language(&tree_sitter_haskell::LANGUAGE.into()).unwrap();
//! let tree = parser.parse(src, None).unwrap();
//! let haskell = Haskell::from_node(tree.root_node(), src).unwrap();
//!
//! // The module has a header (`module Main where`), no imports, and declarations.
//! assert!(haskell.children.is_some()); // the module header
//! assert!(haskell.imports.is_none());  // no import statements
//! assert!(haskell.declarations.is_some());
//!
//! // The declarations section contains the type signature and the binding.
//! let decls = haskell.declarations.as_ref().unwrap();
//! assert!(!decls.children.is_empty());
//! ```

pub use tree_sitter_haskell;
pub use treesitter_types::tree_sitter;
pub use treesitter_types::{FromNode, LeafNode, ParseError, Span, Spanned};

mod generated;
pub use generated::*;