[commit: haddock] 2.17.3.1-spanfix, alexbiehl-patch-1, ghc-8.0, ghc-8.0-facebook, ghc-head, ghc-head1, haddock-quick, headdock-library-1.4.5, ie_avails, issue-303, issue-475, master, pr-filter-maps, pr/cabal-desc, travis, v2.17, v2.17.3, v2.18, wip-located-module-as, wip/D2418, wip/T11080-open-data-kinds, wip/T11430, wip/T12105, wip/T12105-2, wip/T12942, wip/T13163, wip/T3384, wip/embelleshed-rdr, wip/new-tree-one-param, wip/rae, wip/remove-frames, wip/remove-frames1, wip/revert-ttg-2017-11-20, wip/ttg-2017-10-13, wip/ttg-2017-10-31, wip/ttg-2017-11-06, wip/ttg2-2017-11-10, wip/ttg3-2017-11-12, wip/ttg4-constraints-2017-11-13: html-test/Operators: Clear up ambiguous types (39f8365)

git at git.haskell.org git at git.haskell.org
Mon Nov 20 20:58:53 UTC 2017


Repository : ssh://git@git.haskell.org/haddock

On branches: 2.17.3.1-spanfix,alexbiehl-patch-1,ghc-8.0,ghc-8.0-facebook,ghc-head,ghc-head1,haddock-quick,headdock-library-1.4.5,ie_avails,issue-303,issue-475,master,pr-filter-maps,pr/cabal-desc,travis,v2.17,v2.17.3,v2.18,wip-located-module-as,wip/D2418,wip/T11080-open-data-kinds,wip/T11430,wip/T12105,wip/T12105-2,wip/T12942,wip/T13163,wip/T3384,wip/embelleshed-rdr,wip/new-tree-one-param,wip/rae,wip/remove-frames,wip/remove-frames1,wip/revert-ttg-2017-11-20,wip/ttg-2017-10-13,wip/ttg-2017-10-31,wip/ttg-2017-11-06,wip/ttg2-2017-11-10,wip/ttg3-2017-11-12,wip/ttg4-constraints-2017-11-13
Link       : http://git.haskell.org/haddock.git/commitdiff/39f8365c2c5aca1154b740de631298e995d8d56e

>---------------------------------------------------------------

commit 39f8365c2c5aca1154b740de631298e995d8d56e
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Wed Dec 23 14:15:28 2015 +0100

    html-test/Operators: Clear up ambiguous types
    
    For reasons that aren't entirely clear a class with ambiguous types was
    accepted by GHC <8.0. I've added a functional dependency to clear up
    this ambiguity.


>---------------------------------------------------------------

39f8365c2c5aca1154b740de631298e995d8d56e
 html-test/src/Operators.hs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/html-test/src/Operators.hs b/html-test/src/Operators.hs
index f7b4d0a..0b633c3 100644
--- a/html-test/src/Operators.hs
+++ b/html-test/src/Operators.hs
@@ -1,4 +1,6 @@
 {-# LANGUAGE PatternSynonyms, TypeOperators, TypeFamilies, MultiParamTypeClasses, GADTs #-}
+{-# LANGUAGE FunctionalDependencies #-}
+
 -- | Test operators with or without fixity declarations
 module Operators where
 
@@ -42,7 +44,9 @@ data family a ** b
 infix 9 **
 
 -- | Class with fixity, including associated types
-class a ><> b where
+class a ><> b | a -> b where
+  -- Dec 2015: Added @a -> b@ functional dependency to clean up ambiguity
+  -- See GHC #11264
   type a <>< b :: *
   data a ><< b
   (>><), (<<>) :: a -> b -> ()



More information about the ghc-commits mailing list