Opened 17 months ago

Closed 16 months ago

Last modified 16 months ago

#11225 closed bug (fixed)

Unable to provide type signature for pattern synonym

Reported by: mpickering Owned by:
Priority: normal Milestone: 8.0.1
Component: Compiler Version: 7.10.3
Keywords: PatternSynonyms Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: patsyn/T11224
Blocked By: Blocking:
Related Tickets: #11224 Differential Rev(s):
Wiki Page:

Description

{-# language
   PatternSynonyms
 , ViewPatterns
 #-}

import Text.Read

pattern PRead a <- (readMaybe -> Just a)

GHC infers the type correctly for PRead but it is impossible provide a signature. See #11224 for more discussion about why.

Change History (2)

comment:1 Changed 16 months ago by mpickering

Resolution: fixed
Status: newclosed

comment:2 Changed 16 months ago by thomie

Milestone: 8.0.1
Note: See TracTickets for help on using tickets.