From ac1894067ce7bc5c34f1cd4d70c9e7fbeb6ae6dc Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Thu, 6 Aug 2015 13:10:09 +0200 Subject: Add support for sugaring built-in function syntax. --- haddock-api/src/Haddock/Interface/Specialize.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/haddock-api/src/Haddock/Interface/Specialize.hs b/haddock-api/src/Haddock/Interface/Specialize.hs index ddae2b93..d6466570 100644 --- a/haddock-api/src/Haddock/Interface/Specialize.hs +++ b/haddock-api/src/Haddock/Interface/Specialize.hs @@ -147,7 +147,10 @@ sugarTuples typ = sugarOperators :: NamedThing name => HsType name -> HsType name sugarOperators (HsAppTy (L _ (HsAppTy (L loc (HsTyVar name)) la)) lb) - | isSymOcc $ getOccName name = mkHsOpTy la (L loc name) lb + | isSymOcc $ getOccName name' = mkHsOpTy la (L loc name) lb + | isBuiltInSyntax name' && getOccString name == "(->)" = HsFunTy la lb + where + name' = getName name sugarOperators typ = typ -- cgit v1.2.3