Skip to content

Function type synonym fails in pattern synonym

pattern Id :: a -> a
pattern Id x = x

works but

-- • Pattern synonym ‘Id’ has one argument
--     but its type signature has none
-- • In the declaration for pattern synonym ‘Id’
type Endo a = a -> a

pattern Id :: Endo a
pattern Id x = x
Trac metadata
Trac field Value
Version 8.0.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