1
0
forked from GitHub/gf-core

More cabal file cleanup. Remove some more tabs from Haskell source.

This commit is contained in:
John J. Camilleri
2021-07-07 13:04:09 +02:00
parent f2e52d6f2c
commit 0954b4cbab
6 changed files with 52 additions and 47 deletions

View File

@@ -13,14 +13,14 @@ fold t =
case unApp t of
Just (i,[x]) ->
case M.lookup i foldable of
Just j -> appFold j x
_ -> mkApp i [fold x]
Just j -> appFold j x
_ -> mkApp i [fold x]
Just (i,xs) -> mkApp i $ map fold xs
_ -> t
appFold :: CId -> Tree -> Tree
appFold j t =
appFold j t =
case unApp t of
Just (i,[t,ts]) | isPre i "Cons" -> mkApp j [fold t, appFold j ts]
Just (i,[t,s]) | isPre i "Base" -> mkApp j [fold t, fold s]
where isPre i s = take 4 (show i) == s
where isPre i s = take 4 (show i) == s