Skip to content

Pattern quotations warn about unused matches

If I say

{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fwarn-unused-matches #-}

module Pat where

foo = [p| (x, y) |]

I get

Pat.hs:6:12: Warning: Defined but not used: ‘x’

Pat.hs:6:15: Warning: Defined but not used: ‘y’

This is silly.

Patch forthcoming.

Trac metadata
Trac field Value
Version 7.8.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Template Haskell
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