From 39f8365c2c5aca1154b740de631298e995d8d56e Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Wed, 23 Dec 2015 14:15:28 +0100 Subject: 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. --- html-test/src/Operators.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'html-test') diff --git a/html-test/src/Operators.hs b/html-test/src/Operators.hs index f7b4d0ab..0b633c3f 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 -> () -- cgit v1.2.3