Skip to content

Inconsistency in GADTs?

f :: Ord a => Eq a => a -> Bool
f = 

this is allowed but not in GADTs

data F a where
  MkF :: Ord a => Eq a => a -> F a

-- <interactive>:48:16: error:
--     • Data constructor ‘MkF’ returns type ‘Eq a => a -> F a’
--         instead of an instance of its parent type ‘F a’
--     • In the definition of data constructor ‘MkF’
--       In the data type declaration for ‘F’

not a big deal

Trac metadata
Trac field Value
Version 8.0.1
Type Task
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