Sneak Peek: Bolt Math
Haskell Community [Unofficial]
March 15, 2026
Great minds think alike - that is precisely what I did for the alternative homogenous operators that I mentioned but didn’t post - I might as well since you all really want to make sure they exist
module Bolt.Math.Syntax.Operators.Simple where
import Bolt.Math.Internal.Prelude
import Bolt.Math.Addition
import Bolt.Math.Multiplication
import Bolt.Math.Exponentiation
infixr 8 ^
infixl 7 *, /
infixl 6 +, -
(+) :: (Addition a a, Sum a a ~ a) => a -> a -> a
a + b = plus a b
(-) :: (Subtraction a a, Delta a a ~ a) => a -> a -> a
a - b = minus a b
(*) :: (Multiplication a a, Product a a ~ a) => a -> a -> a
a * b = times a b
(/) :: (Division a a, Ratio a a ~ a) => a -> a -> a
a / b = divides a b
(^) :: (Exponentiation a a, Power a a ~ a) => a -> a -> a
a ^ b = pow a b
Obviously mine are eta expanded but that’s a matter of preference. I will also probably be adopting specialized numhask-style left and right act operators because I have decided that I like them, though they will get their own particular operator module in Bolt.Math.Syntax.Operators.Act or something.
Discussion in the ATmosphere