Значение тильды в типах Haskell (равенство типов)
Я возился сfix
функция, и я случилось через это:
λ let fix f = let x = f x in x
λ fix (+)
<interactive>:15:5:
Occurs check: cannot construct the infinite type: t ~ t -> t
Expected type: t -> t
Actual type: t -> t -> t
Relevant bindings include it :: t (bound at <interactive>:15:1)
In the first argument of ‘fix’, namely ‘(+)’
In the expression: fix (+)
Я прекрасно знаю, почему происходит эта ошибка, но я заметил забавную подпись типа там:t ~ t -> t
, Что означает этот тип? Что означает тильда в сигнатурах типов в haskell? Где они используются?