+++ /dev/null
-import MiniPrel
-
-main = (ccall getchar) `thenU` ( \ ch ->
- case ch of
- -1# -> (ccall exit 0#)
- _ -> (ccall putchar ch) `thenU` ( \ _ ->
- main )
- )
+++ /dev/null
-#! /usr/local/bin/perl
-#
-@Make_args = ();
-@Range_args = ();
-
-while ($_ = $ARGV[0]) {
- shift;
- if (/^-/ || /^[A-Z_]+=/) {
- push(@Make_args, $_);
- } else {
- push(@Range_args,$_);
- }
-}
-
-if ($#Range_args != 1) {
- print STDERR "usage: dotest [make-args] from-test to-test\n";
- exit(1);
-}
-$test = $Range_args[0];
-$last_test = $Range_args[1];
-if ($test gt $last_test) {
- print STDERR "_from_ test $test _to_ test $last_test?\n";
-}
-while ($test le $last_test) {
- system("make @Make_args runtest_$test");
- $test++; # string incr
-}
+++ /dev/null
-Prelude = 42
+++ /dev/null
-(+) x y = x
+++ /dev/null
-x = [1..10] where enumFromTo x y = x
+++ /dev/null
-data Bogus = True | False
-True = (3 == 3)
+++ /dev/null
--- literal
------
-
-x = 'a' -- 1
-
------
-
-x = "123" -- 2
-
------
-
-x = 1 -- 3
-
------
-
-x = 1.2
-
------
-
--- exprs
-
------
-
-x = x -- 5
-
------
-
-x = True -- 6
-
------
-
-x = () -- 7
-
------
-
-(x:y) = [1,2] -- 8
-
------
-
-(x:y) = [1,'a'] -- 9
-
------
-
-(x,y) = (1,'a') -- 10
-
------
-
-(x,y) = (1,2,3) -- 11
-
------
-
-(x:y) = (1,'a') -- 12
-
------
-
-x = 1+x -- 13
-
------
-
-x = 1+2 -- 14
-
------
-
-f x = y where y = 2 -- 15
-
------
-
-
-f x = y+2 where y = x+3
-
------
-
-f x = a where a = x:a
-
------
-
-(x:y) = case (if True then True else False) of -- 18
- True -> (True,1)
- False -> (1,True)
-
------
-
-f x = \ (y,z) -> x -- 19
-
------
-
-(x:y) = [y+1 | (y,z) <- [(1,2)]] -- 20
-
------
-
-x = if True then 1 else 2
-
------
-
-(z@(q,w)) = if True then (1,2) else (1,3)
-
------
-
-x = [1..2]
-
------
-
-
+++ /dev/null
--- grhss
------
-
-f x | True = x+1 -- 1
- | False = True
-
------
-
-x | True = x+1 -- 2
- | False = x
-
------
-
-
-
-
+++ /dev/null
--- matches
------
-f x = case x of
- True -> True
- False -> x
-
------
-
-f ((x:a),y) = x
-f (a,b) = 2
-
------
+++ /dev/null
--- monobinds
------
-
-a = 1:a
-
------
-
-a = 2
-
-b = 1:a:c
-
-c = 0:b
-
------
-
-a = 1
-
-b = a+a
-
------
-
-f = \ y -> y
-
-g x = x
-
------
-
-f True = 1
-
-f False = 0
-
------
-
-f (x:y) = x
-
-f z = z
-
------
-
-f (True,x) = x
-
-f (False,y) = y+1
-
------
-
+++ /dev/null
--- mrule
------
-
-x = \ (y:z) -> z+2
-
------
-
+++ /dev/null
--- pats
------
-
-_ = 2 --
-
------
-
-x = 2 --
-
------
-
-(z@(x:y)) = z --
-
------
-
-~(x,y) = x --
-
------
-
-f True = 1
-
-f False = 0
-
------
-
-
+++ /dev/null
-import MiniPrel
-
-a :: Array Int Int
-a = array (1,100) ((1 := 1) : [i := i * a!(i-1) | i <- [2..100]])
+++ /dev/null
--- this is legal, I think (WDP)
-
-module Confused where
-
-import Prelude hiding (otherwise)
-
-otherwise = False
-
-f x | otherwise = 1
-
-g otherwise | otherwise = 2
+++ /dev/null
-{-
-From: Kubiak Ryszard <fozzie>
-To: partain
-Subject: You may test the new pretty-printer on the following text:
-Date: Wed, 2 Oct 91 18:06:05 BST
--}
-
-data LList alpha = Nill | Conss alpha (LList alpha)
-
-append :: LList a -> LList a -> LList a
-append xs ys = case xs of
- Nill -> ys
- (Conss z zs) -> Conss z (append zs ys)
+++ /dev/null
--- what error do you get if you redefined PreludeCore instances?
-
-module Test where
-
-f x@(a,b) y@(c,d) = x == y
-
-instance Eq (a,b) where
- (m,n) == (o,p) = m == o