Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which langugage extensions are implied by Haskell2010 in ghc?

Tags:

haskell

ghc

I don't know why I'm having trouble finding the docs for this, but which extensions are implied by:

{-# LANGUAGE Haskell2010 #-}

I'm mostly just concerned with how ghc handles this, but I assume this is part of the standard.

like image 568
jberryman Avatar asked Dec 18 '15 23:12

jberryman


People also ask

What are language extensions in Haskell?

Language extensions are used to enable language features in Haskell that may seem useful in certain cases. They can be used to loosen restrictions in the type system or add completely new language constructs to Haskell. or (in GHC) using flags -X<Extension> .


1 Answers

From the very last section of the Haskell 2010 report, I believe this is what you are looking for (emphasis mine):

Haskell 2010 implementations that support the LANGUAGE pragma are required to support

{-# LANGUAGE Haskell2010 #-}

Those implementations are also encouraged to support the following named language features:

PatternGuards, NoNPlusKPatterns, RelaxedPolyRec,  
EmptyDataDecls, ForeignFunctionInterface

These are the named language extensions supported by some pre-Haskell 2010 implementations, that have been integrated into this report.

like image 76
user2407038 Avatar answered Oct 27 '22 01:10

user2407038