Commit 08e47ca9 authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan
Browse files

FunDep printer: Fix unicode arrow

The arrow should be printed in unicode arrow syntax when
-fprint-unicode-syntax is used.

Reviewers: austin, bgamari, thomie

Reviewed By: thomie

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #11825
parent 39103062
......@@ -308,7 +308,7 @@ pprFundeps [] = empty
pprFundeps fds = hsep (vbar : punctuate comma (map pprFunDep fds))
pprFunDep :: Outputable a => FunDep a -> SDoc
pprFunDep (us, vs) = hsep [interppSP us, text "->", interppSP vs]
pprFunDep (us, vs) = hsep [interppSP us, arrow, interppSP vs]
instance Data.Data Class where
-- don't traverse?
{-# LANGUAGE FunctionalDependencies #-}
class X a b | a -> b where
to :: a -> b
:set -fprint-unicode-syntax
:load T11825.hs
:info X
class X a b | a → b where
to ∷ a → b
{-# MINIMAL to #-}
-- Defined at T11825.hs:3:1
......@@ -23,3 +23,4 @@ test('T9915', just_ghci, ghci_script, ['T9915.script'])
test('T10145', just_ghci, ghci_script, ['T10145.script'])
test('T7253', just_ghci, ghci_script, ['T7253.script'])
test('T11328', just_ghci, ghci_script, ['T11328.script'])
test('T11825', just_ghci, ghci_script, ['T11825.script'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment