Skip to content

ghc doesn't agree with its own inferred pattern type

GHCi, version 8.1.20160419:

pattern F a <- (($ 'a') -> a)
>>> :i F
pattern F :: b -> Char -> b 	-- Defined at /tmp/tTaa.hs:24:1

Putting them together:

-- tTaa.hs:25:9: error: …
--     • Pattern synonym ‘F’ has one argument
--         but its type signature has two
--     • In the declaration for pattern synonym ‘F’
Compilation failed.
pattern F :: b -> Char -> b 
pattern F a <- (($ 'a') -> a)
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
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information