Skip to content
Snippets Groups Projects
Commit 16ff3d46 authored by sof's avatar sof
Browse files

[project @ 1997-09-03 23:33:46 by sof]

moved from ghc/compiler/tests/etc
parent 118b33a1
No related merge requests found
import MiniPrel
a :: Array Int Int
a = array (1,100) ((1 := 1) : [i := i * a!(i-1) | i <- [2..100]])
-- this is legal, I think (WDP)
module Confused where
import Prelude hiding (otherwise)
otherwise = False
f x | otherwise = 1
g otherwise | otherwise = 2
{-
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)
-- 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment