Skip to content

Commit afa6bbe

Browse files
edwinbmmhelloworld
authored andcommitted
Compatibility fix (again)
Need to use named implementations to avoid a clash between current version and this version, so that it builds with *both* the bootstrap and the previous version.
1 parent 8bff4e6 commit afa6bbe

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Idris/Package.idr

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -541,10 +541,10 @@ foldWithKeysC {a} {b} fk fv = go []
541541
(StringMap.toList sm))
542542
nd
543543

544-
Semigroup () where
544+
[semiunit] Semigroup () where
545545
_ <+> _ = ()
546546

547-
Monoid () where
547+
[monoidunit] Monoid () using semiunit where
548548
neutral = ()
549549

550550
clean : {auto c : Ref Ctxt Defs} ->
@@ -576,14 +576,17 @@ clean pkg opts -- `opts` is not used but might be in the future
576576
v = Builtin.snd ksv
577577
in
578578
insertWith (reverse ks) (maybe [v] (v::)) trie) empty toClean
579-
foldWithKeysC (deleteFolder builddir)
580-
(\ks => map concat . traverse (deleteBin builddir ks))
579+
foldWithKeysC @{monoidunit} (deleteFolder builddir)
580+
(\ks => map collapse . traverse (deleteBin builddir ks))
581581
pkgTrie
582582
deleteFolder builddir []
583583
maybe (pure ()) (\e => delete (outputdir </> e))
584584
(executable pkg)
585585
runScript (postclean pkg)
586586
where
587+
collapse : List () -> ()
588+
collapse _ = ()
589+
587590
delete : String -> Core ()
588591
delete path = do Right () <- coreLift $ removeFile path
589592
| Left err => pure ()

0 commit comments

Comments
 (0)