[Photo of Thomas Hallgren, July 2016]

Thomas Hallgren

Email:last name at chalmers dot se
Office:EDIT building, room 6105


I am a functional programmer. Since November 2009, I work in the Language Technology Group, mostly with the maintenance of GF (Grammatical Framework) and some web applications based on GF. What else am I doing here and what have I been up to?

2016 I taught the course Functional Programming in Nov-Dec (lp2) this year.
2010 I taught the course Hardware Description and Verification again this year.
2009 I taught the course Hardware Description and Verification this year.
2001-2006 From July 2001 to September 2006, I worked on the Programatica Project in the PacSoft group at Oregon Graduate Institute. I have preserved my home page from my time there.
1988-2001 From 1st May 1998 to 31 June 2001, I was an assistant professor (forskningsassistent) at the Computing Science Department at Chalmers University of Technology, and before I finished my thesis (about Fudgets) I was a PhD student at the same place. I have been a member of the Functional Programming Group for a long time. I have also worked with the Programming Logic Group on the development of user interfaces for proof assistants (Alfa).


Research Activities

I am interested in programming language design and implementation in general, but I have spent most of my time on these things:

1987-1993 Type systems with subtypes for functional languages. This is what my Licentiate Thesis is about.
1991-1996 Graphical User Interfaces for functional languages. Magnus Carlsson and I developed Fudgets, a GUI Toolkit for the functional programming language Haskell. We wrote a joint PhD thesis about this.
1996-2001 I spent a lot of time on Alfa, a proof editor implemented using Fudgets. The most recent work was to support natural language by interfacing to Aarne Ranta's Grammatical Framework, GF.
2001-2006 I worked on the Programatica project on tools to support high-assurance programming in Haskell. I also worked on House, an operating system implemented in Haskell.
2009- I worked on the GF grammar compiler and developed some web applications based on GF.


Also available:

Fudgets - A Graphical User Interface in a Lazy Functional Language (abstract)
M. Carlsson, T. Hallgren
In FPCA '93 - Conference on Functional Programming Languages and Computer Architecture, pp. 321--330, ACM Press, June 1993.
Fudgets --- Purely Functional Processes with applications to Graphical User Interfaces
Magnus Carlsson, Thomas Hallgren
PhD Thesis, Department of Computing Science, Chalmers University of Technology, S-412 96 Göteborg, Sweden, March 1998.
The Fudgets Home Page
Thomas Hallgren, Magnus Carlsson
Programming with Fudgets (abstract)
Thomas Hallgren, Magnus Carlsson
In J. Jeuring and E. Meijer, Advanced Functional Programming, pp. 137-182, Springer Verlag, LNCS 925, 1995.
Stream Processors: Concurrent Programming in Pure Functional Languages
Thomas Hallgren, Magnus Carlsson
In 7th Nordic Workshop on Programming Theory, Göteborg, November 1995.
Project report: Fun → Fun2
T. Hallgren
Master's Thesis, Imperial College, London, U.K., 1988.
Introduction to Interactive Real-time Multi-user Games Programming in LML
Thomas Hallgren
Tech. Report , No. Memo 89, Programming Methodology Group, Chalmers University of Technology, Göteborg, Sweden, January 1990.
Subtypes in Polymorhic Functional Languages (abstract)
Thomas Hallgren
Licentiate Thesis, Chalmers University of Technology, Göteborg, Sweden, February 1993.
Fudgets - Graphical User Interfaces and I/O in Lazy Functional Languages
M. Carlsson, T. Hallgren
Licentiate Thesis, Chalmers University of Technology, Göteborg, Sweden, May 1993.
An extensible proof text editor (abstract)
Thomas Hallgren, Aarne Ranta
In Logic for Programming and Automated Reasoning (LPAR'2000), LNCS/LNAI, No. 1955, pp. 70-84, Springer Verlag, November 2000.
Fun with Functional Dependencies (abstract)
Thomas Hallgren
In Proceedings of the Joint CS/CE Winter Meeting, pp. 135--145, Department of Computing Science, Chalmers, Göteborg, Sweden, January 2001.
A Formal Specification for the Haskell 98 Module System (abstract)
Iavor S. Diatchki, Mark P. Jones, Thomas Hallgren
In Proceedings of ACM SIGPLAN 2002 Haskell Workshop, pp. 17--28, Pittsburgh, PA, USA, October 2002.
A Principled Approach to Operating System Construction in Haskell (abstract)
Thomas Hallgren, Mark P. Jones, Rebekah Leslie, Andrew Tolmach
In Proceedings of the Tenth ACM SIGPLAN International Conference on Functional Programming, pp. 116--128, Tallinn, Estonia, September 2005.
Writing Systems Software in a Functional Language: An Experience Report
Iavor S. Diatchki, Thomas Hallgren, Mark P. Jones, Rebekah Leslie, Andrew Tolmach
In Proceedings of the Fourth Workshop on Programming Languages and Operating Systems, Stevenson, WA, USA, October 2007.
Tools for Multilingual Grammar-Based Translation on the Web
Aarne Ranta, Krasimir Angelov, Thomas Hallgren
In Proceedings of the ACL 2010 System Demonstrations, pp. 66--71, Association for Computational Linguistics, Uppsala, Sweden, July 2010.
The MOLTO Phrasebook
Olga Caprotti, Krasimir Angelov, Ramona Enache, Thomas Hallgren, Aarne Ranta
In Swedish Language Technology Conference SLTC 2010, pp. 35--36, Linköping, Sweden, October 2010.
A Cloud-Based Editor for Multilingual Grammars (abstract)
Thomas Hallgren, Ramona Enache, Aarne Ranta
In Proceedings of the Grammar Engineering Across Frameworks (GEAF) 2015 Workshop, pp. 41--48, Association for Computational Linguistics, Beijing, China, July 2015.
Cross-Lingual Syntax: Relating Grammatical Framework with Universal Dependencies (abstract)
Aarne Ranta, Prasanth Kolachina, Thomas Hallgren
In NoDaLiDa 2017, NEALT Proceedings, Linköping University Electronic Press, Gothenburg, Sweden, Software Demonstration, url{http://nodalida2017.se/program}, May 2017.


Ohloh profile for Thomas Hallgren Writing computer programs is something I like to do, and I do it both in my work and as a hobby. Below, I mention some of them, both small and large.

Web applications

I mention some web application first, since it is so easy for you to try them out.
WebFudgets (2017)
WebFudgets allow Haskell programs built with Fudgets (see below) to run in a web page. I have adapted some of the Fudgets programs from back in the day to WebFudgets.
The GF Cloud (2010-2016)
Some web applications based on GF, developed by me and other people.
The following "toys" were created while I was teaching the compiler construction course in 2001:
RegToy (January 2001)
A web interface to a small Haskell program that converts regular expressions to finite automata.
LRToy (January 2001)
A web interface to a small Haskell program that generates LR parsing tables for BNF grammars.
FlowToy (February 2001)
A web interface to a small Haskell program that performs some simple dataflow analysis of programs in an intermediate language.
Some older web applications:
Trams (~1996-2000)
A complete, stand-alone, special-purpose web server for searching for travel routes in the Göteborg public transport system, implemented in Haskell. (Such a web service did not exist when I wrote it. Nowadays, you can use similar official services provided by Västtrafik.)
Webster's English Dictionary (~1995)
A rather small program, part shell scripts, part C.
Klockan (~1995)
Tells what time it is, in Swedish. A small C program.

Other web-related software

Being a dedicated functional programmer, I have done some experiments with writing web software in the functional language Haskell:

WWWBrowser - a web browser (1994)

This is a simple web browser. Since it fetched inlined images in parallel, it could display web pages faster than NCSA Mosaic (the dominant browser at the time). It is described in the chapter WWWBrowser - a WWW client of my PhD thesis.

wwwchecklinks (~1994)

This is a tool for web page authors. wwwchecklinks searches a document hierarchy and reports broken links. It also produces a cross reference list.

InternetLib (~1994)
A library containing the key components needed to build WWWBrowser, wwwchecklinks, Trams and other web-related software.

Some other software

A GUI toolkit for Haskell, which Magnus Carlsson and I implemented, mostly during 1991-1995, but I still make some additions and improvements now and then. We have also implemented some games and other small programs using Fudgets. For some examples, see the Fudgets demos page.
Alfa (1996-2004)
A proof assistant with a graphical user interface, implemented in Haskell using Fudgets. My work on Alfa mostly concerns the graphical user interface and plugging everything together. Agda and GF are used in Alfa.
The Programatica Haskell front-end (2001-2006)
This is essentially a Haskell compiler front-end that I spent a lot of time working on as a PostDoc in the Programatica project.
An prototype operating system implemented in Haskell as part of the Programatica project, presented at the Haskell Symposium 2004 and at ICFP 2015.
An automatic make tool supplied with hbc, written in LML. It has served as the starting point for nhcmake, supplied with NHC, and later hmake, a more compiler independent version of nhcmake.
A successor of hbcmake. It has a graphical user interface and it can compile in parallell on several machines on a local network. Although I use it myself (e.g., to compile Alfa) I never considered it quite finished and so it has not been released to the public.
Reg (1999-)
A small tool that created for my own personal use for manipulating registers (i.e. tables or relations as in relational databases) stored in text files. It can convert to and from various formats, e.g. CSV, TSV, Unix Mailbox, Unix password file, URL-encoded-queries, and even JSON.


I bought my first computer when I was 15 years old, and since then I have enjoyed writing programs of various kinds. The programming languages I used in the beginning were mostly BASIC and 6502 assembler. As an undergraduate student at Chalmers University I was introduced to functional programming and was fascinated, but I continued to write most of my programs in C until I was introduced to the Lazy ML compiler as a PhD student. Nowadays, I write most of my programs in Haskell, and only rarely resort to C or Shell scripts.

Comparing programming languages is fun. My favourite web page on this topic is 99 Bottles of Beer on the Wall. This page shows the same programming example in hundreds of diffrent languages!

Just for fun