[project @ 1997-05-26 05:48:07 by sof]
authorsof <unknown>
Mon, 26 May 1997 05:49:14 +0000 (05:49 +0000)
committersof <unknown>
Mon, 26 May 1997 05:49:14 +0000 (05:49 +0000)
Updated for 2.03

17 files changed:
ghc/compiler/tests/simplCore/Makefile
ghc/compiler/tests/simplCore/simpl001.hs
ghc/compiler/tests/simplCore/simpl001.stderr
ghc/compiler/tests/simplCore/simpl002.hs
ghc/compiler/tests/simplCore/simpl002.stderr
ghc/compiler/tests/stranal/default.lhs
ghc/compiler/tests/stranal/fact.lhs
ghc/compiler/tests/stranal/fun.lhs
ghc/compiler/tests/stranal/goo.lhs
ghc/compiler/tests/stranal/ins.lhs
ghc/compiler/tests/stranal/map.lhs
ghc/compiler/tests/stranal/moo.lhs
ghc/compiler/tests/stranal/sim.lhs
ghc/compiler/tests/stranal/syn.lhs
ghc/compiler/tests/stranal/test.lhs
ghc/compiler/tests/stranal/tst.lhs
ghc/compiler/tests/stranal/unu.lhs

index 6f36b84..ee2596f 100644 (file)
@@ -1,7 +1,16 @@
-TOP = ../../../..
-GhcRunTestRules = YES
-# These options apply to all tests
-RUNSTDTEST_OPTS = -noC -O -ddump-simpl -dcore-lint
-include $(TOP)/ghc/mk/ghc.mk
+TOP = ../../..
+include $(TOP)/mk/boilerplate.mk
 
-runtests :: $(patsubst %.hs, %.runtest, $(wildcard *.hs))
+HS_SRCS = $(wildcard *.hs)
+
+SRC_RUNTEST_OPTS += -accept-output -o1 $*.stdout -o2 $*.stderr -x 0
+HC_OPTS += -noC -O -ddump-simpl -dcore-lint
+
+%.o : %.hs
+
+%.o : %.hs
+       $(RUNTEST) $(HC) $(RUNTEST_OPTS) $(HC_OPTS) -c $< -o $@ -osuf $(subst .,,$(suffix $@)) 
+
+all :: $(HS_OBJS)
+
+include $(TOP)/mk/target.mk
index 79e00ec..c481365 100644 (file)
@@ -3,6 +3,7 @@
 -- only tickled by the simplifier
 
 -- type Foo a b = a -> (b -> a) -> b
+module Test where
 
 (++++) :: (a -> (b -> a) -> b) -> (a -> (b -> a) -> b) -> a -> (b -> a) -> b
 x ++++ y = y
index e69de29..b1ee08d 100644 (file)
@@ -0,0 +1,111 @@
+
+
+================================================================================
+Simplified:
+++++{-r3h,x-}  :: 
+    _forall_
+    [a{-auX-} b{-auY-}]
+    =>
+    (a{-auX-} -> (b{-auY-} -> a{-auX-}) -> b{-auY-})
+    -> (a{-auX-} -> (b{-auY-} -> a{-auX-}) -> b{-auY-})
+    -> a{-auX-}
+    -> (b{-auY-} -> a{-auX-})
+    -> b{-auY-}
+_A>_ 2 {-# L #-}
+++++{-r3h,x-} =
+    _/\_ a{-sE8-} b{-sE9-} -> \ x_sDl  :: 
+                                   a{-sE8-} -> (b{-sE9-} -> a{-sE8-}) -> b{-sE9-}
+                               {-# L #-}
+                               x_sDl y_sCR  :: 
+                                         a{-sE8-} -> (b{-sE9-} -> a{-sE8-}) -> b{-sE9-}
+                                     {-# L #-}
+                                     y_sCR ->
+       y_sCR
+g{-r3j,x-}  :: 
+    _forall_
+    [a{-avh-} b{-avi-} rk0{-avq-}]
+    =>
+    {PrelBase.Functor{-2b,p-} rk0{-avq-}}
+    -> (a{-avh-} -> (b{-avi-} -> a{-avh-}) -> b{-avi-})
+    -> rk0{-avq-} (a{-avh-} -> (b{-avi-} -> a{-avh-}) -> b{-avi-})
+    -> rk0{-avq-} (a{-avh-} -> (b{-avi-} -> a{-avh-}) -> b{-avi-})
+_A>_ 3 {-# L #-}
+g{-r3j,x-} =
+    _/\_ a{-sEd-} b{-sEe-} rk0{-sEf-} -> \ d.Functor_sDp  :: 
+                                              {PrelBase.Functor{-2b,p-} rk0{-sEf-}}
+                                          {-# L #-}
+                                          d.Functor_sDp a_sDk  :: 
+                                                            a{-sEd-}
+                                                            -> (b{-sEe-} -> a{-sEd-})
+                                                            -> b{-sEe-}
+                                                        {-# L #-}
+                                                        a_sDk xs_sDV  :: 
+                                                                  rk0{-sEf-} (a{-sEd-}
+                                                                              -> (b{-sEe-}
+                                                                                  -> a{-sEd-})
+                                                                              -> b{-sEe-})
+                                                              {-# L #-}
+                                                              xs_sDV ->
+       let {
+         ds_sDr  :: 
+             (a{-sEd-} -> (b{-sEe-} -> a{-sEd-}) -> b{-sEe-})
+             -> a{-sEd-}
+             -> (b{-sEe-} -> a{-sEd-})
+             -> b{-sEe-}
+         _A>_ 1 {-# L #-}
+         ds_sDr =
+             \ ds_sDq  :: 
+                   a{-sEd-} -> (b{-sEe-} -> a{-sEd-}) -> b{-sEe-}
+               {-# L #-}
+               ds_sDq ->
+                 a_sDk
+       } in 
+         d.Functor_sDp
+             _@_ (a{-sEd-} -> (b{-sEe-} -> a{-sEd-}) -> b{-sEe-})
+             _@_ (a{-sEd-} -> (b{-sEe-} -> a{-sEd-}) -> b{-sEe-})
+             ds_sDr
+             xs_sDV
+h{-r3i,x-}  :: 
+    _forall_
+    [a{-avI-} b{-avK-} rk0{-avT-}]
+    =>
+    {PrelBase.Functor{-2b,p-} rk0{-avT-}}
+    -> (a{-avI-} -> (b{-avK-} -> a{-avI-}) -> b{-avK-})
+    -> rk0{-avT-} (a{-avI-} -> (b{-avK-} -> a{-avI-}) -> b{-avK-})
+    -> rk0{-avT-} (a{-avI-} -> (b{-avK-} -> a{-avI-}) -> b{-avK-})
+_A>_ 3 {-# L #-}
+h{-r3i,x-} =
+    _/\_ a{-sEl-} b{-sEm-} rk0{-sEn-} -> \ d.Functor_sDZ  :: 
+                                              {PrelBase.Functor{-2b,p-} rk0{-sEn-}}
+                                          {-# L #-}
+                                          d.Functor_sDZ b_sEg  :: 
+                                                            a{-sEl-}
+                                                            -> (b{-sEm-} -> a{-sEl-})
+                                                            -> b{-sEm-}
+                                                        {-# L #-}
+                                                        b_sEg xs_sEh  :: 
+                                                                  rk0{-sEn-} (a{-sEl-}
+                                                                              -> (b{-sEm-}
+                                                                                  -> a{-sEl-})
+                                                                              -> b{-sEm-})
+                                                              {-# L #-}
+                                                              xs_sEh ->
+       let {
+         ds_sE0  :: 
+             (a{-sEl-} -> (b{-sEm-} -> a{-sEl-}) -> b{-sEm-})
+             -> a{-sEl-}
+             -> (b{-sEm-} -> a{-sEl-})
+             -> b{-sEm-}
+         _A>_ 1 {-# L #-}
+         ds_sE0 =
+             \ ds_sDU  :: 
+                   a{-sEl-} -> (b{-sEm-} -> a{-sEl-}) -> b{-sEm-}
+               {-# L #-}
+               ds_sDU ->
+                 ds_sDU
+       } in 
+         d.Functor_sDZ
+             _@_ (a{-sEl-} -> (b{-sEm-} -> a{-sEl-}) -> b{-sEm-})
+             _@_ (a{-sEl-} -> (b{-sEm-} -> a{-sEl-}) -> b{-sEm-})
+             ds_sE0
+             xs_sEh
index 206e861..578c13a 100644 (file)
@@ -1,5 +1,6 @@
 --!!! class/instance mumble that failed Lint at one time
 --
+module Test where
 class Foo a where
    op :: Int -> a -> Bool
 
index e69de29..49ad874 100644 (file)
@@ -0,0 +1,138 @@
+
+
+================================================================================
+Simplified:
+nrlit_sMT  :: 
+    [PrelBase.Char{-38,p-}]
+{-# L #-}
+nrlit_sMT =
+    PackedString.unpackCString#{-8F,p-}
+       "xxx"
+$d1{-rJ7,x-}  :: 
+    _forall_
+    [a{-r3g-} b{-r3h-} c{-r3i-}]
+    =>
+    {Foo{-r3j,x-} a{-r3g-}}
+    -> {Foo{-r3j,x-} b{-r3h-}}
+    -> {Foo{-r3j,x-} c{-r3i-}}
+    -> {Foo{-r3j,x-} (Wibble{-r3y,x-} a{-r3g-} b{-r3h-} c{-r3i-})}
+_A>_ 3 {-# L #-}
+$d1{-rJ7,x-} =
+    _/\_ a{-sMG-} b{-sMH-} c{-sMI-} -> \ d.Foo_sLN  :: 
+                                            {Foo{-r3j,x-} a{-sMG-}}
+                                        {-# L #-}
+                                        d.Foo_sLN d.Foo_sLM  :: 
+                                                      {Foo{-r3j,x-} b{-sMH-}}
+                                                  {-# L #-}
+                                                  d.Foo_sLM d.Foo_sLL  :: 
+                                                                {Foo{-r3j,x-} c{-sMI-}}
+                                                            {-# L #-}
+                                                            d.Foo_sLL ->
+       let {
+         op_sLp  :: 
+             PrelBase.Int{-3g,p-}
+             -> Wibble{-r3y,x-} a{-sMG-} b{-sMH-} c{-sMI-}
+             -> PrelBase.Bool{-34,p-}
+         _A>_ 2 {-# L #-}
+         op_sLp =
+             \ x_sLs  :: 
+                   PrelBase.Int{-3g,p-}
+               {-# L #-}
+               x_sLs y_sLq  :: 
+                         Wibble{-r3y,x-} a{-sMG-} b{-sMH-} c{-sMI-}
+                     {-# L #-}
+                     y_sLq ->
+                 IOBase.error{-87,p-}
+                     _@_ PrelBase.Bool{-34,p-} nrlit_sMT } in
+       let {
+         op_sLO  :: 
+             PrelBase.Int{-3g,p-}
+             -> Wibble{-r3y,x-} a{-sMG-} b{-sMH-} c{-sMI-}
+             -> PrelBase.Bool{-34,p-}
+         _A>_ 2 {-# L #-}
+         op_sLO =
+             op_sLp } in
+       let {
+         d.Foo_sLP  :: 
+             {Foo{-r3j,x-} (Wibble{-r3y,x-} a{-sMG-} b{-sMH-} c{-sMI-})}
+         _A>_ 2 {-# L #-}
+         d.Foo_sLP =
+             op_sLp
+       } in 
+         op_sLp
+$d2{-rJ2,x-}  :: 
+    _forall_
+    [a{-r3s-} b{-r3t-} c{-r3u-}]
+    =>
+    {PrelBase.Eval{-24,p-} (Wibble{-r3y,x-} a{-r3s-} b{-r3t-} c{-r3u-})}
+_A>_ 0 {-# L #-}
+$d2{-rJ2,x-} =
+    _/\_ a{-sMV-} b{-sMW-} c{-sMX-} ->
+       let {
+         d.Eval_sM2  :: 
+             {PrelBase.Eval{-24,p-} (Wibble{-r3y,x-} a{-sMV-} b{-sMW-} c{-sMX-})}
+         {-# L #-}
+         d.Eval_sM2 =
+             PrelBase.void{-8G,p-}
+       } in 
+         PrelBase.void{-8G,p-}
+nrlit_sMU  :: 
+    [PrelBase.Char{-38,p-}]
+{-# L #-}
+nrlit_sMU =
+    PackedString.unpackCString#{-8F,p-}
+       "Class Foo Method op"
+$mop{-rIV,x-}  :: 
+    _forall_
+    [a{-r3w-}]
+    =>
+    {Foo{-r3j,x-} a{-r3w-}}
+    -> PrelBase.Int{-3g,p-}
+    -> a{-r3w-}
+    -> PrelBase.Bool{-34,p-}
+_A>_ 3 {-# L #-}
+$mop{-rIV,x-} =
+    _/\_ a{-sMJ-} -> \ d.Foo_sMg  :: 
+                          {Foo{-r3j,x-} a{-sMJ-}}
+                      {-# L #-}
+                      d.Foo_sMg ->
+       GHCerr.noDefaultMethodError{-8k,p-}
+           _@_ (PrelBase.Int{-3g,p-} -> a{-sMJ-} -> PrelBase.Bool{-34,p-})
+           nrlit_sMU
+op{-r3z,x-}  :: 
+    _forall_
+    [a{-r3w-}]
+    =>
+    {Foo{-r3j,x-} a{-r3w-}}
+    -> PrelBase.Int{-3g,p-}
+    -> a{-r3w-}
+    -> PrelBase.Bool{-34,p-}
+_A>_ 1 {-# L #-}
+op{-r3z,x-} =
+    _/\_ a{-sMK-} -> \ tpl_sMf  :: 
+                          {Foo{-r3j,x-} a{-sMK-}}
+                      {-# L #-}
+                      tpl_sMf ->
+       tpl_sMf
+MkWibble{-r3x,x-}{i}  :: 
+    _forall_
+    [a{-r3s-} b{-r3t-} c{-r3u-}]
+    =>
+    a{-r3s-}
+    -> b{-r3t-}
+    -> c{-r3u-}
+    -> Wibble{-r3y,x-} a{-r3s-} b{-r3t-} c{-r3u-}
+_A>_ 3 {-# L #-}
+MkWibble{-r3x,x-}{i} =
+    _/\_ a{-sMO-} b{-sMP-} c{-sMQ-} -> \ tpl_sML  :: 
+                                            a{-sMO-}
+                                        {-# L #-}
+                                        tpl_sML tpl_sMM  :: 
+                                                    b{-sMP-}
+                                                {-# L #-}
+                                                tpl_sMM tpl_sMN  :: 
+                                                            c{-sMQ-}
+                                                        {-# L #-}
+                                                        tpl_sMN ->
+       MkWibble{-r3x,x-}{i}
+           {_@_ a{-sMO-} _@_ b{-sMP-} _@_ c{-sMQ-} tpl_sML tpl_sMM tpl_sMN}
index 010e8d5..8557aa6 100644 (file)
@@ -1,3 +1,4 @@
+> module Test where
 > data Boolean = FF | TT
 > data Pair a b = MkPair a b
 > data LList alpha = Nill | Conss alpha (LList alpha) 
index 2507c6b..20b2256 100644 (file)
@@ -1,2 +1,3 @@
+> module Test where
 > fact :: Int -> Int
 > fact n = if n==0 then 2 else (fact n) * n
index d86208b..8ab0832 100644 (file)
@@ -1,3 +1,4 @@
+> module Test where
 > data Fun = MkFun (Fun -> Fun)
 > data LList a = Nill | Conss a (LList a)
 
index ddf666b..c58b998 100644 (file)
@@ -1,3 +1,4 @@
+> module Test where
 > data Goo a = Gsimpl | Gcompl ([Goo a]) 
 > data Moo a b = Msimple | Mcompl (Moo b a)
 
index 120b46f..71f8ce2 100644 (file)
@@ -1,6 +1,7 @@
 TEST OF DEFACTORISATION FOR FUNCTIONS THAT DROP 
              POLYMORPHIC VARIABLES
 
+> module Test where
 > data Boolean = FF | TT
 > data Pair a b = MkPair a b
 > data LList alpha = Nill | Conss alpha (LList alpha) 
index d79ec03..343e36a 100644 (file)
@@ -1,3 +1,4 @@
+> module Test where
 > data Boolean = FF | TT
 > data Pair a b = MkPair a b
 > data LList alpha = Nill | Conss alpha (LList alpha) 
index 3d6226b..35967ba 100644 (file)
@@ -1,3 +1,4 @@
+> module Test where
 > data Moo a b = Msimple | Mcompl (Moo b a)
 
 
index c788681..6c52104 100644 (file)
@@ -1,3 +1,4 @@
+> module Test where
 > data Boolean = FF | TT
 > data Pair a b = MkPair a b
 > data LList alpha = Nill | Conss alpha (LList alpha) 
index 00da926..59d6bac 100644 (file)
@@ -1,5 +1,6 @@
 THIS TEST IS FOR TYPE SYNONIMS AND FACTORISATION IN THEIR PRESENCE.
 
+> module Test where
 > data M a = A | B a (M a)
 > data L a = N | C a (Syn a)
 > type Syn b = L b
index d1e1925..f89509a 100644 (file)
@@ -1,3 +1,4 @@
+> module Test where
 > data LList t = Nill | Conss t (LList t)
 > data BBool = TTrue | FFalse
 
index 5353935..edaf20d 100644 (file)
@@ -1,2 +1,3 @@
+> module Test where
 > a :: [a] -> [[a]]
 > a x = [x]
index 3932285..da6370c 100644 (file)
@@ -1,3 +1,4 @@
+> module Test where
 > data Boolean = FF | TT
 > data Pair a b = Mkpair a b
 > data LList alpha = Nill | Conss alpha (LList alpha)