Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,869
    • Issues 4,869
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 456
    • Merge requests 456
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • 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 Compiler
  • GHCGHC
  • Issues
  • #17541
Closed
Open
Created Dec 04, 2019 by Matthew Pickering@mpickeringDeveloper

Regression involving unboxed types and type families

This program compiles with 8.6.5 and 8.8.1 but not with HEAD.

{-# LANGUAGE
             MagicHash,
             FlexibleInstances,
             MultiParamTypeClasses,
             TypeFamilies,
             PolyKinds,
             DataKinds,
             FunctionalDependencies,
             TypeFamilyDependencies #-}
module A where

import GHC.Prim
import GHC.Exts


type family Rep rep where
  Rep Int = IntRep

type family Unboxed rep = (urep :: TYPE (Rep rep)) | urep -> rep where
  Unboxed Int = Int#
[1 of 1] Compiling A                ( A.hs, A.o )

A.hs:20:17: error:
    • Expected kind ‘TYPE (Rep rep)’,
        but ‘Int#’ has kind ‘TYPE 'IntRep’
    • In the type ‘Int#’
      In the type family declaration for ‘Unboxed’
   |
20 |   Unboxed Int = Int#
   |                 ^^^^
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking