@@ -86,6 +86,7 @@ data IBCFile = IBCFile {
8686 , ibc_moduledocs :: ![(Name, Docstring D.DocTerm)]
8787 , ibc_transforms :: ![(Name, (Term, Term))]
8888 , ibc_errRev :: ![(Term, Term)]
89+ , ibc_errReduce :: ![Name]
8990 , ibc_coercions :: ![Name]
9091 , ibc_lineapps :: ![(FilePath, Int, PTerm)]
9192 , ibc_namehints :: ![(Name, Name)]
@@ -114,7 +115,7 @@ deriving instance Binary IBCFile
114115!-}
115116
116117initIBC :: IBCFile
117−initIBC = IBCFile ibcVersion "" [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Nothing [] [] [] [] [] [] [] [] [] []
118+initIBC = IBCFile ibcVersion "" [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Nothing [] [] [] [] [] [] [] [] [] []
118119
119120hasValidIBCVersion :: FilePath -> Idris Bool
120121hasValidIBCVersion fp = do
@@ -191,6 +192,7 @@ entries i = catMaybes [Just $ toEntry "ver" 0 (encode $ ver i),
191192 makeEntry "ibc_moduledocs" (ibc_moduledocs i),
192193 makeEntry "ibc_transforms" (ibc_transforms i),
193194 makeEntry "ibc_errRev" (ibc_errRev i),
195+ makeEntry "ibc_errReduce" (ibc_errReduce i),
194196 makeEntry "ibc_coercions" (ibc_coercions i),
195197 makeEntry "ibc_lineapps" (ibc_lineapps i),
196198 makeEntry "ibc_namehints" (ibc_namehints i),
@@ -324,6 +326,7 @@ ibc i (IBCTotal n a) f = return f { ibc_total = (n,a) : ibc_total f }
324326ibc i (IBCInjective n a) f = return f { ibc_injective = (n,a) : ibc_injective f }
325327ibc i (IBCTrans n t) f = return f { ibc_transforms = (n, t) : ibc_transforms f }
326328ibc i (IBCErrRev t) f = return f { ibc_errRev = t : ibc_errRev f }
329+ibc i (IBCErrReduce t) f = return f { ibc_errReduce = t : ibc_errReduce f }
327330ibc i (IBCLineApp fp l t) f
328331 = return f { ibc_lineapps = (fp,l,t) : ibc_lineapps f }
329332ibc i (IBCNameHint (n, ty)) f
@@ -416,6 +419,7 @@ process reexp phase archive fn = do
416419 processCoercions archive
417420 processTransforms archive
418421 processErrRev archive
422+ processErrReduce archive
419423 processLineApps archive
420424 processNameHints archive
421425 processMetaInformation archive
@@ -797,6 +801,11 @@ processErrRev ar = do
797801 ts <- getEntry [] "ibc_errRev" ar
798802 mapM_ addErrRev ts
799803
804+processErrReduce :: Archive -> Idris ()
805+processErrReduce ar = do
806+ ts <- getEntry [] "ibc_errReduce" ar
807+ mapM_ addErrReduce ts
808+
800809processLineApps :: Archive -> Idris ()
801810processLineApps ar = do
802811 ls <- getEntry [] "ibc_lineapps" ar
@@ -1232,6 +1241,7 @@ instance Binary FnOpt where
12321241 UnfoldIface x ns -> do putWord8 19
12331242 put x
12341243 put ns
1244+ ErrorReduce -> putWord8 20
12351245 get
12361246 = do i <- getWord8
12371247 case i of
@@ -1259,6 +1269,7 @@ instance Binary FnOpt where
12591269 19 -> do x <- get
12601270 ns <- get
12611271 return (UnfoldIface x ns)
1272+ 20 -> return ErrorReduce
12621273 _ -> error "Corrupted binary data for FnOpt"
12631274
12641275instance Binary Fixity where