Haskellator9000 is a calculator developed by Thomas and Lukas, written in (you guessed it) Haskell. Its main feature is the support for multiple SI base and derived units. For a complete list of supported units and features, see below.
- SI base units
- Time (ns, µs, ms, s, min, h, d)
- Length (nm, µm, mm, cm, m, km)
- Mass (ng, µg, mg, g, kg, t)
- SI derived units
- Area (m², dm², cm², mm², a, ha, km²)
- Volume (m³, dm³, cm³, mm³, km³)
- Velocity (combination of length and time)
- Acceleration (combination of length and time²)
- Force (N, m/s², kN)
- Pressure (Pa, hPa)
- Frequency (Hz, kHz, MHz, GHz)
- Energy (J, kJ, MJ)
- Power (W, mW, kW, MW, GW, TW)
- Rich REPL with persisted history and CTRL-R search
- Explicit unit conversion (e.g.
2km [m]
) - Implicit multiplication (e.g.
2m(3m+4m)
instead of2m*(3m+4m)
) - Support for variable bindings (e.g.
a = 1+2, b = 3 -> a + b
)- Of course, they are evaluated lazily 😉
- To run the calculator you first have to make sure that you got a working Haskell
installation
- You can use, e.g., GHCup to install all necessary tools
- We will need the GHC and Stack. So go ahead and install those
- Next, you can clone the repository
Or if you prefer SSH:
git clone https://github.com/LukasPietzschmann/Haskellator9000.git
git clone [email protected]:LukasPietzschmann/Haskellator9000.git
- After that, navigate into the project:
cd Haskellator9000
- Now you have two options: You can simply run the calculator using
Or you could install it into your system by running
stack run
stack install