diff options
author | Ben Gamari <ben@smart-cactus.org> | 2015-12-23 14:15:28 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-12-23 14:15:28 +0100 |
commit | 39f8365c2c5aca1154b740de631298e995d8d56e (patch) | |
tree | 015ec87243bb43046b9b8c18a2ebb909ce0410db | |
parent | b5ab70a092e4a801030cf01f87378217d4c87343 (diff) |
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.
-rw-r--r-- | html-test/src/Operators.hs | 6 |
1 files changed, 5 insertions, 1 deletions
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 -> () |