Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 5.6k
    • Issues 5.6k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 662
    • Merge requests 662
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #22547

Core Lint error with a type family

The following program fails Core Lint

{-# LANGUAGE TypeFamilies #-}
module M where

import Data.Kind (Type)

data MP1 a = MP1 a

type family Fixup (f :: Type) (g :: Type) :: Type where
  Fixup f (MP1 f) = MP1 f
  Fixup f f = f
*** Core Lint errors : in result of TcGblEnv axioms ***
M.hs:8:13: warning:
    Incorrect incompatible branch: CoAxBranch (M.hs:9:3-25): [f_aw2,
                                                              MP1 f_aw2] => MP1 f_aw2
    In the coercion axiom D:R:Fixup :: {[f_aw2].
                                        Fixup f_aw2 (MP1 f_aw2)
                                        ~_N
                                        MP1 f_aw2
                                        [f_aw3]. Fixup f_aw3 f_aw3 ~_N f_aw3}

Credit to @alt-romes for finding this issue in linear-base; I've only minimized it.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking