X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Fcompiler%2Ftests%2FdeSugar%2Fds032.hs;fp=ghc%2Fcompiler%2Ftests%2FdeSugar%2Fds032.hs;h=a1cda8468e104c51de8ff03db87943852cb6db14;hb=e7d21ee4f8ac907665a7e170c71d59e13a01da09;hp=0000000000000000000000000000000000000000;hpb=e48474bff05e6cfb506660420f025f694c870d38;p=ghc-hetmet.git diff --git a/ghc/compiler/tests/deSugar/ds032.hs b/ghc/compiler/tests/deSugar/ds032.hs new file mode 100644 index 0000000..a1cda84 --- /dev/null +++ b/ghc/compiler/tests/deSugar/ds032.hs @@ -0,0 +1,14 @@ +--!!! recursive funs tangled in an AbsBind + +flatten :: Int -- Indentation + -> Bool -- True => just had a newline + -> Float -- Current seq to flatten + -> [(Int,Float)]-- Work list with indentation + -> String + +flatten n nlp 0.0 seqs = flattenS nlp seqs +flatten n nlp 1.0 seqs = flatten n nlp 1.1 ((n,1.2) : seqs) + +flattenS :: Bool -> [(Int, Float)] -> String +flattenS nlp [] = "" +flattenS nlp ((col,seq):seqs) = flatten col nlp seq seqs