-
Notifications
You must be signed in to change notification settings - Fork 83
Language
konsumlamm edited this page Apr 10, 2026
·
2 revisions
The language is an extended subset of Haskell 2010.
Differences:
- Kind variables need an explicit
forall. - Extensions are always enabled, with the only exception being
CPP. - Data type contexts are not supported.
-
mainin the top module given tomhsserves at the program entry point. - Many things that should be an error (but which are mostly harmless) are not reported.
- Text file I/O always uses UTF8, as does the source code.
- The
BangPatternsextension is parsed, but only effective at the a top levellet/where. - More differences that I don't remember right now.
Mutually recursive modules are allowed the same way as with GHC, using .hs-boot files.
The following extensions are supported:
- AllowAmbiguousTypes
- BangPatterns
- BinaryLiterals
- BlockArguments
- CApiFFI
- ConstrainedClassMethods
- ConstraintKinds
- CPP
- DefaultSignatures
- DeriveAnyClass
- DeriveDataTypeable
- DeriveFoldable
- DeriveFunctor
- DeriveTraversable
- DerivingStrategies
- DerivingVia
- DisambiguateRecordFields
- DoAndIfThenElse
- DuplicateRecordFields
- EmptyCase
- EmptyDataDecls
- EmptyDataDeriving
- ExistentialQuantification
- ExplicitForAll
- ExplicitNamespaces
- ExtendedDefaultRules
- ExtraInstanceBindings
- FlexibleContexts
- FlexibleInstances
- FunctionalDependencies
- GADTs
- GADTSyntax
- GeneralisedNewtypeDeriving
- ImportQualifiedPost
- ImportShadowing
- IncoherentInstances
- InstanceSigs
- KindSignatures
- LambdaCase
- LiberalTypeSynonyms
- MagicHash
- MultilineStrings
- MultiParamTypeClasses
- MultiWayIf
- NamedDefaults
- NamedFieldPuns
- NegativeLiterals
- NoDatatypeContexts
- NondecreasingIndentation
- NoStarIsType
- NumericUnderscores
- OrPatterns
- OverlappingInstances
- OverloadedRecordDot
- OverloadedRecordUpdate
- OverloadedStrings
- PatternSynonyms
- PolyKinds
- PolymorphicComponents
- PostfixOperators
- QualifiedDo
- RankNTypes
- RecordWildCards
-
RecursiveDo (without optimal
mdodesugaring) - RequiredTypeArguments
- ScopedTypeVariables
- StandaloneDeriving
- StandaloneKindSignatures
- TupleSections (only pairs right now)
- TypeApplications
- TypeLits
- TypeOperators
- TypeSynonymInstances
- UndecidableInstances
- UndecidableSuperClasses
- UnicodeSyntax
- ViewPatterns
This table provides an overview of which standard library modules are report compliant.
| Module | Report compliant | Comment |
|---|---|---|
| Prelude | yes1 | missing catch (as in GHC) |
| Control.Monad | yes1 |
fail not in Monad (as in GHC) |
| Data.Array | yes | part of array-mhs
|
| Data.Bits | yes | |
| Data.Char | no | missing lexLitChar, readLitChar (see commit b7370759bfb726d997ac238123de5ff6d38c4aa5) |
| Data.Complex | yes1 | no datatype context, instance (RealFloat a) => Show a
|
| Data.Int | yes | |
| Data.Ix | yes | |
| Data.List | yes | |
| Data.Maybe | yes | |
| Data.Ratio | yes | |
| Data.Word | yes | |
| Foreign | yes | |
| Foreign.C | yes | |
| Foreign.C.Error | yes | |
| Foreign.C.String | no | missing functions (in particular CWString related) |
| Foreign.C.Types | no | missing/wrong instances |
| Foreign.ForeignPtr | no | missing FinalizerEnvPtr, newForeignPtrEnv, addForeignPtrFinalizerEnv. finalizeForeignPtr, unsafeForeignPtrToPtr
|
| Foreign.Marshal | yes | |
| Foreign.Marshal.Alloc | yes | |
| Foreign.Marshal.Array | yes | |
| Foreign.Marshal.Error | yes1 | void :: Functor f => f a -> f () |
| Foreign.Marshal.Utils | yes | |
| Foreign.Ptr | yes |
freeHaskellFunPtr does nothing |
| Foreign.StablePtr | yes | |
| Foreign.Storable | yes | |
| Numeric | yes | |
| System.Environment | yes | |
| System.Exit | yes | |
| System.IO | no | missing functions2, missing types3, missing IOMode instances |
| System.IO.Error | yes1 | renamed catch, try to catchIOError, tryIOError (as in GHC) |
1. not quite, but close enough, see comment
2. hFileSize, hSetFileSize, hIsEOF, hGetPosn, hSetPosn, hSeek, hTell, hIsOpen, hIsClosed, hIsReadable, hIsWritable, hIsSeekable, hSetEcho, hGetEcho, hShow, hWaitForInput, hReady, hPrint
3. HandlePosn, SeekMode