summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/gadt/T2587.hs
blob: bcd0a443acd73ef5fbeac7a4f32808841eb2689d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{-# LANGUAGE GADTs, ExistentialQuantification #-}
{-# OPTIONS_GHC -O -fno-warn-overlapping-patterns #-}

-- Trac #2587
-- Actually this bug related to free variables and
-- type lets, but ostensibly it has a GADT flavour
-- Hence being in the GADT directory.

module GadtBug(bug) where

data Existential = forall a . Existential (Gadt a)

data Gadt a where Value :: Gadt Double

bug = [ match undefined | ps <- undefined, _ <- ps ]
  where
        match (Existential _) = undefined
        match (Existential _) = undefined