Investigating the Performance of Language Models for Completing Code in Functional Programming Languages: a Haskell Case Study
Not on the map. Why?
Abstract (arXiv)
Language model-based code completion models have quickly grown in use, helping thousands of developers write code in many different programming languages. However, research on code completion models typically focuses on imperative languages such as Python and JavaScript, which results in a lack of representation for functional programming languages. Consequently, these models often perform poorly on functional languages such as Haskell. To investigate whether this can be alleviated, we evaluate the performance of two language models for code, CodeGPT and UniXcoder, on the functional programming language Haskell. We fine-tune and evaluate the models on Haskell functions sourced from a publicly accessible Haskell dataset on HuggingFace. Additionally, we manually evaluate the models using our novel translated HumanEval dataset. Our automatic evaluation shows that knowledge of imperative programming languages in the pre-training of LLMs may not transfer well to functional languages, but that code completion on functional languages is feasible. Consequently, this shows the need for more high-quality Haskell datasets. A manual evaluation on HumanEval-Haskell indicates CodeGPT frequently generates empty predictions and extra comments, while UniXcoder more often produces incomplete or incorrect predictions. Finally, we release HumanEval-Haskell, along with the fine-tuned models and all code required to reproduce our experiments on GitHub (https://github.com/AISE-TUDelft/HaskellCCEval).
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Builds on 28 of its 44 references that are in the map. First posted on arXiv 22 Mar 2024.
Builds on
28 of 44 references.
References · 28
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,986
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2021GPT Understands, Toocited by 716
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 498
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
- 2022The Stack: 3 TB of permissively licensed source codecited by 359
16 more
- 2020IntelliCode Compose: Code Generation Using Transformercited by 227
- 2022GitHub Copilot AI pair programmer: Asset or Liability?cited by 152
- 2022CM3: A Causal Masked Multimodal Model of the Internetcited by 142
- 2016Sequence-to-Sequence Learning as Beam-Search Optimizationcited by 127
- 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 126
- 2023Evaluating the Code Quality of AI-Assisted Code Generation Tools: An Empirical Study on GitHub Copilot, Amazon CodeWhisperer, and ChatGPTcited by 71
- 2022AlexaTM 20B: Few-Shot Learning Using a Large-Scale Multilingual Seq2Seq Modelcited by 57
- 2022CodeFill: Multi-token Code Completion by Jointly Learning from Structure and Naming Sequencescited by 50
- 2021Applying CodeBERT for Automated Program Repair of Java Simple Bugscited by 44
- 2019Cloze-driven Pretraining of Self-attention Networkscited by 41
- 2024Language Models for Code Completion: A Practical Evaluationcited by 39
- 2021What do pre-trained code models know about code?cited by 36
- 2021Code Completion by Modeling Flattened Abstract Syntax Trees as Graphscited by 30
- 2021An Empirical Study on the Usage of Transformer Models for Code Completioncited by 22
- 2023Enriching Source Code with Contextual Data for Code Completion Models: An Empirical Studycited by 8
- 2023On the Impact of Language Selection for Training and Evaluating Programming Language Modelscited by 4
Built on by
Citing papers per year: 2025: 4; 2026: 3.
7 papers.
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Qualitycited by 4
- 2025CCCI: Code Completion with Contextual Information for Complex Data Transfer Tasks Using Large Language Modelscited by 2
- 2026Perish or Flourish? A Holistic Evaluation of Large Language Models for Code Generation in Functional Programmingcited by 1
- 2025Structure-Aware Corpus Construction and User-Perception-Aligned Metrics for Large-Language-Model Code Completioncited by 0
- 2025Evaluating Large Language Models for Functional and Maintainable Code in Industrial Settings: A Case Study at ASMLcited by 0
- 2026Improving LLM Code Reasoning via Semantic Equivalence Self-Play with Formal Verificationcited by 0
- 2026FPMoE: A Sparse Mixture-of-Experts Approach to Functional Code Generationcited by 0
- 2026FPMoE: A Sparse Mixture-of-Experts Approach to Functional Code Generation27 May 2026
- 2026Improving LLM Code Reasoning via Semantic Equivalence Self-Play with Formal Verification18 Apr 2026
- 2026Perish or Flourish? A Holistic Evaluation of Large Language Models for Code Generation in Functional Programming5 Jan 2026
- 2025Evaluating Large Language Models for Functional and Maintainable Code in Industrial Settings: A Case Study at ASML15 Sep 2025
- 2025Structure-Aware Corpus Construction and User-Perception-Aligned Metrics for Large-Language-Model Code Completion19 May 2025
- 2025CCCI: Code Completion with Contextual Information for Complex Data Transfer Tasks Using Large Language Models29 Mar 2025
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Quality7 Mar 2025