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,867
    • Issues 4,867
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 457
    • Merge requests 457
  • 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
  • #11562
Closed
Open
Created Feb 09, 2016 by Sergei Trofimovich@trofiReporter

WARNING: file compiler/stgSyn/CoreToStg.hs, line 250: $fCategoryConstraint:- True False

Tried to debug unrelated build failure of constraints-0.4.1.3 and found this in today's ghc-HEAD:

$ inplace/bin/ghc-stage2 -fforce-recomp -c C.hs -O0
WARNING: file compiler/stgSyn/CoreToStg.hs, line 250
  $fCategoryConstraint:- True False
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE GADTs #-}

module C () where
import Control.Category
import GHC.Types (Constraint)

data Dict :: Constraint -> * where
  Dict :: a => Dict a

infixr 9 :-

newtype a :- b = Sub (a => Dict b)

instance Category (:-) where
  id  = refl
  (.) = trans

infixl 1 \\

(\\) :: a => (b => r) -> (a :- b) -> r
r \\ Sub Dict = r

trans :: (b :- c) -> (a :- b) -> a :- c
trans f g = Sub (Dict \\ f \\ g)

refl :: a :- a
refl = Sub Dict

{-
$ inplace/bin/ghc-stage2 -fforce-recomp -c C.hs -O0

WARNING: file compiler/stgSyn/CoreToStg.hs, line 250
  $fCategoryConstraint:- True False
-}

Original file it was factored out is: https://github.com/ekmett/constraints/blob/c550b7653e88d58882873d11f05538d783313a05/src/Data/Constraint.hs

Might be a result of D1889

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