Skip to content

Commit 0a90b1c

Browse files
kcsongorhdgarrood
authored andcommitted
Update Differences-from-Haskell.md (#149)
Add DataKinds and KindSignatures to the list of PureScript features which resemble Haskell extensions, with a note explanining the difference between user-defined kinds in Haskell vs PureScript.
1 parent 8ff88ec commit 0a90b1c

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
@@ -292,17 +292,21 @@ In PureScript, operator sections look a little bit different.
292292

293293
The PureScript compiler does not support GHC-like language extensions. However, there are some "built-in" language features that are equivalent (or at least similar) to a number of GHC extensions. These currently are:
294294

295+
* DataKinds (see note below)
295296
* EmptyDataDecls
296297
* ExplicitForAll
297298
* FlexibleContexts
298299
* FlexibleInstances
299300
* FunctionalDependencies
301+
* KindSignatures
300302
* MultiParamTypeClasses
301303
* PartialTypeSignatures
302304
* RankNTypes
303305
* RebindableSyntax
304306
* ScopedTypeVariables
305307

308+
Note on `DataKinds`: Unlike in Haskell, user-defined kinds are open, and they are not promoted, which means that their constructors can only be used in types, and not in values. For more information about the kind system, see https://github.com/purescript/documentation/blob/master/language/Types.md#kind-system
309+
306310
## `error` and `undefined`
307311

308312
For `error`, you can use `Control.Monad.Eff.Exception.Unsafe.unsafeThrow`, in the `purescript-exceptions` package.

0 commit comments

Comments
 (0)
close