haskell-suite / haskell-src-exts

Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer
Other
193 stars 94 forks source link

`TypeInType` implies `PolyKinds` #412

Closed vrom911 closed 6 years ago

vrom911 commented 6 years ago

TypeInType extension implies PolyKinds (see the link TypeInType docs) but when parsing file using the haskell-src-exts in fails and says that PolyKinds language extension is not enabled though I have TypeInType enabled.

Simple example

I have a project with the only module Typeintype which looks like this:

{-# LANGUAGE TypeInType #-}

module Typeintype
       ( App
       ) where

import Data.Kind

data App (f :: k -> *)

It builds perfectly as I expected.

But when I'm trying to parse it in repl:

$ cabal new-repl

ghci> import Language.Haskell.Exts

ghci> parseFile "src/Typeintype.hs"
ParseFailed (SrcLoc "src/Typeintype.hs" 9 18) "PolyKinds language extension is not enabled. Please add {-# LANGUAGE PolyKinds #-} pragma at the top of your module."

which is not correct behaviour

My settings

I'm using ghc-8.4.1 for this project.

And cabal new-freeze shows the following versions of the dependencies for this project:

constraints: any.Cabal ==2.2.0.1,
             any.array ==0.5.2.0,
             any.base ==4.11.1.0,
             any.binary ==0.8.5.1,
             any.bytestring ==0.10.8.2,
             any.containers ==0.5.11.0,
             any.cpphs ==1.20.8,
             any.deepseq ==1.4.3.0,
             any.directory ==1.3.1.5,
             any.filepath ==1.4.2,
             any.ghc-prim ==0.5.2.0,
             any.happy ==1.19.9,
             happy +small_base,
             any.haskell-src-exts ==1.20.2,
             any.integer-gmp ==1.0.2.0,
             any.mtl ==2.2.2,
             any.old-locale ==1.0.0.7,
             any.old-time ==1.1.0.3,
             any.parsec ==3.1.13.0,
             any.polyparse ==1.12,
             any.pretty ==1.1.3.6,
             any.process ==1.6.3.0,
             any.rts ==1.0,
             any.text ==1.2.3.0,
             any.time ==1.8.0.2,
             any.transformers ==0.5.5.0,
             any.unix ==2.7.2.2

As you see haskell-src-exts ==1.20.2 is used and this is the latest version on hackage at the moment.