Commit 1ecb52f4 authored by Ian Lynagh's avatar Ian Lynagh

Remove more -fglasgow-exts uses from tests

parent 22535fa3
{-# OPTIONS -fglasgow-exts -cpp #-}
{-# LANGUAGE CPP #-}
-- Optimisation problem. There are two missed opportunities for optimisation in alex_scan_tkn, below.
......
......@@ -19,7 +19,7 @@ test('arr012', skip_if_fast, compile_and_run, [''])
test('arr013', skip_if_fast, compile_and_run, [''])
test('arr014', skip_if_fast, compile_and_run, [''])
test('arr015', skip_if_fast, compile_and_run, [''])
test('arr016', normal, compile_and_run, ['-fglasgow-exts'])
test('arr016', normal, compile_and_run, [''])
test('arr017', skip_if_fast, compile_and_run, [''])
test('arr018', skip_if_fast, compile_and_run, [''])
test('arr019', normal, compile_and_run, [''])
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
{-
......
{-# OPTIONS -fglasgow-exts #-}
{-# LANGUAGE Arrows #-}
{-# LANGUAGE Arrows, ExistentialQuantification #-}
-- Crashed GHC 6.4 with a lint error
-- because of the existential
......
{-# OPTIONS -fglasgow-exts #-}
{-# LANGUAGE Arrows #-}
{-# LANGUAGE Arrows, MultiParamTypeClasses, FlexibleInstances #-}
-- Simple expression parser
-- (uses do-notation and operators)
......
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# LANGUAGE RankNTypes #-}
module Church1 where
-- Church numerals w/o extra type constructors
......
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# LANGUAGE RankNTypes #-}
module Church2 where
-- Church numerals w/o extra type constructors: Should fail
......
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# LANGUAGE Rank2Types #-}
module SystemF where
-- System-F examples
......
......@@ -9,13 +9,13 @@ test('cgrun008', normal, compile_and_run, [''])
test('cgrun009', normal, compile_and_run, [''])
test('cgrun010', normal, compile_and_run, [''])
test('cgrun011', normal, compile_and_run, [''])
test('cgrun012', only_compiler_types(['ghc']), compile_and_run, ['-fglasgow-exts'])
test('cgrun012', only_compiler_types(['ghc']), compile_and_run, [''])
test('cgrun013', normal, compile_and_run, [''])
test('cgrun014', normal, compile_and_run, [''])
test('cgrun015', only_compiler_types(['ghc']), compile_and_run, ['-fglasgow-exts'])
test('cgrun015', only_compiler_types(['ghc']), compile_and_run, [''])
test('cgrun016', exit_code(1), compile_and_run, [''])
test('cgrun017', normal, compile_and_run, [''])
test('cgrun018', only_compiler_types(['ghc']), compile_and_run, ['-fglasgow-exts'])
test('cgrun018', only_compiler_types(['ghc']), compile_and_run, [''])
test('cgrun019', normal, compile_and_run, [''])
test('cgrun020', normal, compile_and_run, [''])
test('cgrun021', normal, compile_and_run, [''])
......@@ -28,11 +28,11 @@ test('cgrun025', compose(reqlib('regex-compat'), compose(extra_run_opts('cg025.h
test('cgrun026', only_compiler_types(['ghc']), compile_and_run, [''])
test('cgrun027', normal, compile_and_run, [''])
test('cgrun028', normal, compile_and_run, [''])
test('cgrun031', only_compiler_types(['ghc']), compile_and_run, ['-fglasgow-exts'])
test('cgrun032', only_compiler_types(['ghc']), compile_and_run, ['-fglasgow-exts'])
test('cgrun033', only_compiler_types(['ghc']), compile_and_run, ['-fglasgow-exts'])
test('cgrun031', only_compiler_types(['ghc']), compile_and_run, [''])
test('cgrun032', only_compiler_types(['ghc']), compile_and_run, [''])
test('cgrun033', only_compiler_types(['ghc']), compile_and_run, [''])
test('cgrun034', normal, compile_and_run, [''])
test('cgrun035', normal, compile_and_run, ['-fglasgow-exts'])
test('cgrun035', normal, compile_and_run, [''])
test('cgrun036', normal, compile_and_run, [''])
test('cgrun037', normal, compile_and_run, [''])
test('cgrun038', normal, compile_and_run, [''])
......
{-# LANGUAGE MagicHash #-}
-- !!! move arguments around on the stacks, mainly the B stack
import GHC.Base ( Float#, Double#, Int#, Int(..) )
......
{-# LANGUAGE MagicHash #-}
module Main ( main ) where
import Foreign
......
{-# LANGUAGE MagicHash #-}
-- !!! test of datatype with many unboxed fields
--
import GHC.Base( Float# )
......
{-# OPTIONS -fglasgow-exts #-}
{-# LANGUAGE MagicHash #-}
-- !!! simple tests of primitive arrays
--
......
{-# LANGUAGE MagicHash #-}
-- !! test GEN reps w/ unboxed values in them
-- !! NB: it was the static ones that were hosed...
--
......
{-# LANGUAGE MagicHash #-}
-- !! pattern-matching failure on functions that return Int#
--import PrelBase --ghc1.3
......
{-# LANGUAGE MagicHash #-}
-- !! worker/wrapper turns ( \ <absent> -> Int# ) function
-- !! into Int# -- WRONG
......
{-# OPTIONS -fglasgow-exts #-}
module Main( main ) where
......
{-# OPTIONS -fglasgow-exts #-}
module Main where
......
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
module Collection where
......
{-# OPTIONS -fglasgow-exts #-}
module Main where
......
{-# OPTIONS -fglasgow-exts #-}
module Main where
......
{-# OPTIONS -fglasgow-exts #-}
module Main where
......
{-# OPTIONS -fglasgow-exts #-}
module Main where
......
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# LANGUAGE UnboxedTuples #-}
-- This one killed GHC 6.4.1, because the pattern match on the
-- unboxed tuple generates a failure case, which defeated the
......
{-# OPTIONS -fglasgow-exts #-}
{-# LANGUAGE UnboxedTuples #-}
module Main where
......
{-# OPTIONS -fglasgow-exts #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE UndecidableInstances,
MultiParamTypeClasses, FunctionalDependencies #-}
-- The Show instance for S would have form
-- instance X T c => Show S
......
{-# OPTIONS -fglasgow-exts #-}
-- Made GHC 5.02.2 go into a loop when doing the
-- context inference for deriving. The -fglasgow-exts
-- flag is important; it didn't diverge without.
{-# LANGUAGE FlexibleContexts #-}
-- Made GHC 5.02.2 go into a loop when doing the
-- context inference for deriving. It only happened with
-- the -fglasgow-exts flag (it didn't diverge without),
-- so hopefully FlexibleContexts is the relevant extension.
module ShouldFail where
......
{-# OPTIONS -fglasgow-exts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- Testing the newtype-deriving stuff
......
-- Should fail without -fglasgow-exts
-- Succeeds with -fglasgow-exts
-- Should fail without GeneralizedNewtypeDeriving
-- Succeeds with GeneralizedNewtypeDeriving
module ShouldFail where
......
{-# OPTIONS -fglasgow-exts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- Various newtype-deriving failures
......
{-# OPTIONS -fglasgow-exts #-}
{-# LANGUAGE DeriveDataTypeable #-}
module ShouldFail where
import Data.Typeable
......
{-# OPTIONS -fglasgow-exts #-}
{-# LANGUAGE MagicHash #-}
-- Test Show on unboxed types
......
{-# OPTIONS -fglasgow-exts #-}
-- Test Show on unboxed types
......
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- Tests newtype deriving with
-- a non-type constructor in the representation
......
{-# OPTIONS -fglasgow-exts #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Main where
......
......@@ -9,8 +9,8 @@ clean:
recomp005: clean
cp C1.hs C.hs
'$(TEST_HC)' -fglasgow-exts --make E.hs -O
'$(TEST_HC)' --make E.hs -O
sleep 1
cp C2.hs C.hs
# Should recompile E, because C is now an orphan
'$(TEST_HC)' -fglasgow-exts --make E.hs -O
'$(TEST_HC)' --make E.hs -O
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# LANGUAGE UnliftedFFITypes #-}
-- !!! cc004 -- foreign declarations
module ShouldCompile where
......
def f( opts ):
opts.extra_hc_opts = '-fglasgow-exts'
setTestOpts(f)
# Missing:
# test('cc002', normal, compile_fail, [''])
......
{-# OPTIONS -fglasgow-exts #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE ForeignFunctionInterface, MagicHash #-}
-- Trac #1037
......
{-# OPTIONS -fglasgow-exts #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE ForeignFunctionInterface, UnboxedTuples, MagicHash, UnliftedFFITypes #-}
-- Test for Trac #1680
......
{-# LANGUAGE UnliftedFFITypes, MagicHash #-}
-- !!! illegal types in foreign export delarations
module ShouldFail where
import GHC.Exts
......
......@@ -4,12 +4,6 @@
# extra run flags
# expected process return value, if not zero
def f( opts ):
opts.extra_hc_opts = '-fglasgow-exts'
setTestOpts(f)
# Doesn't work with External Core due to __labels
test('fed001', compose(only_compiler_types(['ghc']),
expect_fail_for(['extcore','optextcore'])),
......
{-# OPTIONS -fglasgow-exts #-}
-- !!! A simple FFI test
......
{-# OPTIONS -fglasgow-exts -cpp #-}
{-# LANGUAGE CPP #-}
import Char
#if __GLASGOW_HASKELL__ >= 503
import Data.Array
......
-- TH generated code does not get instrumented
:set -fglasgow-exts
:set -XTemplateHaskell
:l dynbrk005
:st normal_fn [1,2,3]
......
#!/usr/bin/env runhaskell
{-# OPTIONS_GHC -fglasgow-exts #-}
--
-- Uses multi-param type classes
--
......
#!/usr/bin/env runhaskell
{-# OPTIONS_GHC -fglasgow-exts #-}
--
-- Uses multi-param type classes
--
......
#!/usr/bin/env runhaskell
{-# OPTIONS_GHC -fglasgow-exts #-}
--
-- Uses multi-param type classes
--
......
{-# OPTIONS -fglasgow-exts #-}
module Main where
......
{-# OPTIONS_GHC -fglasgow-exts #-}
import Text.Regex.Base
import Text.Regex.Posix((=~),(=~~)) -- or DFA or PCRE or PosixRE
import qualified Data.ByteString.Char8 as B(ByteString,pack)
......
{-# OPTIONS_GHC -fglasgow-exts #-}
import Text.Regex.Base
import Text.Regex.Posix(Regex,(=~),(=~~)) -- or DFA or PCRE or PosixRE
import qualified Data.ByteString.Char8 as B(ByteString,pack)
......
......@@ -5,7 +5,7 @@
% Hashing memo tables.
\begin{code}
{-# OPTIONS -fglasgow-exts -cpp #-}
{-# LANGUAGE CPP #-}
module Memo1
{-# DEPRECATED "This module is unmaintained, and will disappear soon" #-}
......
......@@ -5,7 +5,7 @@
% Hashing memo tables.
\begin{code}
{-# OPTIONS -fglasgow-exts -cpp #-}
{-# LANGUAGE CPP #-}
module Memo2
{-# DEPRECATED "This module is unmaintained, and will disappear soon" #-}
......
......@@ -52,4 +52,4 @@ test('stableptr003', normal, compile_and_run, [''])
test('stableptr004', extra_run_opts('+RTS -K4m -RTS'), compile_and_run, [''])
test('stableptr005', normal, compile_and_run, [''])
test('weak001', normal, compile_and_run, ['-fglasgow-exts'])
test('weak001', normal, compile_and_run, [''])
{-# OPTIONS -fglasgow-exts #-}
module Main (main) where
......
{-# OPTIONS -fglasgow-exts #-}
module Main where
......
-- {-# OPTIONS -fglasgow-exts #-}
-- use of mdo requires -fglasgow-exts to be given,
-- so let's try leaving it out
-- use of mdo requires an extension,
-- so let's try not enabling it
module Main (main) where
......
......@@ -38,11 +38,11 @@ test('numrun011', normal, compile_and_run, [''])
test('numrun012', normal, compile_and_run, [''])
test('numrun013', normal, compile_and_run, [''])
test('numrun014', normal, compile_and_run, [''])
test('arith016', compose(normal,only_compiler_types(['ghc'])), compile_and_run, ['-fglasgow-exts'])
test('arith016', compose(normal,only_compiler_types(['ghc'])), compile_and_run, [''])
test('arith017', normal, compile_and_run, [''])
test('arith018', normal, compile_and_run, [''])
test('arith019', normal, compile_and_run, [''])
test('expfloat', normal, compile_and_run, ['-fglasgow-exts'])
test('expfloat', normal, compile_and_run, [''])
test('1603', skip, compile_and_run, ['-fglasgow-exts'])
test('1603', skip, compile_and_run, [''])
test('3676', expect_broken(3676), compile_and_run, [''])
{-# LANGUAGE MagicHash #-}
-- tests that expFloat# works (had linking problems on Windows)
import GHC.Exts
......
......@@ -11,7 +11,7 @@ test('readFail009', normal, compile_fail, [''])
# test10: missing
test('readFail011', normal, compile_fail, [''])
test('readFail012', normal, compile_fail, [''])
test('readFail013', normal, compile_fail, ['-fglasgow-exts'])
test('readFail013', normal, compile_fail, [''])
test('readFail014', normal, compile_fail, [''])
test('readFail015', normal, compile_fail, [''])
test('readFail016', normal, compile_fail, [''])
......
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# LANGUAGE MagicHash #-}
-- !!! Negative unboxed literals, part 1
-- They don't have to be as standards-compliant
-- or follow so many weird cases as the normal
......
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# LANGUAGE MagicHash #-}
-- !!! Negative unboxed literals, part 2
import GHC.Exts
......
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# LANGUAGE ExplicitForAll, UnicodeSyntax #-}
{-
Test for valid unicode identifiers
......
-- A second test for trac #3001, which segfaults when compiled by
-- GHC 6.10.1 and run with +RTS -hb. Most of the code is frmo the
-- GHC 6.10.1 and run with +RTS -hb. Most of the code is from the
-- binary 0.4.4 package.
{-# OPTIONS_GHC -fglasgow-exts #-}
{-# LANGUAGE CPP, FlexibleInstances, FlexibleContexts #-}
module Main (main) where
......
\section{Versions of {\tt append}}
\begin{code}
{-# LANGUAGE MagicHash #-}
module Append where
import GHC.Exts
......
\begin{code}
{-# LANGUAGE MagicHash #-}
import GHC.Exts
import Types
import Append
......
\section{IDS types}
\begin{code}
{-# LANGUAGE MagicHash #-}
module Types where
import GHC.Exts
......
......@@ -6,5 +6,5 @@ test('cvh_unboxing',
'Main.hi', 'Main.o',
'Types.hi', 'Types.o'])],
multimod_compile_and_run,
['Main', '-fglasgow-exts'])
['Main', ''])
......@@ -4,5 +4,5 @@ test('fast2haskell',
extra_clean(['Main.hi', 'Main.o',
'Fast2haskell.hi', 'Fast2haskell.o'])],
multimod_compile_and_run,
['Main', '-fglasgow-exts'])
['Main', ''])
{-# OPTIONS -fglasgow-exts #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE UndecidableInstances, ExistentialQuantification,
ScopedTypeVariables, Rank2Types #-}
-- Modular arithmetic, due to Dale Thurston
......
{-# OPTIONS -fglasgow-exts #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies,
UndecidableInstances, ExistentialQuantification,
ScopedTypeVariables #-}
-- TypeVal.hs: dependent types, here we come!
module TypeVal where
......
{-# OPTIONS -fglasgow-exts -XNoImplicitPrelude -XNPlusKPatterns #-}
{-# LANGUAGE NoImplicitPrelude, NPlusKPatterns #-}
module Main where
{
......
{-# OPTIONS -fglasgow-exts -XNoImplicitPrelude -XNPlusKPatterns #-}
{-# LANGUAGE NoImplicitPrelude, NPlusKPatterns #-}
module Main where
{
......
{-# OPTIONS -fglasgow-exts -XNoImplicitPrelude -XNPlusKPatterns #-}
{-# LANGUAGE NoImplicitPrelude, NPlusKPatterns #-}
module Main where
{
......
{-# OPTIONS -fglasgow-exts -XNoImplicitPrelude -XNPlusKPatterns #-}
{-# LANGUAGE NoImplicitPrelude, NPlusKPatterns, TypeSynonymInstances,
MultiParamTypeClasses, FunctionalDependencies #-}
module Main where
{
......
{-# OPTIONS -fglasgow-exts -XNoImplicitPrelude -XNPlusKPatterns #-}
{-# LANGUAGE NoImplicitPrelude, NPlusKPatterns, Rank2Types,
ScopedTypeVariables, FlexibleInstances #-}
module Main where
{
-- import Prelude;
......
{-# OPTIONS -fglasgow-exts -O -cpp #-}
{-# LANGUAGE CPP, UnboxedTuples, MagicHash #-}
{-# OPTIONS_GHC -O #-}
-- In GHC 6.4, compiling this module gave a Core Lint failure following the
-- specialier, because a function was floated out that had a RULE that
......