mlsanityData to 14 Oct 2026

Investigating the Performance of Language Models for Completing Code in Functional Programming Languages: a Haskell Case Study

arXiv 2403.15185 ↗First posted 22 Mar 2024cs.CLcited by 7

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

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2020Language Models are Few-Shot Learnerscited by 32,419
  4. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  5. 2014Sequence to Sequence Learning with Neural Networkscited by 2,986
  6. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  7. 2021GPT Understands, Toocited by 716
  8. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
  9. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
  10. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 498
  11. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
  12. 2022The Stack: 3 TB of permissively licensed source codecited by 359
16 more
  1. 2020IntelliCode Compose: Code Generation Using Transformercited by 227
  2. 2022GitHub Copilot AI pair programmer: Asset or Liability?cited by 152
  3. 2022CM3: A Causal Masked Multimodal Model of the Internetcited by 142
  4. 2016Sequence-to-Sequence Learning as Beam-Search Optimizationcited by 127
  5. 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 126
  6. 2023Evaluating the Code Quality of AI-Assisted Code Generation Tools: An Empirical Study on GitHub Copilot, Amazon CodeWhisperer, and ChatGPTcited by 71
  7. 2022AlexaTM 20B: Few-Shot Learning Using a Large-Scale Multilingual Seq2Seq Modelcited by 57
  8. 2022CodeFill: Multi-token Code Completion by Jointly Learning from Structure and Naming Sequencescited by 50
  9. 2021Applying CodeBERT for Automated Program Repair of Java Simple Bugscited by 44
  10. 2019Cloze-driven Pretraining of Self-attention Networkscited by 41
  11. 2024Language Models for Code Completion: A Practical Evaluationcited by 39
  12. 2021What do pre-trained code models know about code?cited by 36
  13. 2021Code Completion by Modeling Flattened Abstract Syntax Trees as Graphscited by 30
  14. 2021An Empirical Study on the Usage of Transformer Models for Code Completioncited by 22
  15. 2023Enriching Source Code with Contextual Data for Code Completion Models: An Empirical Studycited by 8
  16. 2023On the Impact of Language Selection for Training and Evaluating Programming Language Modelscited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 4; 2026: 3.

7 papers.