summaryrefslogtreecommitdiff
path: root/testsuite/tests/gadt/records-fail1.hs
blob: 12bb3e0cd31b726d51809e7be5b0faadafc55966 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-# LANGUAGE GADTs #-}

-- Tests record syntax for GADTs

-- Record syntax in GADTs has been deprecated since July 2009
-- see commit 432b9c9322181a3644083e3c19b7e240d90659e7 by simonpj:
-- "New syntax for GADT-style record declarations, and associated refactoring"
-- and Trac #3306

-- It's been removed in August 2015
-- see Phab D1118

-- test should result in a parse error

module ShouldFail where

data T a where
  T1 { x :: a, y :: b } :: T (a,b)
  T4 { x :: Int } :: T [a]