dk_engine/parser/langs/
haskell.rs1use crate::parser::lang_config::{CommentStyle, LanguageConfig};
4use dk_core::Visibility;
5use tree_sitter::Language;
6
7pub struct HaskellConfig;
9
10impl LanguageConfig for HaskellConfig {
11 fn language(&self) -> Language {
12 tree_sitter_haskell::LANGUAGE.into()
13 }
14
15 fn extensions(&self) -> &'static [&'static str] {
16 &["hs"]
17 }
18
19 fn symbols_query(&self) -> &'static str {
20 include_str!("../queries/haskell_symbols.scm")
21 }
22
23 fn calls_query(&self) -> &'static str {
24 include_str!("../queries/haskell_calls.scm")
27 }
28
29 fn imports_query(&self) -> &'static str {
30 include_str!("../queries/haskell_imports.scm")
31 }
32
33 fn comment_style(&self) -> CommentStyle {
34 CommentStyle::DashDash
37 }
38
39 fn resolve_visibility(&self, _modifiers: Option<&str>, _name: &str) -> Visibility {
40 Visibility::Public
43 }
44
45 fn is_external_import(&self, _module_path: &str) -> bool {
46 true
49 }
50}