Commit f793789d authored by simonpj's avatar simonpj
Browse files

Use -XImpredicativeTypes instead of -fglasgow-exts

parent 151d9113
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# OPTIONS_GHC -XImpredicativeTypes #-}
module Base1 where
-- basic examples of impredicative instantiation of variables
......
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# OPTIONS_GHC -XImpredicativeTypes -XEmptyDataDecls -XGADTs #-}
-- Trac #1118
......
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# OPTIONS_GHC -XImpredicativeTypes #-}
module PList1 where
-- Polymorphic lists 1: requires smart-app-res
......
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# OPTIONS_GHC -XImpredicativeTypes #-}
module PList2 where
-- Polymorphic lists 2: require smart-app-arg & smart-app-res: Should fail w/o smart-app-arg
......
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# OPTIONS_GHC -XImpredicativeTypes -XScopedTypeVariables #-}
module ShouldCompile where
......
-- Resolving an impredicative type
:set -fglasgow-exts
:set -XImpredicativeTypes
:m + Control.Monad.ST
let u = undefined :: ST s (forall s'. ST s' a)
:p u
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# OPTIONS -XImpredicativeTypes -XEmptyDataDecls -XGADTs -XLiberalTypeSynonyms -XFlexibleInstances #-}
-- See Trac #1627. The point is that we should get nice
-- compact code for Foo
......
{-# OPTIONS -fglasgow-exts #-}
{-# OPTIONS_GHC -XImpredicativeTypes -XScopedTypeVariables -XGADTs #-}
-- Here are a bunch of tests for impredicative polymorphism
-- mainly written by Dimitrios
......
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# OPTIONS_GHC -XImpredicativeTypes -XGADTs #-}
-- This program sent GHC 6.6 into a loop, because the fixpointing
-- of the substitution in type refinement got its in-scope-set
......
{-# OPTIONS -fglasgow-exts #-}
{-# OPTIONS -XImpredicativeTypes #-}
module ShouldFail where
......
{-# OPTIONS -fglasgow-exts #-}
{-# OPTIONS -XImpredicativeTypes #-}
module Foo where
......
Markdown is supported
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