The more you study …

Trying to make Haskell-related things work on Windows, you can learn a lot about Unix-like operating systems. Sometimes you can learn about Windows too. Looking at RIO.Process.findExecutable provided by rio-0.1.12.0, I learnt about the PATHEXT environment variable. PATH and PATHEXT The Command Prompt (cmd.exe) and other executables use the environment variables PATH and PATHEXT to […]

Help? Help.

The package optparse-applicative provides a Haskell library for parsing options at the command line. A minimal example, providing only minimal help, is as follows:

On Windows 10, the ‘Usage:’ help text depends on how the executable is called and can include a filename extension. For example, at the Command Prompt, a test executable, opTest.exe, […]

Political landscape II

About 47.6 million people were registered as entitled to vote in the United Kingdom’s general election on 12 December 2019 and about 32.1 million did so. I used Haskell to view the outcome with cartograms in which each of the 650 constituencies is represented by a regular hexagon of the same size. Turnout percentage I […]

Political landscape I

About 47.6 million people were registered as entitled to vote in the United Kingdom’s general election on 12 December 2019 and about 32.1 million did so. I wanted to use Haskell to view the outcome. Results The House of Commons Library publishes the results of the election as two comma-separated values (CSV) files, the smaller […]

Access Access

I had a lot of data in a table in an Excel spreadsheet file and I was planning to use Haskell to analyse it. The data would be better structured as a database. Microsoft Office 365 provides Access, a database management system (DBMS). Could Haskell access data in an Access .accdb file? The short answer […]

Out of sequence

The Haskell language provides the list type ([a]) for values that correspond to a finite sequence of values of the same type (a). Other packages export other types that do the same: containers exports Seq a and vector exports Vector a from module Data.Vector and other types from other modules. The values of the different […]

Indexing with fixed-size vectors

In August 2017, Jason Le identified the vector-sized package as the canonical source for efficient fixed-size vectors. Module Data.Vector.Generic.Sized.Internal of the package exports a new type Vector defined as:

and module Data.Vector.Sized defines the type synonym Vector (where Data.Vector is a module of the vector package):

As shown above, instances of Vector v […]

zlib1.dll and conflicts

Certain Haskell libraries depend on C library GTK+ or its dependencies (such as Cairo or Pango). The dependencies include zlib, a compression library. On Windows, these libraries can be obtained most easily using MSYS2. The DLL build of zlib is named zlib1.dll. zlib has developed over time and later versions of zlib1.dll export functions that […]

It’s a kind of magic

Sandy Maguire is working on a book about type-level programming in Haskell with the working title of The Book of Types. It has prompted me to take stock of what I know about kinds. Haskell 2010 Language Report My starting point is the Haskell 2010 Language Report. It explains that the main forms of type […]

Further from the Path

My Path user environment variable includes references to other environment variables, for example (extract):

Suddenly, I was no longer reaching certain locations on the path. I discovered that the references to other environment variables were not being expanded.

Somehow, the type of Path in the registry had been changed from REG_EXPAND_SZ to REG_SZ, […]