Weird, it is enough on my machine (running ghc 7.6.3, unittyped 0.1), but unittyped does seem to use a lot of language extensions internally, it is seems possible that it would behave weirdly on different versions.
To answer the question of how it is possible, we can start by looking at the types. ":t" is a ghci command to show the type of an expression:
ghci> :t 1
1 :: Num a => a
This indicates that "1" can be any type that implements the "Num" typeclass.
Next, we want to determine what type "1" takes in the expression "1 meter". We can do this with:
ghci> let a=1; b=a meter
ghci> :t a
a :: UnitTyped.Value Double LengthDimension Meter
-> UnitTyped.Value
Double
('UnitTyped.UnitCons
* Length ('UnitTyped.Pos 'UnitTyped.One) 'UnitTyped.UnitNil)
Meter
We can see that, in the expression "1 meter", "1" is actually a function. Looking at the source code [1], it seems like this is accomplished in a relativly hacky manner:
instance (Fractional f, Convertable a b, t ~ Value f a b) => (Prelude.Num (Value f a b -> t)) where
fromInteger i x = Prelude.fromInteger i . x
(+) = error "This should not happen"
(*) = error "This should not happen"
abs = error "This should not happen"
signum = error "This should not happen"
This works because the "+" being defined here is Prelude.+, not UnitTyped.NoPrelude.+ (which is defined seperatly).
[1] https://hackage.haskell.org/package/unittyped-0.1/docs/src/U...