Packages

Erlang code generator for Idris 2

Current section

Files

Jump to
idris2 src Idris.Idris2.Compiler.ES.RemoveUnused.erl
Raw

src/Idris.Idris2.Compiler.ES.RemoveUnused.erl

-module('Idris.Idris2.Compiler.ES.RemoveUnused').
-compile('no_auto_import').
-compile('inline').
-compile({'inline_size',24}).
-export([
'case--calcUsedDefs-493'/4,
'case--defsToUsedMap-422'/2,
'nested--3831-444--in--un--f'/5,
'un--usedNamesDef'/1,
'un--usedNamesConstAlt'/1,
'un--usedNamesConAlt'/1,
'un--usedNames'/1,
'un--defsUsedByNamedCExp'/2,
'un--defsToUsedMap'/1,
'un--calcUsedDefs'/2,
'un--calcUsed'/3
]).
'case--calcUsedDefs-493'(V0, V1, V2, V3) -> case V3 of {'Idris.Builtin.MkPair', E0, E1} -> (fun (V4, V5) -> case V5 of {'Idris.Builtin.MkPair', E2, E3} -> (fun (V6, V7) -> ('Idris.Idris2.Data.SortedSet':'un--contains'('erased', V4, V2)) end(E2, E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--defsToUsedMap-422'(V0, V1) -> case V1 of {'Idris.Builtin.MkPair', E0, E1} -> (fun (V2, V3) -> case V3 of {'Idris.Builtin.MkPair', E2, E3} -> (fun (V4, V5) -> {'Idris.Builtin.MkPair', V2, ('un--usedNamesDef'(V5))} end(E2, E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'nested--3831-444--in--un--f'(V0, V1, V2, V3, V4) -> case V4 of {'Idris.Prelude.Types.Nothing'} -> (fun () -> V3 end()); {'Idris.Prelude.Types.Just', E0} -> (fun (V5) -> ('Idris.Idris2.Data.SortedSet':'un--union'('erased', V3, V5)) end(E0)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'un--usedNamesDef'(V0) -> case V0 of {'Idris.Core.CompileExpr.MkNmFun', E0, E1} -> (fun (V1, V2) -> ('un--usedNames'(V2)) end(E0, E1)); {'Idris.Core.CompileExpr.MkNmError', E2} -> (fun (V3) -> ('un--usedNames'(V3)) end(E2)); {'Idris.Core.CompileExpr.MkNmForeign', E3, E4, E5} -> (fun (V4, V5, V6) -> ('Idris.Idris2.Data.SortedSet':'un--empty'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V7) -> fun (V8) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V7, V8)) end end, fun (V9) -> fun (V10) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V9, V10)) end end}, fun (V11) -> fun (V12) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V11, V12)) end end, fun (V13) -> fun (V14) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V13, V14)) end end, fun (V15) -> fun (V16) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V15, V16)) end end, fun (V17) -> fun (V18) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V17, V18)) end end, fun (V19) -> fun (V20) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V19, V20)) end end, fun (V21) -> fun (V22) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V21, V22)) end end, fun (V23) -> fun (V24) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V23, V24)) end end})) end(E3, E4, E5)); {'Idris.Core.CompileExpr.MkNmCon', E6, E7, E8} -> (fun (V25, V26, V27) -> ('Idris.Idris2.Data.SortedSet':'un--empty'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V28) -> fun (V29) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V28, V29)) end end, fun (V30) -> fun (V31) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V30, V31)) end end}, fun (V32) -> fun (V33) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V32, V33)) end end, fun (V34) -> fun (V35) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V34, V35)) end end, fun (V36) -> fun (V37) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V36, V37)) end end, fun (V38) -> fun (V39) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V38, V39)) end end, fun (V40) -> fun (V41) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V40, V41)) end end, fun (V42) -> fun (V43) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V42, V43)) end end, fun (V44) -> fun (V45) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V44, V45)) end end})) end(E6, E7, E8)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'un--usedNamesConstAlt'(V0) -> case V0 of {'Idris.Core.CompileExpr.MkNConstAlt', E0, E1} -> (fun (V1, V2) -> ('un--usedNames'(V2)) end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'un--usedNamesConAlt'(V0) -> case V0 of {'Idris.Core.CompileExpr.MkNConAlt', E0, E1, E2, E3} -> (fun (V1, V2, V3, V4) -> ('un--usedNames'(V4)) end(E0, E1, E2, E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'un--usedNames'(V0) -> case V0 of {'Idris.Core.CompileExpr.NmLocal', E0, E1} -> (fun (V1, V2) -> ('Idris.Idris2.Data.SortedSet':'un--empty'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V3) -> fun (V4) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V3, V4)) end end, fun (V5) -> fun (V6) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V5, V6)) end end}, fun (V7) -> fun (V8) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V7, V8)) end end, fun (V9) -> fun (V10) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V9, V10)) end end, fun (V11) -> fun (V12) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V11, V12)) end end, fun (V13) -> fun (V14) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V13, V14)) end end, fun (V15) -> fun (V16) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V15, V16)) end end, fun (V17) -> fun (V18) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V17, V18)) end end, fun (V19) -> fun (V20) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V19, V20)) end end})) end(E0, E1)); {'Idris.Core.CompileExpr.NmRef', E2, E3} -> (fun (V21, V22) -> ('Idris.Idris2.Data.SortedSet':'un--insert'('erased', V22, ('Idris.Idris2.Data.SortedSet':'un--empty'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V23) -> fun (V24) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V23, V24)) end end, fun (V25) -> fun (V26) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V25, V26)) end end}, fun (V27) -> fun (V28) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V27, V28)) end end, fun (V29) -> fun (V30) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V29, V30)) end end, fun (V31) -> fun (V32) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V31, V32)) end end, fun (V33) -> fun (V34) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V33, V34)) end end, fun (V35) -> fun (V36) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V35, V36)) end end, fun (V37) -> fun (V38) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V37, V38)) end end, fun (V39) -> fun (V40) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V39, V40)) end end})))) end(E2, E3)); {'Idris.Core.CompileExpr.NmLam', E4, E5, E6} -> (fun (V41, V42, V43) -> ('un--usedNames'(V43)) end(E4, E5, E6)); {'Idris.Core.CompileExpr.NmApp', E7, E8, E9} -> (fun (V44, V45, V46) -> ('Idris.Idris2.Data.SortedSet':'un--union'('erased', ('un--usedNames'(V45)), (('Idris.Idris2.Prelude.Interfaces':'un--concat'('erased', 'erased', {'Idris.Builtin.MkPair', {'Idris.Prelude.Interfaces.dn--un--__mkFoldable', fun (V52) -> fun (V53) -> fun (V54) -> fun (V55) -> fun (V56) -> ('Idris.Idris2.Prelude.Types':'dn--un--foldr_Foldable__List'('erased', 'erased', V54, V55, V56)) end end end end end, fun (V57) -> fun (V58) -> fun (V59) -> fun (V60) -> fun (V61) -> ('Idris.Idris2.Prelude.Types':'dn--un--foldl_Foldable__List'('erased', 'erased', V59, V60, V61)) end end end end end}, {'Idris.Prelude.Interfaces.dn--un--__mkMonoid', fun (V62) -> fun (V63) -> ('Idris.Idris2.Data.SortedSet':'dn--un--<+>_Semigroup__(SortedSet $k)'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V64) -> fun (V65) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V64, V65)) end end, fun (V66) -> fun (V67) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V66, V67)) end end}, fun (V68) -> fun (V69) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V68, V69)) end end, fun (V70) -> fun (V71) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V70, V71)) end end, fun (V72) -> fun (V73) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V72, V73)) end end, fun (V74) -> fun (V75) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V74, V75)) end end, fun (V76) -> fun (V77) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V76, V77)) end end, fun (V78) -> fun (V79) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V78, V79)) end end, fun (V80) -> fun (V81) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V80, V81)) end end}, V62, V63)) end end, ('Idris.Idris2.Data.SortedSet':'dn--un--neutral_Monoid__(SortedSet $k)'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V82) -> fun (V83) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V82, V83)) end end, fun (V84) -> fun (V85) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V84, V85)) end end}, fun (V86) -> fun (V87) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V86, V87)) end end, fun (V88) -> fun (V89) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V88, V89)) end end, fun (V90) -> fun (V91) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V90, V91)) end end, fun (V92) -> fun (V93) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V92, V93)) end end, fun (V94) -> fun (V95) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V94, V95)) end end, fun (V96) -> fun (V97) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V96, V97)) end end, fun (V98) -> fun (V99) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V98, V99)) end end}))}}))(('Idris.Idris2.Prelude.Interfaces':'un--<$>'('erased', 'erased', 'erased', fun (V47) -> fun (V48) -> fun (V49) -> fun (V50) -> ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', V49, V50)) end end end end, fun (V51) -> ('un--usedNames'(V51)) end, V46)))))) end(E7, E8, E9)); {'Idris.Core.CompileExpr.NmPrimVal', E10, E11} -> (fun (V100, V101) -> ('Idris.Idris2.Data.SortedSet':'un--empty'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V102) -> fun (V103) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V102, V103)) end end, fun (V104) -> fun (V105) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V104, V105)) end end}, fun (V106) -> fun (V107) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V106, V107)) end end, fun (V108) -> fun (V109) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V108, V109)) end end, fun (V110) -> fun (V111) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V110, V111)) end end, fun (V112) -> fun (V113) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V112, V113)) end end, fun (V114) -> fun (V115) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V114, V115)) end end, fun (V116) -> fun (V117) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V116, V117)) end end, fun (V118) -> fun (V119) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V118, V119)) end end})) end(E10, E11)); {'Idris.Core.CompileExpr.NmOp', E12, E13, E14, E15} -> (fun (V120, V121, V122, V123) -> (('Idris.Idris2.Prelude.Interfaces':'un--concat'('erased', 'erased', {'Idris.Builtin.MkPair', {'Idris.Prelude.Interfaces.dn--un--__mkFoldable', fun (V129) -> fun (V130) -> fun (V131) -> fun (V132) -> fun (V133) -> ('Idris.Idris2.Data.Vect':'dn--un--foldr_Foldable__(Vect $n)'('erased', 'erased', 'erased', V131, V132, V133)) end end end end end, fun (V134) -> fun (V135) -> fun (V136) -> fun (V137) -> fun (V138) -> ('Idris.Idris2.Data.Vect':'dn--un--foldl_Foldable__(Vect $n)'('erased', 'erased', 'erased', V136, V137, V138)) end end end end end}, {'Idris.Prelude.Interfaces.dn--un--__mkMonoid', fun (V139) -> fun (V140) -> ('Idris.Idris2.Data.SortedSet':'dn--un--<+>_Semigroup__(SortedSet $k)'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V141) -> fun (V142) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V141, V142)) end end, fun (V143) -> fun (V144) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V143, V144)) end end}, fun (V145) -> fun (V146) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V145, V146)) end end, fun (V147) -> fun (V148) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V147, V148)) end end, fun (V149) -> fun (V150) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V149, V150)) end end, fun (V151) -> fun (V152) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V151, V152)) end end, fun (V153) -> fun (V154) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V153, V154)) end end, fun (V155) -> fun (V156) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V155, V156)) end end, fun (V157) -> fun (V158) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V157, V158)) end end}, V139, V140)) end end, ('Idris.Idris2.Data.SortedSet':'dn--un--neutral_Monoid__(SortedSet $k)'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V159) -> fun (V160) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V159, V160)) end end, fun (V161) -> fun (V162) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V161, V162)) end end}, fun (V163) -> fun (V164) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V163, V164)) end end, fun (V165) -> fun (V166) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V165, V166)) end end, fun (V167) -> fun (V168) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V167, V168)) end end, fun (V169) -> fun (V170) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V169, V170)) end end, fun (V171) -> fun (V172) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V171, V172)) end end, fun (V173) -> fun (V174) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V173, V174)) end end, fun (V175) -> fun (V176) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V175, V176)) end end}))}}))(('Idris.Idris2.Prelude.Interfaces':'un--<$>'('erased', 'erased', 'erased', fun (V124) -> fun (V125) -> fun (V126) -> fun (V127) -> ('Idris.Idris2.Data.Vect':'dn--un--map_Functor__(Vect $n)'('erased', 'erased', 'erased', V126, V127)) end end end end, fun (V128) -> ('un--usedNames'(V128)) end, V123)))) end(E12, E13, E14, E15)); {'Idris.Core.CompileExpr.NmConCase', E16, E17, E18, E19} -> (fun (V177, V178, V179, V180) -> ('Idris.Idris2.Data.SortedSet':'un--union'('erased', ('Idris.Idris2.Data.SortedSet':'un--union'('erased', ('un--usedNames'(V178)), (('Idris.Idris2.Prelude.Interfaces':'un--concat'('erased', 'erased', {'Idris.Builtin.MkPair', {'Idris.Prelude.Interfaces.dn--un--__mkFoldable', fun (V186) -> fun (V187) -> fun (V188) -> fun (V189) -> fun (V190) -> ('Idris.Idris2.Prelude.Types':'dn--un--foldr_Foldable__List'('erased', 'erased', V188, V189, V190)) end end end end end, fun (V191) -> fun (V192) -> fun (V193) -> fun (V194) -> fun (V195) -> ('Idris.Idris2.Prelude.Types':'dn--un--foldl_Foldable__List'('erased', 'erased', V193, V194, V195)) end end end end end}, {'Idris.Prelude.Interfaces.dn--un--__mkMonoid', fun (V196) -> fun (V197) -> ('Idris.Idris2.Data.SortedSet':'dn--un--<+>_Semigroup__(SortedSet $k)'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V198) -> fun (V199) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V198, V199)) end end, fun (V200) -> fun (V201) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V200, V201)) end end}, fun (V202) -> fun (V203) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V202, V203)) end end, fun (V204) -> fun (V205) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V204, V205)) end end, fun (V206) -> fun (V207) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V206, V207)) end end, fun (V208) -> fun (V209) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V208, V209)) end end, fun (V210) -> fun (V211) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V210, V211)) end end, fun (V212) -> fun (V213) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V212, V213)) end end, fun (V214) -> fun (V215) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V214, V215)) end end}, V196, V197)) end end, ('Idris.Idris2.Data.SortedSet':'dn--un--neutral_Monoid__(SortedSet $k)'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V216) -> fun (V217) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V216, V217)) end end, fun (V218) -> fun (V219) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V218, V219)) end end}, fun (V220) -> fun (V221) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V220, V221)) end end, fun (V222) -> fun (V223) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V222, V223)) end end, fun (V224) -> fun (V225) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V224, V225)) end end, fun (V226) -> fun (V227) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V226, V227)) end end, fun (V228) -> fun (V229) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V228, V229)) end end, fun (V230) -> fun (V231) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V230, V231)) end end, fun (V232) -> fun (V233) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V232, V233)) end end}))}}))(('Idris.Idris2.Prelude.Interfaces':'un--<$>'('erased', 'erased', 'erased', fun (V181) -> fun (V182) -> fun (V183) -> fun (V184) -> ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', V183, V184)) end end end end, fun (V185) -> ('un--usedNamesConAlt'(V185)) end, V179)))))), ('Idris.Idris2.Prelude.Types':'un--maybe'('erased', 'erased', fun () -> ('Idris.Idris2.Data.SortedSet':'un--empty'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V234) -> fun (V235) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V234, V235)) end end, fun (V236) -> fun (V237) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V236, V237)) end end}, fun (V238) -> fun (V239) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V238, V239)) end end, fun (V240) -> fun (V241) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V240, V241)) end end, fun (V242) -> fun (V243) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V242, V243)) end end, fun (V244) -> fun (V245) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V244, V245)) end end, fun (V246) -> fun (V247) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V246, V247)) end end, fun (V248) -> fun (V249) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V248, V249)) end end, fun (V250) -> fun (V251) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V250, V251)) end end})) end, fun () -> fun (V252) -> ('un--usedNames'(V252)) end end, V180)))) end(E16, E17, E18, E19)); {'Idris.Core.CompileExpr.NmConstCase', E20, E21, E22, E23} -> (fun (V253, V254, V255, V256) -> ('Idris.Idris2.Data.SortedSet':'un--union'('erased', ('Idris.Idris2.Data.SortedSet':'un--union'('erased', ('un--usedNames'(V254)), (('Idris.Idris2.Prelude.Interfaces':'un--concat'('erased', 'erased', {'Idris.Builtin.MkPair', {'Idris.Prelude.Interfaces.dn--un--__mkFoldable', fun (V262) -> fun (V263) -> fun (V264) -> fun (V265) -> fun (V266) -> ('Idris.Idris2.Prelude.Types':'dn--un--foldr_Foldable__List'('erased', 'erased', V264, V265, V266)) end end end end end, fun (V267) -> fun (V268) -> fun (V269) -> fun (V270) -> fun (V271) -> ('Idris.Idris2.Prelude.Types':'dn--un--foldl_Foldable__List'('erased', 'erased', V269, V270, V271)) end end end end end}, {'Idris.Prelude.Interfaces.dn--un--__mkMonoid', fun (V272) -> fun (V273) -> ('Idris.Idris2.Data.SortedSet':'dn--un--<+>_Semigroup__(SortedSet $k)'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V274) -> fun (V275) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V274, V275)) end end, fun (V276) -> fun (V277) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V276, V277)) end end}, fun (V278) -> fun (V279) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V278, V279)) end end, fun (V280) -> fun (V281) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V280, V281)) end end, fun (V282) -> fun (V283) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V282, V283)) end end, fun (V284) -> fun (V285) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V284, V285)) end end, fun (V286) -> fun (V287) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V286, V287)) end end, fun (V288) -> fun (V289) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V288, V289)) end end, fun (V290) -> fun (V291) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V290, V291)) end end}, V272, V273)) end end, ('Idris.Idris2.Data.SortedSet':'dn--un--neutral_Monoid__(SortedSet $k)'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V292) -> fun (V293) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V292, V293)) end end, fun (V294) -> fun (V295) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V294, V295)) end end}, fun (V296) -> fun (V297) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V296, V297)) end end, fun (V298) -> fun (V299) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V298, V299)) end end, fun (V300) -> fun (V301) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V300, V301)) end end, fun (V302) -> fun (V303) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V302, V303)) end end, fun (V304) -> fun (V305) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V304, V305)) end end, fun (V306) -> fun (V307) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V306, V307)) end end, fun (V308) -> fun (V309) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V308, V309)) end end}))}}))(('Idris.Idris2.Prelude.Interfaces':'un--<$>'('erased', 'erased', 'erased', fun (V257) -> fun (V258) -> fun (V259) -> fun (V260) -> ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', V259, V260)) end end end end, fun (V261) -> ('un--usedNamesConstAlt'(V261)) end, V255)))))), ('Idris.Idris2.Prelude.Types':'un--maybe'('erased', 'erased', fun () -> ('Idris.Idris2.Data.SortedSet':'un--empty'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V310) -> fun (V311) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V310, V311)) end end, fun (V312) -> fun (V313) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V312, V313)) end end}, fun (V314) -> fun (V315) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V314, V315)) end end, fun (V316) -> fun (V317) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V316, V317)) end end, fun (V318) -> fun (V319) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V318, V319)) end end, fun (V320) -> fun (V321) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V320, V321)) end end, fun (V322) -> fun (V323) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V322, V323)) end end, fun (V324) -> fun (V325) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V324, V325)) end end, fun (V326) -> fun (V327) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V326, V327)) end end})) end, fun () -> fun (V328) -> ('un--usedNames'(V328)) end end, V256)))) end(E20, E21, E22, E23)); {'Idris.Core.CompileExpr.NmExtPrim', E24, E25, E26} -> (fun (V329, V330, V331) -> (('Idris.Idris2.Prelude.Interfaces':'un--concat'('erased', 'erased', {'Idris.Builtin.MkPair', {'Idris.Prelude.Interfaces.dn--un--__mkFoldable', fun (V337) -> fun (V338) -> fun (V339) -> fun (V340) -> fun (V341) -> ('Idris.Idris2.Prelude.Types':'dn--un--foldr_Foldable__List'('erased', 'erased', V339, V340, V341)) end end end end end, fun (V342) -> fun (V343) -> fun (V344) -> fun (V345) -> fun (V346) -> ('Idris.Idris2.Prelude.Types':'dn--un--foldl_Foldable__List'('erased', 'erased', V344, V345, V346)) end end end end end}, {'Idris.Prelude.Interfaces.dn--un--__mkMonoid', fun (V347) -> fun (V348) -> ('Idris.Idris2.Data.SortedSet':'dn--un--<+>_Semigroup__(SortedSet $k)'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V349) -> fun (V350) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V349, V350)) end end, fun (V351) -> fun (V352) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V351, V352)) end end}, fun (V353) -> fun (V354) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V353, V354)) end end, fun (V355) -> fun (V356) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V355, V356)) end end, fun (V357) -> fun (V358) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V357, V358)) end end, fun (V359) -> fun (V360) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V359, V360)) end end, fun (V361) -> fun (V362) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V361, V362)) end end, fun (V363) -> fun (V364) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V363, V364)) end end, fun (V365) -> fun (V366) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V365, V366)) end end}, V347, V348)) end end, ('Idris.Idris2.Data.SortedSet':'dn--un--neutral_Monoid__(SortedSet $k)'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V367) -> fun (V368) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V367, V368)) end end, fun (V369) -> fun (V370) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V369, V370)) end end}, fun (V371) -> fun (V372) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V371, V372)) end end, fun (V373) -> fun (V374) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V373, V374)) end end, fun (V375) -> fun (V376) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V375, V376)) end end, fun (V377) -> fun (V378) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V377, V378)) end end, fun (V379) -> fun (V380) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V379, V380)) end end, fun (V381) -> fun (V382) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V381, V382)) end end, fun (V383) -> fun (V384) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V383, V384)) end end}))}}))(('Idris.Idris2.Prelude.Interfaces':'un--<$>'('erased', 'erased', 'erased', fun (V332) -> fun (V333) -> fun (V334) -> fun (V335) -> ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', V334, V335)) end end end end, fun (V336) -> ('un--usedNames'(V336)) end, V331)))) end(E24, E25, E26)); {'Idris.Core.CompileExpr.NmCon', E27, E28, E29, E30} -> (fun (V385, V386, V387, V388) -> (('Idris.Idris2.Prelude.Interfaces':'un--concat'('erased', 'erased', {'Idris.Builtin.MkPair', {'Idris.Prelude.Interfaces.dn--un--__mkFoldable', fun (V394) -> fun (V395) -> fun (V396) -> fun (V397) -> fun (V398) -> ('Idris.Idris2.Prelude.Types':'dn--un--foldr_Foldable__List'('erased', 'erased', V396, V397, V398)) end end end end end, fun (V399) -> fun (V400) -> fun (V401) -> fun (V402) -> fun (V403) -> ('Idris.Idris2.Prelude.Types':'dn--un--foldl_Foldable__List'('erased', 'erased', V401, V402, V403)) end end end end end}, {'Idris.Prelude.Interfaces.dn--un--__mkMonoid', fun (V404) -> fun (V405) -> ('Idris.Idris2.Data.SortedSet':'dn--un--<+>_Semigroup__(SortedSet $k)'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V406) -> fun (V407) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V406, V407)) end end, fun (V408) -> fun (V409) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V408, V409)) end end}, fun (V410) -> fun (V411) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V410, V411)) end end, fun (V412) -> fun (V413) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V412, V413)) end end, fun (V414) -> fun (V415) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V414, V415)) end end, fun (V416) -> fun (V417) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V416, V417)) end end, fun (V418) -> fun (V419) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V418, V419)) end end, fun (V420) -> fun (V421) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V420, V421)) end end, fun (V422) -> fun (V423) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V422, V423)) end end}, V404, V405)) end end, ('Idris.Idris2.Data.SortedSet':'dn--un--neutral_Monoid__(SortedSet $k)'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V424) -> fun (V425) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V424, V425)) end end, fun (V426) -> fun (V427) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V426, V427)) end end}, fun (V428) -> fun (V429) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V428, V429)) end end, fun (V430) -> fun (V431) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V430, V431)) end end, fun (V432) -> fun (V433) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V432, V433)) end end, fun (V434) -> fun (V435) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V434, V435)) end end, fun (V436) -> fun (V437) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V436, V437)) end end, fun (V438) -> fun (V439) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V438, V439)) end end, fun (V440) -> fun (V441) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V440, V441)) end end}))}}))(('Idris.Idris2.Prelude.Interfaces':'un--<$>'('erased', 'erased', 'erased', fun (V389) -> fun (V390) -> fun (V391) -> fun (V392) -> ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', V391, V392)) end end end end, fun (V393) -> ('un--usedNames'(V393)) end, V388)))) end(E27, E28, E29, E30)); {'Idris.Core.CompileExpr.NmDelay', E31, E32} -> (fun (V442, V443) -> ('un--usedNames'(V443)) end(E31, E32)); {'Idris.Core.CompileExpr.NmForce', E33, E34} -> (fun (V444, V445) -> ('un--usedNames'(V445)) end(E33, E34)); {'Idris.Core.CompileExpr.NmLet', E35, E36, E37, E38} -> (fun (V446, V447, V448, V449) -> ('Idris.Idris2.Data.SortedSet':'un--union'('erased', ('un--usedNames'(V448)), ('un--usedNames'(V449)))) end(E35, E36, E37, E38)); {'Idris.Core.CompileExpr.NmErased', E39} -> (fun (V450) -> ('Idris.Idris2.Data.SortedSet':'un--empty'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V451) -> fun (V452) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V451, V452)) end end, fun (V453) -> fun (V454) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V453, V454)) end end}, fun (V455) -> fun (V456) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V455, V456)) end end, fun (V457) -> fun (V458) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V457, V458)) end end, fun (V459) -> fun (V460) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V459, V460)) end end, fun (V461) -> fun (V462) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V461, V462)) end end, fun (V463) -> fun (V464) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V463, V464)) end end, fun (V465) -> fun (V466) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V465, V466)) end end, fun (V467) -> fun (V468) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V467, V468)) end end})) end(E39)); {'Idris.Core.CompileExpr.NmCrash', E40, E41} -> (fun (V469, V470) -> ('Idris.Idris2.Data.SortedSet':'un--empty'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V471) -> fun (V472) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V471, V472)) end end, fun (V473) -> fun (V474) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V473, V474)) end end}, fun (V475) -> fun (V476) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V475, V476)) end end, fun (V477) -> fun (V478) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V477, V478)) end end, fun (V479) -> fun (V480) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V479, V480)) end end, fun (V481) -> fun (V482) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V481, V482)) end end, fun (V483) -> fun (V484) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V483, V484)) end end, fun (V485) -> fun (V486) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V485, V486)) end end, fun (V487) -> fun (V488) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V487, V488)) end end})) end(E40, E41)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'un--defsUsedByNamedCExp'(V0, V1) -> ('un--calcUsedDefs'(('Idris.Idris2.Data.SortedSet':'un--toList'('erased', ('un--usedNames'(V0)))), V1)).
'un--defsToUsedMap'(V0) -> ('Idris.Idris2.Data.SortedMap':'un--fromList'('erased', 'erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V1) -> fun (V2) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V1, V2)) end end, fun (V3) -> fun (V4) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V3, V4)) end end}, fun (V5) -> fun (V6) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V5, V6)) end end, fun (V7) -> fun (V8) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V7, V8)) end end, fun (V9) -> fun (V10) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V9, V10)) end end, fun (V11) -> fun (V12) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V11, V12)) end end, fun (V13) -> fun (V14) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V13, V14)) end end, fun (V15) -> fun (V16) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V15, V16)) end end, fun (V17) -> fun (V18) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V17, V18)) end end}, ('Idris.Idris2.Prelude.Interfaces':'un--<$>'('erased', 'erased', 'erased', fun (V19) -> fun (V20) -> fun (V21) -> fun (V22) -> ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', V21, V22)) end end end end, fun (V23) -> case V23 of {'Idris.Builtin.MkPair', E0, E1} -> (fun (V24, V25) -> case V25 of {'Idris.Builtin.MkPair', E2, E3} -> (fun (V26, V27) -> {'Idris.Builtin.MkPair', V24, ('un--usedNamesDef'(V27))} end(E2, E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V0)))).
'un--calcUsedDefs'(V0, V1) -> begin (V20 = ('un--calcUsed'(('Idris.Idris2.Data.SortedSet':'un--empty'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V2) -> fun (V3) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V2, V3)) end end, fun (V4) -> fun (V5) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V4, V5)) end end}, fun (V6) -> fun (V7) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V6, V7)) end end, fun (V8) -> fun (V9) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V8, V9)) end end, fun (V10) -> fun (V11) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V10, V11)) end end, fun (V12) -> fun (V13) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V12, V13)) end end, fun (V14) -> fun (V15) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V14, V15)) end end, fun (V16) -> fun (V17) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V16, V17)) end end, fun (V18) -> fun (V19) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V18, V19)) end end})), ('un--defsToUsedMap'(V1)), V0))), ('Idris.Idris2.Data.List':'un--filter'('erased', fun (V21) -> case V21 of {'Idris.Builtin.MkPair', E0, E1} -> (fun (V22, V23) -> case V23 of {'Idris.Builtin.MkPair', E2, E3} -> (fun (V24, V25) -> ('Idris.Idris2.Data.SortedSet':'un--contains'('erased', V22, V20)) end(E2, E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V1)) end.
'un--calcUsed'(V0, V1, V2) -> case V2 of [] -> V0; _ -> begin (V28 = ('Idris.Idris2.Prelude.Types':'dn--un--foldl_Foldable__List'('erased', 'erased', fun (V3) -> fun (V4) -> ('nested--3831-444--in--un--f'(V2, V1, V0, V3, V4)) end end, ('Idris.Idris2.Data.SortedSet':'un--empty'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V5) -> fun (V6) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V5, V6)) end end, fun (V7) -> fun (V8) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V7, V8)) end end}, fun (V9) -> fun (V10) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V9, V10)) end end, fun (V11) -> fun (V12) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V11, V12)) end end, fun (V13) -> fun (V14) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V13, V14)) end end, fun (V15) -> fun (V16) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V15, V16)) end end, fun (V17) -> fun (V18) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V17, V18)) end end, fun (V19) -> fun (V20) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V19, V20)) end end, fun (V21) -> fun (V22) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V21, V22)) end end})), ('Idris.Idris2.Prelude.Interfaces':'un--<$>'('erased', 'erased', 'erased', fun (V23) -> fun (V24) -> fun (V25) -> fun (V26) -> ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', V25, V26)) end end end end, fun (V27) -> ('Idris.Idris2.Data.SortedMap':'un--lookup'('erased', 'erased', V27, V1)) end, V2))))), begin (V47 = ('Idris.Idris2.Data.SortedSet':'un--union'('erased', V0, ('Idris.Idris2.Data.SortedSet':'un--fromList'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkOrd', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V29) -> fun (V30) -> ('Idris.Idris2.Core.Name':'dn--un--==_Eq__Name'(V29, V30)) end end, fun (V31) -> fun (V32) -> ('Idris.Idris2.Core.Name':'dn--un--/=_Eq__Name'(V31, V32)) end end}, fun (V33) -> fun (V34) -> ('Idris.Idris2.Core.Name':'dn--un--compare_Ord__Name'(V33, V34)) end end, fun (V35) -> fun (V36) -> ('Idris.Idris2.Core.Name':'dn--un--<_Ord__Name'(V35, V36)) end end, fun (V37) -> fun (V38) -> ('Idris.Idris2.Core.Name':'dn--un-->_Ord__Name'(V37, V38)) end end, fun (V39) -> fun (V40) -> ('Idris.Idris2.Core.Name':'dn--un--<=_Ord__Name'(V39, V40)) end end, fun (V41) -> fun (V42) -> ('Idris.Idris2.Core.Name':'dn--un-->=_Ord__Name'(V41, V42)) end end, fun (V43) -> fun (V44) -> ('Idris.Idris2.Core.Name':'dn--un--max_Ord__Name'(V43, V44)) end end, fun (V45) -> fun (V46) -> ('Idris.Idris2.Core.Name':'dn--un--min_Ord__Name'(V45, V46)) end end}, V2))))), ('un--calcUsed'(V47, V1, ('Idris.Idris2.Data.SortedSet':'un--toList'('erased', ('Idris.Idris2.Data.SortedSet':'un--difference'('erased', V28, V47)))))) end end end.