Commit 09cdd12b authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Replace Rank2Types and PolymorphicComponents by RankNTypes

parent c6734223
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE RankNTypes #-}
module ShouldCompile where
......
{-# LANGUAGE GADTs, ExistentialQuantification, ScopedTypeVariables,
Rank2Types #-}
RankNTypes #-}
-- Here's an example from Doaitse Swiestra (Sept 06)
-- which requires use of scoped type variables
......
{-# LANGUAGE GADTs, Rank2Types #-}
{-# LANGUAGE GADTs, RankNTypes #-}
module ShouldCompile where
......
{-# LANGUAGE GADTs, ExistentialQuantification, KindSignatures, Rank2Types #-}
{-# LANGUAGE GADTs, ExistentialQuantification, KindSignatures, RankNTypes #-}
-- Fails (needs the (Ord a) in TypeSet
-- c.f. gadt22.hs
......
{-# LANGUAGE GADTs, ExistentialQuantification, KindSignatures, Rank2Types #-}
{-# LANGUAGE GADTs, ExistentialQuantification, KindSignatures, RankNTypes #-}
-- Succeeds (needs the (Ord a) in TypeSet
-- c.f. gadt21.hs
......
{-# LANGUAGE GADTs, Rank2Types #-}
{-# LANGUAGE GADTs, RankNTypes #-}
module Main where
......
{-# LANGUAGE GADTs, Rank2Types #-}
{-# LANGUAGE GADTs, RankNTypes #-}
module Termination where
......
:set -XGADTs -XRank2Types -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving
:set -XGADTs -XRankNTypes -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving
:l ../GADT
:a ../Test
:m +Main
......
-- Test handling of extra fields in the representation due to dictionaries
:set -XGADTs -XRank2Types
:set -XGADTs -XRankNTypes
:l ../GADT
let d = DictN (1 :: Integer)
......
-- Test handling of extra fields in the representation due to existentials.
:set -XGADTs -XRank2Types
:set -XGADTs -XRankNTypes
:l ../GADT
let e = Exist 1
......
-- More GADT goodness
:set -XGADTs -XRank2Types -XDeriveDataTypeable -XGeneralizedNewtypeDeriving
:set -XGADTs -XRankNTypes -XDeriveDataTypeable -XGeneralizedNewtypeDeriving
:l ../GADT
:a ../Test
:m +Main
......
{-# LANGUAGE Rank2Types, MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes, MultiParamTypeClasses #-}
-- Tests a bug spotted by Claus in which the type
-- of c3 was wrongly displayed in GHCi as
......
{-# LANGUAGE Rank2Types, MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes, MultiParamTypeClasses #-}
module T where
......
......@@ -3,4 +3,4 @@ test('haddock.Test',
extra_clean(['Test.hi', 'Test.o', 'Hidden.hi', 'Hidden.o',
'Visible.hi', 'Visible.o'])],
multimod_compile,
['Test Hidden Visible', '-XRank2Types -XExistentialQuantification -haddock -ddump-parsed'])
['Test Hidden Visible', '-XRankNTypes -XExistentialQuantification -haddock -ddump-parsed'])
......@@ -23,8 +23,8 @@ test('haddockA022', normal, compile, ['-haddock -ddump-parsed'])
test('haddockA023', normal, compile, ['-haddock -ddump-parsed'])
test('haddockA024', normal, compile, ['-haddock -ddump-parsed'])
test('haddockA025', normal, compile, ['-haddock -ddump-parsed'])
test('haddockA026', normal, compile, ['-haddock -ddump-parsed -XRank2Types'])
test('haddockA027', normal, compile, ['-haddock -ddump-parsed -XRank2Types'])
test('haddockA026', normal, compile, ['-haddock -ddump-parsed -XRankNTypes'])
test('haddockA027', normal, compile, ['-haddock -ddump-parsed -XRankNTypes'])
test('haddockA028', normal, compile, ['-haddock -ddump-parsed -XTypeOperators'])
test('haddockA029', normal, compile, ['-haddock -ddump-parsed'])
test('haddockA030', normal, compile, ['-haddock -ddump-parsed'])
......
......@@ -23,8 +23,8 @@ test('haddockC022', normal, compile, [''])
test('haddockC023', normal, compile, [''])
test('haddockC024', normal, compile, [''])
test('haddockC025', normal, compile, [''])
test('haddockC026', normal, compile, ['-XRank2Types'])
test('haddockC027', normal, compile, ['-XRank2Types'])
test('haddockC026', normal, compile, ['-XRankNTypes'])
test('haddockC027', normal, compile, ['-XRankNTypes'])
test('haddockC028', normal, compile, ['-XTypeOperators'])
test('haddockC029', normal, compile, [''])
test('haddockC030', normal, compile, [''])
......
{-# LANGUAGE TypeFamilies, Rank2Types #-}
{-# LANGUAGE TypeFamilies, RankNTypes #-}
-- This test made the type checker produce an
-- ill-kinded coercion term.
......
......@@ -16,7 +16,7 @@
-- | Module "Trampoline" defines the trampoline computations and their basic building blocks.
{-# LANGUAGE ScopedTypeVariables, Rank2Types, MultiParamTypeClasses, TypeFamilies, KindSignatures,
{-# LANGUAGE ScopedTypeVariables, RankNTypes, MultiParamTypeClasses, TypeFamilies, KindSignatures,
FlexibleContexts, FlexibleInstances, OverlappingInstances, UndecidableInstances
#-}
......
{-# LANGUAGE Rank2Types, TypeFamilies #-}
{-# LANGUAGE RankNTypes, TypeFamilies #-}
-- Unification yielding a coercion under a forall
......
{-# LANGUAGE
FlexibleContexts,
Rank2Types,
RankNTypes,
TypeFamilies,
MultiParamTypeClasses,
FlexibleInstances #-}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment