summaryrefslogtreecommitdiff
path: root/testsuite/tests/impredicative/PList1.hs
blob: 2877fa65bf4bde5bedb53ce2c7ca592da59c9c11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{-# LANGUAGE ImpredicativeTypes #-}
{-# OPTIONS_GHC -Wno-x-partial #-}

module PList1 where
-- Polymorphic lists 1: requires smart-app-res

type Sid = forall a . a -> a

ids :: [Sid]
ids = []

-- requires smart-app-res
test0 :: [Sid]
test0 = (\x->x) : ids

test1 :: [Sid]  -- SLPJ added
test1 = ids ++ test0

test2 :: [Sid]
test2 = tail test1


test3 :: [Sid]  -- SLPJ added
test3 = reverse test2
test4 = (tail::([Sid]->[Sid])) test2

test5 = (head::([Sid]->Sid)) test2