3 ms·
In Haskell: `2.3 :: Fractional t => t` In other words, it can be inferred to be any type that implements the Fractional typeclass, which includes Decimal types
by kazagistar 10y ago
In Haskell: `2.3 :: Fractional t => t`
In other words, it can be inferred to be any type that implements the Fractional typeclass, which includes Decimal types. Not that it is relevant here, because you basically need to have types for something like this to work, if you have proper type inference, then you don't need to assume any type, and can just interpret a literal as whatever is needed.