[project @ 1997-09-05 09:16:19 by simonm]
[ghc-hetmet.git] / ghc / tests / codeGen / should_run / cg043.hs
1 --!!! Tickled a bug in core2stg 
2 --!!! (CoreSyn.Coerce constructors were not peeled off
3 --!!! when converting CoreSyn.App)
4
5 module Main where
6 import GlaExts
7
8
9 getData :: String -> PrimIO ()
10 getData filename = case leng filename of {0 -> return ()}
11 leng :: String -> Int
12 leng [] = 0 --case ls of {[] -> 0 ; (_:xs) -> 1 + leng xs }
13 leng ls = leng ls
14
15 f [] [] = []
16 f xs ys = f xs ys
17
18 main =
19     primIOToIO (
20      (return ())  >>= \ _ ->
21      case f [] [] of { [] -> getData [] })