summaryrefslogtreecommitdiff
path: root/testsuite/tests/th
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2016-02-22 21:31:35 +0100
committerThomas Miedema <thomasmiedema@gmail.com>2016-02-23 12:27:40 +0100
commit8626ac91a3cac028bbe742f07a1ce9fb598589f6 (patch)
treec59cf1f913f513627a2de1e971ca371d402e17f8 /testsuite/tests/th
parent31c312ebd29a4e79c166ad5dbbd5b57b42b6fafa (diff)
downloadhaskell-8626ac91a3cac028bbe742f07a1ce9fb598589f6.tar.gz
Testsuite: delete Windows line endings [skip ci] (#11631)
Diffstat (limited to 'testsuite/tests/th')
-rw-r--r--testsuite/tests/th/T2597a.hs16
-rw-r--r--testsuite/tests/th/T2597a_Lib.hs24
-rw-r--r--testsuite/tests/th/T2597b.hs18
-rw-r--r--testsuite/tests/th/T2597b_Lib.hs18
-rw-r--r--testsuite/tests/th/T2700.hs20
-rw-r--r--testsuite/tests/th/T2713.hs24
-rw-r--r--testsuite/tests/th/T3395.hs18
-rw-r--r--testsuite/tests/th/T3467.hs22
-rw-r--r--testsuite/tests/th/T5404.hs24
-rw-r--r--testsuite/tests/th/T5410.hs16
-rw-r--r--testsuite/tests/th/T5665.hs18
-rw-r--r--testsuite/tests/th/T5737.hs10
-rw-r--r--testsuite/tests/th/T8954.hs30
-rw-r--r--testsuite/tests/th/TH_1tuple.hs30
-rw-r--r--testsuite/tests/th/TH_NestedSplices.hs62
-rw-r--r--testsuite/tests/th/TH_NestedSplices_Lib.hs28
16 files changed, 189 insertions, 189 deletions
diff --git a/testsuite/tests/th/T2597a.hs b/testsuite/tests/th/T2597a.hs
index 3d8c319b47..d403723e43 100644
--- a/testsuite/tests/th/T2597a.hs
+++ b/testsuite/tests/th/T2597a.hs
@@ -1,8 +1,8 @@
-{-# LANGUAGE TemplateHaskell #-}
-
--- Test Trac #2597 (first bug)
-
-module ShouldCompile where
-import T2597a_Lib
-
-bug = $mkBug
+{-# LANGUAGE TemplateHaskell #-}
+
+-- Test Trac #2597 (first bug)
+
+module ShouldCompile where
+import T2597a_Lib
+
+bug = $mkBug
diff --git a/testsuite/tests/th/T2597a_Lib.hs b/testsuite/tests/th/T2597a_Lib.hs
index 0e8f794dc6..ad69ac2954 100644
--- a/testsuite/tests/th/T2597a_Lib.hs
+++ b/testsuite/tests/th/T2597a_Lib.hs
@@ -1,12 +1,12 @@
-{-# LANGUAGE TemplateHaskell #-}
--- Library module for T2597a
-
-module T2597a_Lib where
-import Language.Haskell.TH
-
-
-mkBug :: ExpQ
-mkBug = return $ CompE [BindS (VarP $ mkName "p") (ListE []), NoBindS
- (VarE $ mkName "p")]
-
-
+{-# LANGUAGE TemplateHaskell #-}
+-- Library module for T2597a
+
+module T2597a_Lib where
+import Language.Haskell.TH
+
+
+mkBug :: ExpQ
+mkBug = return $ CompE [BindS (VarP $ mkName "p") (ListE []), NoBindS
+ (VarE $ mkName "p")]
+
+
diff --git a/testsuite/tests/th/T2597b.hs b/testsuite/tests/th/T2597b.hs
index 2fde008388..0e1551ea22 100644
--- a/testsuite/tests/th/T2597b.hs
+++ b/testsuite/tests/th/T2597b.hs
@@ -1,9 +1,9 @@
-{-# LANGUAGE TemplateHaskell #-}
-
--- Test Trac #2597 (second bug)
-
-module ShouldCompile where
-import T2597b_Lib
-
-bug2 = $mkBug2
-
+{-# LANGUAGE TemplateHaskell #-}
+
+-- Test Trac #2597 (second bug)
+
+module ShouldCompile where
+import T2597b_Lib
+
+bug2 = $mkBug2
+
diff --git a/testsuite/tests/th/T2597b_Lib.hs b/testsuite/tests/th/T2597b_Lib.hs
index 1f70c3923a..395166b0b6 100644
--- a/testsuite/tests/th/T2597b_Lib.hs
+++ b/testsuite/tests/th/T2597b_Lib.hs
@@ -1,9 +1,9 @@
-{-# LANGUAGE TemplateHaskell #-}
--- Library module for T2597b
-
-module T2597b_Lib where
-import Language.Haskell.TH
-
-
-mkBug2 :: ExpQ
-mkBug2 = return $ DoE []
+{-# LANGUAGE TemplateHaskell #-}
+-- Library module for T2597b
+
+module T2597b_Lib where
+import Language.Haskell.TH
+
+
+mkBug2 :: ExpQ
+mkBug2 = return $ DoE []
diff --git a/testsuite/tests/th/T2700.hs b/testsuite/tests/th/T2700.hs
index 68a6e6247a..12dc3f056d 100644
--- a/testsuite/tests/th/T2700.hs
+++ b/testsuite/tests/th/T2700.hs
@@ -1,10 +1,10 @@
-{-# LANGUAGE TemplateHaskell #-}
-
-module T2700 where
-import Language.Haskell.TH
-import System.IO
-
-$( do { d <- sigD (mkName "foo") [t| (Int -> Bool) -> Bool |]
- ; runIO (hPutStrLn stderr (pprint d))
- ; return [] }
- )
+{-# LANGUAGE TemplateHaskell #-}
+
+module T2700 where
+import Language.Haskell.TH
+import System.IO
+
+$( do { d <- sigD (mkName "foo") [t| (Int -> Bool) -> Bool |]
+ ; runIO (hPutStrLn stderr (pprint d))
+ ; return [] }
+ )
diff --git a/testsuite/tests/th/T2713.hs b/testsuite/tests/th/T2713.hs
index 980d499603..be93eb417e 100644
--- a/testsuite/tests/th/T2713.hs
+++ b/testsuite/tests/th/T2713.hs
@@ -1,12 +1,12 @@
-{-# LANGUAGE TemplateHaskell #-}
-module Fixity where
-
-class MyClass a where
- (.*.) :: a -> a -> a
-
-f x = x
-
-$( [d| x = undefined |] )
-
-infixr 3 .*.
-f :: Int -> Int
+{-# LANGUAGE TemplateHaskell #-}
+module Fixity where
+
+class MyClass a where
+ (.*.) :: a -> a -> a
+
+f x = x
+
+$( [d| x = undefined |] )
+
+infixr 3 .*.
+f :: Int -> Int
diff --git a/testsuite/tests/th/T3395.hs b/testsuite/tests/th/T3395.hs
index ff3ee4384a..20ca4f7681 100644
--- a/testsuite/tests/th/T3395.hs
+++ b/testsuite/tests/th/T3395.hs
@@ -1,9 +1,9 @@
-{-# LANGUAGE TemplateHaskell #-}
-module T3395 where
-
-import Language.Haskell.TH
-
-foo = $(return $
- CompE
- [NoBindS (VarE $ mkName "undefined")
- ,BindS (VarP $ mkName "r1") (VarE $ mkName "undefined") ])
+{-# LANGUAGE TemplateHaskell #-}
+module T3395 where
+
+import Language.Haskell.TH
+
+foo = $(return $
+ CompE
+ [NoBindS (VarE $ mkName "undefined")
+ ,BindS (VarP $ mkName "r1") (VarE $ mkName "undefined") ])
diff --git a/testsuite/tests/th/T3467.hs b/testsuite/tests/th/T3467.hs
index b439470f31..cf495b9673 100644
--- a/testsuite/tests/th/T3467.hs
+++ b/testsuite/tests/th/T3467.hs
@@ -1,11 +1,11 @@
-{-# LANGUAGE TemplateHaskell #-}
-
--- Test Trac #3467
-
-module T3467 where
-
-import Language.Haskell.TH
-import Foreign
-
-sizeq :: Name -> Q Exp
-sizeq n = [| sizeOf (undefined :: $(conT n)) |]
+{-# LANGUAGE TemplateHaskell #-}
+
+-- Test Trac #3467
+
+module T3467 where
+
+import Language.Haskell.TH
+import Foreign
+
+sizeq :: Name -> Q Exp
+sizeq n = [| sizeOf (undefined :: $(conT n)) |]
diff --git a/testsuite/tests/th/T5404.hs b/testsuite/tests/th/T5404.hs
index 18f21d6914..886833957b 100644
--- a/testsuite/tests/th/T5404.hs
+++ b/testsuite/tests/th/T5404.hs
@@ -1,12 +1,12 @@
-{-# LANGUAGE TemplateHaskell #-}
-
-module T5404 where
-
-foobar :: Int
-foobar = $([|
- let
- bar :: Int
- bar = 5
- in bar
- |])
-
+{-# LANGUAGE TemplateHaskell #-}
+
+module T5404 where
+
+foobar :: Int
+foobar = $([|
+ let
+ bar :: Int
+ bar = 5
+ in bar
+ |])
+
diff --git a/testsuite/tests/th/T5410.hs b/testsuite/tests/th/T5410.hs
index da9e51aa7f..a43ac1702d 100644
--- a/testsuite/tests/th/T5410.hs
+++ b/testsuite/tests/th/T5410.hs
@@ -1,8 +1,8 @@
-{-# LANGUAGE TemplateHaskell #-}
-module Main where
-
-$([d| instance Show (a -> b) where
- showsPrec _ _ = showString "<function>"
- |])
-
-main = print id \ No newline at end of file
+{-# LANGUAGE TemplateHaskell #-}
+module Main where
+
+$([d| instance Show (a -> b) where
+ showsPrec _ _ = showString "<function>"
+ |])
+
+main = print id
diff --git a/testsuite/tests/th/T5665.hs b/testsuite/tests/th/T5665.hs
index 2434e43427..ae6f43e329 100644
--- a/testsuite/tests/th/T5665.hs
+++ b/testsuite/tests/th/T5665.hs
@@ -1,9 +1,9 @@
-{-# LANGUAGE TemplateHaskell #-}
-
-module T5665 where
-
-import T5665a
-
-data Record = Record { recordField :: Int }
-
-$(doSomeTH "SomeType" ''Int)
+{-# LANGUAGE TemplateHaskell #-}
+
+module T5665 where
+
+import T5665a
+
+data Record = Record { recordField :: Int }
+
+$(doSomeTH "SomeType" ''Int)
diff --git a/testsuite/tests/th/T5737.hs b/testsuite/tests/th/T5737.hs
index 1458c78517..1b97b2d154 100644
--- a/testsuite/tests/th/T5737.hs
+++ b/testsuite/tests/th/T5737.hs
@@ -1,5 +1,5 @@
-{-# LANGUAGE TemplateHaskell #-}
-module T5737 where
-
-import Language.Haskell.TH
-makeAlpha n = [d| data Alpha = Alpha $(conT n) deriving (Show, Read) |]
+{-# LANGUAGE TemplateHaskell #-}
+module T5737 where
+
+import Language.Haskell.TH
+makeAlpha n = [d| data Alpha = Alpha $(conT n) deriving (Show, Read) |]
diff --git a/testsuite/tests/th/T8954.hs b/testsuite/tests/th/T8954.hs
index 4aa3081358..521c72912d 100644
--- a/testsuite/tests/th/T8954.hs
+++ b/testsuite/tests/th/T8954.hs
@@ -1,15 +1,15 @@
-{-# LANGUAGE TemplateHaskell, MagicHash, UnboxedTuples #-}
-
-module T8954 where
-
-import Language.Haskell.TH
-
-$( do _ <- reify '(##)
- _ <- reify '(#,#)
- _ <- reify ''(##)
- _ <- reify ''(#,#)
- _ <- reify '()
- _ <- reify ''()
- _ <- reify '[]
- _ <- reify ''[]
- return [] )
+{-# LANGUAGE TemplateHaskell, MagicHash, UnboxedTuples #-}
+
+module T8954 where
+
+import Language.Haskell.TH
+
+$( do _ <- reify '(##)
+ _ <- reify '(#,#)
+ _ <- reify ''(##)
+ _ <- reify ''(#,#)
+ _ <- reify '()
+ _ <- reify ''()
+ _ <- reify '[]
+ _ <- reify ''[]
+ return [] )
diff --git a/testsuite/tests/th/TH_1tuple.hs b/testsuite/tests/th/TH_1tuple.hs
index 3674a5a76c..ea1a1195ab 100644
--- a/testsuite/tests/th/TH_1tuple.hs
+++ b/testsuite/tests/th/TH_1tuple.hs
@@ -1,15 +1,15 @@
-{-# LANGUAGE TemplateHaskell #-}
-
--- Trac #2358
-
-module ShouldFail where
-import Language.Haskell.TH
-
-x = $(sigE [|1|] (tupleT 1 `appT` conT ''Int))
- -- 1 :: (Int) ( a 1-tuple type)
-
-y = $(sigE [|1|] (tupleT 1))
- -- 1 :: (1) (a 1-tuple tycon not applied)
-
-z = $(tupE [ [| "yes" |] ])
- -- ("yes") (a 1-tuple expression)
+{-# LANGUAGE TemplateHaskell #-}
+
+-- Trac #2358
+
+module ShouldFail where
+import Language.Haskell.TH
+
+x = $(sigE [|1|] (tupleT 1 `appT` conT ''Int))
+ -- 1 :: (Int) ( a 1-tuple type)
+
+y = $(sigE [|1|] (tupleT 1))
+ -- 1 :: (1) (a 1-tuple tycon not applied)
+
+z = $(tupE [ [| "yes" |] ])
+ -- ("yes") (a 1-tuple expression)
diff --git a/testsuite/tests/th/TH_NestedSplices.hs b/testsuite/tests/th/TH_NestedSplices.hs
index e16e6da8ff..1af80dbcf9 100644
--- a/testsuite/tests/th/TH_NestedSplices.hs
+++ b/testsuite/tests/th/TH_NestedSplices.hs
@@ -1,31 +1,31 @@
-{-# LANGUAGE TemplateHaskell #-}
-module TH_NestedSplices where
-
-import Language.Haskell.TH
-
-import TH_NestedSplices_Lib
--- This import brings in
--- spliceExpr :: String -> Q Exp -> Q Exp
--- declareFun :: String -> Q [Dec]
-
--- Top level splice without $
-declareFun "a"
-
--- Splice inside splice
-$(declareFun $(stringE "b"))
-
--- Splice inside splice without outer $
-declareFun $(stringE "c")
-
--- Ordinary splicing
-f x = $(spliceExpr "boo" [| x |])
-
--- Splice inside splice
-g x = $(spliceExpr $(litE (stringL "boo")) [| x |])
-
--- Ordinary splice inside bracket
-h1 = [| $(litE (integerL 3)) |]
-
--- Splice inside splice inside bracket
-h2 = [| $(litE ($(varE 'integerL) 3)) |]
-
+{-# LANGUAGE TemplateHaskell #-}
+module TH_NestedSplices where
+
+import Language.Haskell.TH
+
+import TH_NestedSplices_Lib
+-- This import brings in
+-- spliceExpr :: String -> Q Exp -> Q Exp
+-- declareFun :: String -> Q [Dec]
+
+-- Top level splice without $
+declareFun "a"
+
+-- Splice inside splice
+$(declareFun $(stringE "b"))
+
+-- Splice inside splice without outer $
+declareFun $(stringE "c")
+
+-- Ordinary splicing
+f x = $(spliceExpr "boo" [| x |])
+
+-- Splice inside splice
+g x = $(spliceExpr $(litE (stringL "boo")) [| x |])
+
+-- Ordinary splice inside bracket
+h1 = [| $(litE (integerL 3)) |]
+
+-- Splice inside splice inside bracket
+h2 = [| $(litE ($(varE 'integerL) 3)) |]
+
diff --git a/testsuite/tests/th/TH_NestedSplices_Lib.hs b/testsuite/tests/th/TH_NestedSplices_Lib.hs
index 91d6173b91..f6435dfe59 100644
--- a/testsuite/tests/th/TH_NestedSplices_Lib.hs
+++ b/testsuite/tests/th/TH_NestedSplices_Lib.hs
@@ -1,14 +1,14 @@
-{-# LANGUAGE TemplateHaskell #-}
-module TH_NestedSplices_Lib where
-
-import Language.Haskell.TH
-
-spliceExpr :: String -> Q Exp -> Q Exp
-spliceExpr s e = [| (s, $e) |]
-
-declareFun :: String -> Q [Dec]
-declareFun s
- = do { n <- newName s
- ; d <- funD n [clause [] (normalB [| 22 |]) []]
- ; return [d] }
-
+{-# LANGUAGE TemplateHaskell #-}
+module TH_NestedSplices_Lib where
+
+import Language.Haskell.TH
+
+spliceExpr :: String -> Q Exp -> Q Exp
+spliceExpr s e = [| (s, $e) |]
+
+declareFun :: String -> Q [Dec]
+declareFun s
+ = do { n <- newName s
+ ; d <- funD n [clause [] (normalB [| 22 |]) []]
+ ; return [d] }
+