Skip to content

Commit a98b5a5

Browse files
authored
Add section about overloaded number literals (#380)
* Add section about overloaded number literals * Remove comma which makes sentence sound confusing
1 parent 5818a46 commit a98b5a5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

language/Differences-from-Haskell.md

+4
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ Many type class hierarchies are more granular than in Haskell. For example:
190190
*`Category` has a superclass `Semigroupoid` which provides `(<<<)`, and does not require an identity.
191191
*`Applicative` has a superclass `Apply`, which provides `(<*>)` and does not require an implementation for `pure`.
192192

193+
## Overloaded number literals
194+
195+
In PureScript, number literals are not overloaded as in Haskell. That is, `1` is always an `Int`, and `1.0` is always a `Number`.
196+
193197
## Tuples
194198

195199
PureScript has no special syntax for tuples as records can fulfill the same role that *n*-tuples do with the advantage of having more meaningful types and accessors.

0 commit comments

Comments
 (0)
close