From 17fcce4ca5bf1418d8f335e869d328e1913d3f95 Mon Sep 17 00:00:00 2001 From: Zubin Duggal Date: Tue, 16 May 2023 14:34:19 +0530 Subject: compiler: Remove instance Binary Char It is generally not a good idea to serialise strings as [Char] into interface files, as upon deserialisation each of these would be turned into a highly memory inefficient structure mostly composed of cons cells and pointers. If you really want to serialise a Char, use the SerialisableChar newtype. --- compiler/GHC/Iface/Ext/Ast.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/GHC/Iface/Ext/Ast.hs') diff --git a/compiler/GHC/Iface/Ext/Ast.hs b/compiler/GHC/Iface/Ext/Ast.hs index 24a68e63c4..5af938cbe7 100644 --- a/compiler/GHC/Iface/Ext/Ast.hs +++ b/compiler/GHC/Iface/Ext/Ast.hs @@ -303,7 +303,7 @@ mkHieFileWithSource src_file src ms ts rs = tcs = tcg_tcs ts (asts',arr) = getCompressedAsts tc_binds rs top_ev_binds insts tcs in HieFile - { hie_hs_file = src_file + { hie_hs_file = mkFastString src_file , hie_module = ms_mod ms , hie_types = arr , hie_asts = asts' -- cgit v1.2.1