@@ -86,6 +86,7 @@ data IBCFile = IBCFile {
86 , ibc_moduledocs :: ![(Name, Docstring D.DocTerm)]
86 , ibc_moduledocs :: ![(Name, Docstring D.DocTerm)]
87 , ibc_transforms :: ![(Name, (Term, Term))]
87 , ibc_transforms :: ![(Name, (Term, Term))]
88 , ibc_errRev :: ![(Term, Term)]
88 , ibc_errRev :: ![(Term, Term)]
89+ , ibc_errReduce :: ![Name]
89 , ibc_coercions :: ![Name]
90 , ibc_coercions :: ![Name]
90 , ibc_lineapps :: ![(FilePath, Int, PTerm)]
91 , ibc_lineapps :: ![(FilePath, Int, PTerm)]
91 , ibc_namehints :: ![(Name, Name)]
92 , ibc_namehints :: ![(Name, Name)]
@@ -114,7 +115,7 @@ deriving instance Binary IBCFile
116initIBC :: IBCFile
117initIBC :: IBCFile
117−initIBC = IBCFile ibcVersion "" [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Nothing [] [] [] [] [] [] [] [] [] []
118+initIBC = IBCFile ibcVersion "" [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Nothing [] [] [] [] [] [] [] [] [] []
119hasValidIBCVersion :: FilePath -> Idris Bool
120hasValidIBCVersion :: FilePath -> Idris Bool
120hasValidIBCVersion fp = do
121hasValidIBCVersion fp = do
@@ -191,6 +192,7 @@ entries i = catMaybes [Just $ toEntry "ver" 0 (encode $ ver i),
191 makeEntry "ibc_moduledocs" (ibc_moduledocs i),
192 makeEntry "ibc_moduledocs" (ibc_moduledocs i),
192 makeEntry "ibc_transforms" (ibc_transforms i),
193 makeEntry "ibc_transforms" (ibc_transforms i),
193 makeEntry "ibc_errRev" (ibc_errRev i),
194 makeEntry "ibc_errRev" (ibc_errRev i),
195+ makeEntry "ibc_errReduce" (ibc_errReduce i),
194 makeEntry "ibc_coercions" (ibc_coercions i),
196 makeEntry "ibc_coercions" (ibc_coercions i),
195 makeEntry "ibc_lineapps" (ibc_lineapps i),
197 makeEntry "ibc_lineapps" (ibc_lineapps i),
196 makeEntry "ibc_namehints" (ibc_namehints i),
198 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 }
324ibc i (IBCInjective n a) f = return f { ibc_injective = (n,a) : ibc_injective f }
326ibc i (IBCInjective n a) f = return f { ibc_injective = (n,a) : ibc_injective f }
325ibc i (IBCTrans n t) f = return f { ibc_transforms = (n, t) : ibc_transforms f }
327ibc i (IBCTrans n t) f = return f { ibc_transforms = (n, t) : ibc_transforms f }
326ibc i (IBCErrRev t) f = return f { ibc_errRev = t : ibc_errRev f }
328ibc 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 }
327ibc i (IBCLineApp fp l t) f
330ibc i (IBCLineApp fp l t) f
328 = return f { ibc_lineapps = (fp,l,t) : ibc_lineapps f }
331 = return f { ibc_lineapps = (fp,l,t) : ibc_lineapps f }
329ibc i (IBCNameHint (n, ty)) f
332ibc i (IBCNameHint (n, ty)) f
@@ -416,6 +419,7 @@ process reexp phase archive fn = do
416 processCoercions archive
419 processCoercions archive
417 processTransforms archive
420 processTransforms archive
418 processErrRev archive
421 processErrRev archive
422+ processErrReduce archive
419 processLineApps archive
423 processLineApps archive
420 processNameHints archive
424 processNameHints archive
421 processMetaInformation archive
425 processMetaInformation archive
@@ -797,6 +801,11 @@ processErrRev ar = do
797 ts <- getEntry [] "ibc_errRev" ar
801 ts <- getEntry [] "ibc_errRev" ar
798 mapM_ addErrRev ts
802 mapM_ addErrRev ts
804+processErrReduce :: Archive -> Idris ()
805+processErrReduce ar = do
806+ ts <- getEntry [] "ibc_errReduce" ar
807+ mapM_ addErrReduce ts
800processLineApps :: Archive -> Idris ()
809processLineApps :: Archive -> Idris ()
801processLineApps ar = do
810processLineApps ar = do
802 ls <- getEntry [] "ibc_lineapps" ar
811 ls <- getEntry [] "ibc_lineapps" ar
@@ -1232,6 +1241,7 @@ instance Binary FnOpt where
1232 UnfoldIface x ns -> do putWord8 19
1241 UnfoldIface x ns -> do putWord8 19
1244+ ErrorReduce -> putWord8 20
1236 = do i <- getWord8
1246 = do i <- getWord8
1237 case i of
1247 case i of
@@ -1259,6 +1269,7 @@ instance Binary FnOpt where
1259 19 -> do x <- get
1269 19 -> do x <- get
1260 ns <- get
1270 ns <- get
1261 return (UnfoldIface x ns)
1271 return (UnfoldIface x ns)
1272+ 20 -> return ErrorReduce
1262 _ -> error "Corrupted binary data for FnOpt"
1273 _ -> error "Corrupted binary data for FnOpt"
1264instance Binary Fixity where
1275instance Binary Fixity where