diff options
author | davve <davve@dtek.chalmers.se> | 2006-09-22 18:10:45 +0000 |
---|---|---|
committer | davve <davve@dtek.chalmers.se> | 2006-09-22 18:10:45 +0000 |
commit | 2c20c2f9d79f22d3156670c21f424a68ec05e86c (patch) | |
tree | 0cc8b676e537d5ace00213e0f76591deb6188e5d /src | |
parent | 12d0a6d0b40186c446fccac64d94fc4e480dbe73 (diff) |
Fix a bug in Main.toHsType
Diffstat (limited to 'src')
-rw-r--r-- | src/Main.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Main.hs b/src/Main.hs index 86d7e297..6f8e0a3c 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1116,14 +1116,14 @@ toHsType t = case t of AppTy a b -> HsAppTy (toLHsType a) (toLHsType b) TyConApp tc ts -> case ts of [] -> HsTyVar (tyConName tc) - _ -> HsAppTy (tycon tc) (args ts) + _ -> app (tycon tc) ts FunTy a b -> HsFunTy (toLHsType a) (toLHsType b) ForAllTy v t -> cvForAll [v] t PredTy p -> HsPredTy (toHsPred p) NoteTy _ t -> toHsType t where - tycon tc = noLoc (HsTyVar (tyConName tc)) - args ts = foldl1 (\a b -> noLoc $ HsAppTy a b) (map toLHsType ts) + tycon tc = HsTyVar (tyConName tc) + app tc ts = foldl (\a b -> HsAppTy (noLoc a) (noLoc b)) tc (map toHsType ts) cvForAll vs (ForAllTy v t) = cvForAll (v:vs) t cvForAll vs t = mkExplicitHsForAllTy (tyvarbinders vs) (noLoc []) (toLHsType t) tyvarbinders vs = map (noLoc . UserTyVar . tyVarName) vs |