Skip to content

Partial type signatures should work in pattern synonym signatures

{-# LANGUAGE PatternSynonyms #-}

pattern MyJust :: _
pattern MyJust a = Just a

GHC can correctly infer the type for the pattern without the type signature so (to me) it is unexpected that this inferred type is not reported to me when using partial type signatures. It just seems to not be implemented currently.

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