Skip to content

PolyKinds and mutually recursive modules

A.hs

{-# LANGUAGE PolyKinds #-}

module A where

import Test

class C (a :: k)

A.hs-boot

{-# LANGUAGE PolyKinds #-}

module A where

class C (a :: k)

B.hs

{-# LANGUAGE PolyKinds #-}

module Test where

import {-# SOURCE #-} A

Leads to:

A.hs-boot:5:7:
    Class `C' has conflicting definitions in the module and its hs-boot file
    Main module: class C (k::BOX) (a::k) RecFlag Recursive
    Boot file:   class C (k::BOX) (a::k) RecFlag NonRecursive

The problem is not the RecFlag, it's the k kind variable that is getting different uniques.

Trac metadata
Trac field Value
Version 7.6.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information