Current section
Files
Jump to
Current section
Files
src/Idris.Idris2.Core.Directory.erl
-module('Idris.Idris2.Core.Directory').
-compile('no_auto_import').
-compile('inline').
-compile({'inline_size',24}).
-export([
'case--findIpkgFile-1488'/1,
'case--case block in case block in findIpkgFile,findIpkgFile\x{27}-1435'/5,
'case--case block in findIpkgFile,findIpkgFile\x{27}-1397'/5,
'case--findIpkgFile,findIpkgFile\x{27}-1373'/3,
'case--ensureDirectoryExists-1304'/2,
'case--makeBuildDirectory-1253'/7,
'case--case block in case block in mkdirAll-1209'/3,
'case--case block in case block in mkdirAll-1185'/3,
'case--case block in mkdirAll-1164'/2,
'case--mkdirAll-1140'/2,
'case--pathToNS-1076'/6,
'case--pathToNS-1054'/5,
'case--nsToSource-980'/8,
'case--case block in case block in case block in case block in nsToPath-782'/19,
'case--case block in case block in case block in nsToPath-721'/14,
'case--case block in case block in nsToPath-687'/12,
'case--case block in nsToPath-657'/10,
'case--nsToPath-607'/8,
'case--findLibraryFile-528'/6,
'case--case block in readDataFile-429'/7,
'case--readDataFile-405'/5,
'case--getPkgDirs,getPkgDir-331'/6,
'case--firstAvailable-277'/3,
'nested--6337-307--in--un--getPkgDir'/3,
'nested--7506-1357--in--un--findIpkgFile\x{27}'/3,
'un--toLocalFile'/1,
'un--readDataFile'/3,
'un--pathToNS'/3,
'un--nsToSource'/4,
'un--nsToPath'/4,
'un--mkdirAll'/1,
'un--makeBuildDirectory'/3,
'un--getTTCFileName'/4,
'un--getPkgDirs'/2,
'un--getExecFileName'/3,
'un--firstAvailable'/1,
'un--findLibraryFile'/3,
'un--findIpkgFile'/1,
'un--filenameFromModuleLocation'/1,
'un--ensureDirectoryExists'/2
]).
'case--findIpkgFile-1488'(V0) -> case V0 of {'Idris.Prelude.Types.Just', E0} -> (fun (V1) -> fun (V2) -> begin (V3 = ('nested--7506-1357--in--un--findIpkgFile\x{27}'(V1, <<""/utf8>>, V2))), V3 end end end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V4) -> {'Idris.Prelude.Types.Nothing'} end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--case block in case block in findIpkgFile,findIpkgFile\x{27}-1435'(V0, V1, V2, V3, V4) -> case V4 of {'Idris.Prelude.Types.Just', E0} -> (fun (V5) -> case V5 of {'Idris.Builtin.MkPair', E1, E2} -> (fun (V6, V7) -> fun (V8) -> ('nested--7506-1357--in--un--findIpkgFile\x{27}'(V6, ('Idris.Idris2.Utils.Path':'un--</>'(V7, V0)), V8)) end end(E1, E2)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V9) -> {'Idris.Prelude.Types.Nothing'} end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--case block in findIpkgFile,findIpkgFile\x{27}-1397'(V0, V1, V2, V3, V4) -> case V4 of {'Idris.Prelude.Types.Just', E0} -> (fun (V5) -> fun (V6) -> {'Idris.Prelude.Types.Just', {'Idris.Builtin.MkPair', V1, {'Idris.Builtin.MkPair', V5, V0}}} end end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> ('case--case block in case block in findIpkgFile,findIpkgFile\x{27}-1435'(V0, V1, V2, V3, ('Idris.Idris2.Utils.Path':'un--splitParent'(V1)))) end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--findIpkgFile,findIpkgFile\x{27}-1373'(V0, V1, V2) -> case V2 of {'Idris.Prelude.Types.Right', E0} -> (fun (V3) -> begin (V4 = {'Idris.Prelude.Types.Right', V3}), ('case--case block in findIpkgFile,findIpkgFile\x{27}-1397'(V0, V1, V3, V4, ('Idris.Idris2.Data.List':'un--find'('erased', fun (V5) -> ('Idris.Idris2.Prelude.Types':'dn--un--==_Eq__(Maybe $a)'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V6) -> fun (V7) -> ('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V6, V7)) end end, fun (V8) -> fun (V9) -> ('Idris.Idris2.Prelude.EqOrd':'dn--un--/=_Eq__String'(V8, V9)) end end}, ('Idris.Idris2.Utils.Path':'un--extension'(V5)), {'Idris.Prelude.Types.Just', <<"ipkg"/utf8>>})) end, V3)))) end end(E0)); {'Idris.Prelude.Types.Left', E1} -> (fun (V10) -> fun (V11) -> {'Idris.Prelude.Types.Nothing'} end end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--ensureDirectoryExists-1304'(V0, V1) -> case V1 of {'Idris.Prelude.Types.Right', E0} -> (fun (V2) -> fun (V3) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkUnit'}} end end(E0)); {'Idris.Prelude.Types.Left', E1} -> (fun (V4) -> fun (V5) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.FileErr', V0, V4}, V5)) end end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--makeBuildDirectory-1253'(V0, V1, V2, V3, V4, V5, V6) -> case V6 of {'Idris.Prelude.Types.Right', E0} -> (fun (V7) -> fun (V8) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkUnit'}} end end(E0)); {'Idris.Prelude.Types.Left', E1} -> (fun (V9) -> fun (V10) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.FileErr', ('Idris.Idris2.Utils.Path':'un--</>'(case V2 of {'Idris.Core.Options.MkDirs', E2, E3, E4, E5, E6, E7, E8, E9, E10} -> (fun (V11, V12, V13, V14, V15, V16, V17, V18, V19) -> V13 end(E2, E3, E4, E5, E6, E7, E8, E9, E10)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end, V5)), V9}, V10)) end end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--case block in case block in mkdirAll-1209'(V0, V1, V2) -> case V2 of {'Idris.Prelude.Types.Right', E0} -> (fun (V3) -> case V3 of {'Idris.Builtin.MkUnit'} -> (fun () -> ('Idris.Idris2.Erlang.System.Directory':'un--createDir'('erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V4) -> fun (V5) -> fun (V6) -> fun (V7) -> fun (V8) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6, V7, V8)) end end end end end, fun (V9) -> fun (V10) -> fun (V11) -> V10 end end end, fun (V12) -> fun (V13) -> fun (V14) -> fun (V15) -> fun (V16) -> begin (V17 = (V14(V16))), begin (V18 = (V15(V16))), (V17(V18)) end end end end end end end}, fun (V19) -> fun (V20) -> fun (V21) -> fun (V22) -> fun (V23) -> begin (V24 = (V21(V23))), ((V22(V24))(V23)) end end end end end end, fun (V25) -> fun (V26) -> fun (V27) -> begin (V28 = (V26(V27))), (V28(V27)) end end end end}, fun (V29) -> fun (V30) -> V30 end end}, V0)) end()); _ -> fun (V31) -> V2 end end end(E0)); _ -> fun (V32) -> V2 end end.
'case--case block in case block in mkdirAll-1185'(V0, V1, V2) -> case V2 of {'Idris.Prelude.Types.Just', E0} -> (fun (V3) -> ('un--mkdirAll'(V3)) end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V4) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkUnit'}} end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--case block in mkdirAll-1164'(V0, V1) -> case V1 of 0 -> fun (V2) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkUnit'}} end; 1 -> fun (V3) -> begin (V5 = begin (V4 = 1), (('case--case block in case block in mkdirAll-1185'(V0, V4, ('Idris.Idris2.Utils.Path':'un--parent'(V0))))(V3)) end), case V5 of {'Idris.Prelude.Types.Right', E0} -> (fun (V6) -> case V6 of {'Idris.Builtin.MkUnit'} -> (fun () -> (('Idris.Idris2.Erlang.System.Directory':'un--createDir'('erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7) -> fun (V8) -> fun (V9) -> fun (V10) -> fun (V11) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9, V10, V11)) end end end end end, fun (V12) -> fun (V13) -> fun (V14) -> V13 end end end, fun (V15) -> fun (V16) -> fun (V17) -> fun (V18) -> fun (V19) -> begin (V20 = (V17(V19))), begin (V21 = (V18(V19))), (V20(V21)) end end end end end end end}, fun (V22) -> fun (V23) -> fun (V24) -> fun (V25) -> fun (V26) -> begin (V27 = (V24(V26))), ((V25(V27))(V26)) end end end end end end, fun (V28) -> fun (V29) -> fun (V30) -> begin (V31 = (V29(V30))), (V31(V30)) end end end end}, fun (V32) -> fun (V33) -> V33 end end}, V0))(V3)) end()); _ -> V5 end end(E0)); _ -> V5 end end end; _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--mkdirAll-1140'(V0, V1) -> case V1 of 0 -> fun (V2) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkUnit'}} end; 1 -> fun (V3) -> begin (V31 = (('Idris.Idris2.Erlang.System.Directory':'un--dirExists'('erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V4) -> fun (V5) -> fun (V6) -> fun (V7) -> fun (V8) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6, V7, V8)) end end end end end, fun (V9) -> fun (V10) -> fun (V11) -> V10 end end end, fun (V12) -> fun (V13) -> fun (V14) -> fun (V15) -> fun (V16) -> begin (V17 = (V14(V16))), begin (V18 = (V15(V16))), (V17(V18)) end end end end end end end}, fun (V19) -> fun (V20) -> fun (V21) -> fun (V22) -> fun (V23) -> begin (V24 = (V21(V23))), ((V22(V24))(V23)) end end end end end end, fun (V25) -> fun (V26) -> fun (V27) -> begin (V28 = (V26(V27))), (V28(V27)) end end end end}, fun (V29) -> fun (V30) -> V30 end end}, V0))(V3))), case V31 of 0 -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkUnit'}}; 1 -> begin (V33 = begin (V32 = 1), (('case--case block in case block in mkdirAll-1185'(V0, V32, ('Idris.Idris2.Utils.Path':'un--parent'(V0))))(V3)) end), case V33 of {'Idris.Prelude.Types.Right', E0} -> (fun (V34) -> case V34 of {'Idris.Builtin.MkUnit'} -> (fun () -> (('Idris.Idris2.Erlang.System.Directory':'un--createDir'('erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V35) -> fun (V36) -> fun (V37) -> fun (V38) -> fun (V39) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V37, V38, V39)) end end end end end, fun (V40) -> fun (V41) -> fun (V42) -> V41 end end end, fun (V43) -> fun (V44) -> fun (V45) -> fun (V46) -> fun (V47) -> begin (V48 = (V45(V47))), begin (V49 = (V46(V47))), (V48(V49)) end end end end end end end}, fun (V50) -> fun (V51) -> fun (V52) -> fun (V53) -> fun (V54) -> begin (V55 = (V52(V54))), ((V53(V55))(V54)) end end end end end end, fun (V56) -> fun (V57) -> fun (V58) -> begin (V59 = (V57(V58))), (V59(V58)) end end end end}, fun (V60) -> fun (V61) -> V61 end end}, V0))(V3)) end()); _ -> V33 end end(E0)); _ -> V33 end end; _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end; _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--pathToNS-1076'(V0, V1, V2, V3, V4, V5) -> case V5 of {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V6) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.UserError', ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Source file "/utf8>>, ('Idris.Idris2.Prelude.Types.Strings':'un--++'(('Idris.Idris2.Prelude.Show':'dn--un--show_Show__String'(V0)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<" is not in the source directory "/utf8>>, ('Idris.Idris2.Prelude.Show':'dn--un--show_Show__String'(('Idris.Idris2.Utils.Path':'un--</>'(V2, V3))))))))))}, V6)) end end()); {'Idris.Prelude.Types.Just', E0} -> (fun (V7) -> fun (V8) -> {'Idris.Prelude.Types.Right', ('Idris.Idris2.Core.Name.Namespace':'un--unsafeFoldModuleIdent'(('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', fun (V9) -> ('Idris.Idris2.Utils.Path':'dn--un--show_Show__Body'(V9)) end, ('Idris.Idris2.Data.List':'un--reverse'('erased', case ('Idris.Idris2.Utils.Path':'un--parse'(('Idris.Idris2.Utils.Path':'un--<.>'(V7, <<""/utf8>>)))) of {'Idris.Utils.Path.MkPath', E1, E2, E3, E4} -> (fun (V10, V11, V12, V13) -> V12 end(E1, E2, E3, E4)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))))))} end end(E0)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--pathToNS-1054'(V0, V1, V2, V3, V4) -> case V4 of 0 -> ('Idris.Idris2.Utils.Path':'un--</>'(V2, V3)); 1 -> V3; _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--nsToSource-980'(V0, V1, V2, V3, V4, V5, V6, V7) -> case V7 of {'Idris.Prelude.Types.Just', E0} -> (fun (V8) -> fun (V9) -> {'Idris.Prelude.Types.Right', V8} end end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V10) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.ModuleNotFound', V1, V0}, V10)) end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--case block in case block in case block in case block in nsToPath-782'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13, V14, V15, V16, V17, V18) -> case V18 of {'Idris.Prelude.Types.Just', E0} -> (fun (V19) -> fun (V20) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Right', {'Idris.Core.Directory.EscriptFile', V19}}} end end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V21) -> {'Idris.Prelude.Types.Right', V8} end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--case block in case block in case block in nsToPath-721'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13) -> case V13 of {'Idris.Prelude.Types.Just', E0} -> (fun (V14) -> fun (V15) -> begin (V17 = begin (V16 = ('Idris.Idris2.Utils.Escript':'un--closeArchive'(V11, V15))), {'Idris.Prelude.Types.Right', V16} end), case V17 of {'Idris.Prelude.Types.Left', E1} -> (fun (V18) -> {'Idris.Prelude.Types.Left', V18} end(E1)); {'Idris.Prelude.Types.Right', E2} -> (fun (V19) -> begin (V20 = ('Idris.Idris2.Core.Context':'un--getSession'(V2, V15))), case V20 of {'Idris.Prelude.Types.Left', E3} -> (fun (V21) -> {'Idris.Prelude.Types.Left', V21} end(E3)); {'Idris.Prelude.Types.Right', E4} -> (fun (V22) -> begin (V38 = ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', fun (V23) -> ('Idris.Idris2.Utils.Path':'un--</>'(<<"idris2/priv/libs"/utf8>>, ('Idris.Idris2.Utils.Path':'un--</>'(V23, ('Idris.Idris2.Utils.Path':'un--<.>'(V5, <<"ttc"/utf8>>)))))) end, case V22 of {'Idris.Core.Options.MkSessionOpts', E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18} -> (fun (V24, V25, V26, V27, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37) -> V29 end(E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))), begin (V39 = {'Idris.Prelude.Types.Just', V14}), (('case--case block in case block in case block in case block in nsToPath-782'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V14, V39, V19, V22, V38, ('Idris.Idris2.Data.List':'un--find'('erased', fun (V40) -> ('Idris.Idris2.Prelude.Types':'un--elem'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V41) -> fun (V42) -> ('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V41, V42)) end end, fun (V43) -> fun (V44) -> ('Idris.Idris2.Prelude.EqOrd':'dn--un--/=_Eq__String'(V43, V44)) end end}, V40, V14)) end, V38))))(V15)) end end end(E4)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V45) -> {'Idris.Prelude.Types.Right', V8} end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--case block in case block in nsToPath-687'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11) -> case V11 of {'Idris.Prelude.Types.Just', E0} -> (fun (V12) -> fun (V13) -> begin (V15 = begin (V14 = ('Idris.Idris2.Utils.Escript':'un--listFiles'(V12, V13))), {'Idris.Prelude.Types.Right', V14} end), case V15 of {'Idris.Prelude.Types.Left', E1} -> (fun (V16) -> {'Idris.Prelude.Types.Left', V16} end(E1)); {'Idris.Prelude.Types.Right', E2} -> (fun (V17) -> begin (V18 = {'Idris.Prelude.Types.Just', V12}), case V17 of {'Idris.Prelude.Types.Just', E3} -> (fun (V19) -> begin (V21 = begin (V20 = ('Idris.Idris2.Utils.Escript':'un--closeArchive'(V12, V13))), {'Idris.Prelude.Types.Right', V20} end), case V21 of {'Idris.Prelude.Types.Left', E4} -> (fun (V22) -> {'Idris.Prelude.Types.Left', V22} end(E4)); {'Idris.Prelude.Types.Right', E5} -> (fun (V23) -> begin (V24 = ('Idris.Idris2.Core.Context':'un--getSession'(V2, V13))), case V24 of {'Idris.Prelude.Types.Left', E6} -> (fun (V25) -> {'Idris.Prelude.Types.Left', V25} end(E6)); {'Idris.Prelude.Types.Right', E7} -> (fun (V26) -> begin (V42 = ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', fun (V27) -> ('Idris.Idris2.Utils.Path':'un--</>'(<<"idris2/priv/libs"/utf8>>, ('Idris.Idris2.Utils.Path':'un--</>'(V27, ('Idris.Idris2.Utils.Path':'un--<.>'(V5, <<"ttc"/utf8>>)))))) end, case V26 of {'Idris.Core.Options.MkSessionOpts', E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21} -> (fun (V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41) -> V33 end(E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))), begin (V43 = {'Idris.Prelude.Types.Just', V19}), (('case--case block in case block in case block in case block in nsToPath-782'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V12, V18, V19, V43, V23, V26, V42, ('Idris.Idris2.Data.List':'un--find'('erased', fun (V44) -> ('Idris.Idris2.Prelude.Types':'un--elem'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V45) -> fun (V46) -> ('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V45, V46)) end end, fun (V47) -> fun (V48) -> ('Idris.Idris2.Prelude.EqOrd':'dn--un--/=_Eq__String'(V47, V48)) end end}, V44, V19)) end, V42))))(V13)) end end end(E7)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E5)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> {'Idris.Prelude.Types.Right', V8} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V49) -> {'Idris.Prelude.Types.Right', V8} end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--case block in nsToPath-657'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9) -> case V9 of {'Idris.Prelude.Types.Just', E0} -> (fun (V10) -> fun (V11) -> begin (V13 = begin (V12 = ('Idris.Idris2.Utils.Escript':'un--openArchive'(V10, V11))), {'Idris.Prelude.Types.Right', V12} end), case V13 of {'Idris.Prelude.Types.Left', E1} -> (fun (V14) -> {'Idris.Prelude.Types.Left', V14} end(E1)); {'Idris.Prelude.Types.Right', E2} -> (fun (V15) -> begin (V16 = {'Idris.Prelude.Types.Just', V10}), case V15 of {'Idris.Prelude.Types.Just', E3} -> (fun (V17) -> begin (V19 = begin (V18 = ('Idris.Idris2.Utils.Escript':'un--listFiles'(V17, V11))), {'Idris.Prelude.Types.Right', V18} end), case V19 of {'Idris.Prelude.Types.Left', E4} -> (fun (V20) -> {'Idris.Prelude.Types.Left', V20} end(E4)); {'Idris.Prelude.Types.Right', E5} -> (fun (V21) -> begin (V22 = {'Idris.Prelude.Types.Just', V17}), case V21 of {'Idris.Prelude.Types.Just', E6} -> (fun (V23) -> begin (V25 = begin (V24 = ('Idris.Idris2.Utils.Escript':'un--closeArchive'(V17, V11))), {'Idris.Prelude.Types.Right', V24} end), case V25 of {'Idris.Prelude.Types.Left', E7} -> (fun (V26) -> {'Idris.Prelude.Types.Left', V26} end(E7)); {'Idris.Prelude.Types.Right', E8} -> (fun (V27) -> begin (V28 = ('Idris.Idris2.Core.Context':'un--getSession'(V2, V11))), case V28 of {'Idris.Prelude.Types.Left', E9} -> (fun (V29) -> {'Idris.Prelude.Types.Left', V29} end(E9)); {'Idris.Prelude.Types.Right', E10} -> (fun (V30) -> begin (V46 = ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', fun (V31) -> ('Idris.Idris2.Utils.Path':'un--</>'(<<"idris2/priv/libs"/utf8>>, ('Idris.Idris2.Utils.Path':'un--</>'(V31, ('Idris.Idris2.Utils.Path':'un--<.>'(V5, <<"ttc"/utf8>>)))))) end, case V30 of {'Idris.Core.Options.MkSessionOpts', E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24} -> (fun (V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, V42, V43, V44, V45) -> V37 end(E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))), begin (V47 = {'Idris.Prelude.Types.Just', V23}), (('case--case block in case block in case block in case block in nsToPath-782'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V10, V16, V17, V22, V23, V47, V27, V30, V46, ('Idris.Idris2.Data.List':'un--find'('erased', fun (V48) -> ('Idris.Idris2.Prelude.Types':'un--elem'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V49) -> fun (V50) -> ('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V49, V50)) end end, fun (V51) -> fun (V52) -> ('Idris.Idris2.Prelude.EqOrd':'dn--un--/=_Eq__String'(V51, V52)) end end}, V48, V23)) end, V46))))(V11)) end end end(E10)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E8)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E6)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> {'Idris.Prelude.Types.Right', V8} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E5)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> {'Idris.Prelude.Types.Right', V8} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V53) -> {'Idris.Prelude.Types.Right', V8} end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--nsToPath-607'(V0, V1, V2, V3, V4, V5, V6, V7) -> case V7 of {'Idris.Prelude.Types.Just', E0} -> (fun (V8) -> fun (V9) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Right', {'Idris.Core.Directory.LocalFile', V8}}} end end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> begin (V10 = {'Idris.Prelude.Types.Left', {'Idris.Core.Core.ModuleNotFound', V1, V0}}), fun (V11) -> begin (V13 = begin (V12 = ('Idris.Idris2.Utils.Escript':'un--getEscriptPath'(V11))), {'Idris.Prelude.Types.Right', V12} end), case V13 of {'Idris.Prelude.Types.Left', E1} -> (fun (V14) -> {'Idris.Prelude.Types.Left', V14} end(E1)); {'Idris.Prelude.Types.Right', E2} -> (fun (V15) -> begin (V16 = {'Idris.Prelude.Types.Nothing'}), case V15 of {'Idris.Prelude.Types.Just', E3} -> (fun (V17) -> begin (V19 = begin (V18 = ('Idris.Idris2.Utils.Escript':'un--openArchive'(V17, V11))), {'Idris.Prelude.Types.Right', V18} end), case V19 of {'Idris.Prelude.Types.Left', E4} -> (fun (V20) -> {'Idris.Prelude.Types.Left', V20} end(E4)); {'Idris.Prelude.Types.Right', E5} -> (fun (V21) -> begin (V22 = {'Idris.Prelude.Types.Just', V17}), case V21 of {'Idris.Prelude.Types.Just', E6} -> (fun (V23) -> begin (V25 = begin (V24 = ('Idris.Idris2.Utils.Escript':'un--listFiles'(V23, V11))), {'Idris.Prelude.Types.Right', V24} end), case V25 of {'Idris.Prelude.Types.Left', E7} -> (fun (V26) -> {'Idris.Prelude.Types.Left', V26} end(E7)); {'Idris.Prelude.Types.Right', E8} -> (fun (V27) -> begin (V28 = {'Idris.Prelude.Types.Just', V23}), case V27 of {'Idris.Prelude.Types.Just', E9} -> (fun (V29) -> begin (V31 = begin (V30 = ('Idris.Idris2.Utils.Escript':'un--closeArchive'(V23, V11))), {'Idris.Prelude.Types.Right', V30} end), case V31 of {'Idris.Prelude.Types.Left', E10} -> (fun (V32) -> {'Idris.Prelude.Types.Left', V32} end(E10)); {'Idris.Prelude.Types.Right', E11} -> (fun (V33) -> begin (V34 = ('Idris.Idris2.Core.Context':'un--getSession'(V2, V11))), case V34 of {'Idris.Prelude.Types.Left', E12} -> (fun (V35) -> {'Idris.Prelude.Types.Left', V35} end(E12)); {'Idris.Prelude.Types.Right', E13} -> (fun (V36) -> begin (V52 = ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', fun (V37) -> ('Idris.Idris2.Utils.Path':'un--</>'(<<"idris2/priv/libs"/utf8>>, ('Idris.Idris2.Utils.Path':'un--</>'(V37, ('Idris.Idris2.Utils.Path':'un--<.>'(V5, <<"ttc"/utf8>>)))))) end, case V36 of {'Idris.Core.Options.MkSessionOpts', E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24, E25, E26, E27} -> (fun (V38, V39, V40, V41, V42, V43, V44, V45, V46, V47, V48, V49, V50, V51) -> V43 end(E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24, E25, E26, E27)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))), begin (V53 = {'Idris.Prelude.Types.Just', V29}), (('case--case block in case block in case block in case block in nsToPath-782'(V0, V1, V2, V3, V4, V5, V6, V16, V10, V17, V22, V23, V28, V29, V53, V33, V36, V52, ('Idris.Idris2.Data.List':'un--find'('erased', fun (V54) -> ('Idris.Idris2.Prelude.Types':'un--elem'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V55) -> fun (V56) -> ('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V55, V56)) end end, fun (V57) -> fun (V58) -> ('Idris.Idris2.Prelude.EqOrd':'dn--un--/=_Eq__String'(V57, V58)) end end}, V54, V29)) end, V52))))(V11)) end end end(E13)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E11)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E9)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> {'Idris.Prelude.Types.Right', V10} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E8)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E6)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> {'Idris.Prelude.Types.Right', V10} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E5)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> {'Idris.Prelude.Types.Right', V10} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--findLibraryFile-528'(V0, V1, V2, V3, V4, V5) -> case V5 of {'Idris.Prelude.Types.Just', E0} -> (fun (V6) -> fun (V7) -> {'Idris.Prelude.Types.Right', V6} end end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V8) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.InternalError', ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t find library "/utf8>>, V0))}, V8)) end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--case block in readDataFile-429'(V0, V1, V2, V3, V4, V5, V6) -> case V6 of {'Idris.Prelude.Types.Right', E0} -> (fun (V7) -> fun (V8) -> {'Idris.Prelude.Types.Right', V7} end end(E0)); {'Idris.Prelude.Types.Left', E1} -> (fun (V9) -> fun (V10) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.FileErr', V4, V9}, V10)) end end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--readDataFile-405'(V0, V1, V2, V3, V4) -> case V4 of {'Idris.Prelude.Types.Just', E0} -> (fun (V5) -> fun (V6) -> begin (V35 = begin (V34 = (('Idris.Idris2.Erlang.System.File':'un--readFile'('erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7) -> fun (V8) -> fun (V9) -> fun (V10) -> fun (V11) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9, V10, V11)) end end end end end, fun (V12) -> fun (V13) -> fun (V14) -> V13 end end end, fun (V15) -> fun (V16) -> fun (V17) -> fun (V18) -> fun (V19) -> begin (V20 = (V17(V19))), begin (V21 = (V18(V19))), (V20(V21)) end end end end end end end}, fun (V22) -> fun (V23) -> fun (V24) -> fun (V25) -> fun (V26) -> begin (V27 = (V24(V26))), ((V25(V27))(V26)) end end end end end end, fun (V28) -> fun (V29) -> fun (V30) -> begin (V31 = (V29(V30))), (V31(V30)) end end end end}, fun (V32) -> fun (V33) -> V33 end end}, V5))(V6))), {'Idris.Prelude.Types.Right', V34} end), case V35 of {'Idris.Prelude.Types.Left', E1} -> (fun (V36) -> {'Idris.Prelude.Types.Left', V36} end(E1)); {'Idris.Prelude.Types.Right', E2} -> (fun (V37) -> case V37 of {'Idris.Prelude.Types.Right', E3} -> (fun (V38) -> {'Idris.Prelude.Types.Right', V38} end(E3)); {'Idris.Prelude.Types.Left', E4} -> (fun (V39) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.FileErr', V5, V39}, V6)) end(E4)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V40) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.InternalError', ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t find data file "/utf8>>, ('Idris.Idris2.Prelude.Types.Strings':'un--++'(V0, ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<" in any of "/utf8>>, ('Idris.Idris2.Prelude.Show':'dn--un--show_Show__(List $a)'('erased', {'Idris.Prelude.Show.dn--un--__mkShow', fun (V41) -> ('Idris.Idris2.Prelude.Show':'dn--un--show_Show__String'(V41)) end, fun (V42) -> fun (V43) -> ('Idris.Idris2.Prelude.Show':'dn--un--showPrec_Show__String'(V42, V43)) end end}, V3))))))))}, V40)) end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--getPkgDirs,getPkgDir-331'(V0, V1, V2, V3, V4, V5) -> case V5 of 0 -> fun (V6) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Just', V4}} end; 1 -> ('nested--6337-307--in--un--getPkgDir'(V0, V2, V3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'case--firstAvailable-277'(V0, V1, V2) -> case V2 of {'Idris.Prelude.Types.Right', E0} -> (fun (V3) -> fun (V4) -> begin (V33 = begin (V32 = (('Idris.Idris2.Erlang.System.File':'un--closeFile'('erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5) -> fun (V6) -> fun (V7) -> fun (V8) -> fun (V9) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7, V8, V9)) end end end end end, fun (V10) -> fun (V11) -> fun (V12) -> V11 end end end, fun (V13) -> fun (V14) -> fun (V15) -> fun (V16) -> fun (V17) -> begin (V18 = (V15(V17))), begin (V19 = (V16(V17))), (V18(V19)) end end end end end end end}, fun (V20) -> fun (V21) -> fun (V22) -> fun (V23) -> fun (V24) -> begin (V25 = (V22(V24))), ((V23(V25))(V24)) end end end end end end, fun (V26) -> fun (V27) -> fun (V28) -> begin (V29 = (V27(V28))), (V29(V28)) end end end end}, fun (V30) -> fun (V31) -> V31 end end}, V3))(V4))), {'Idris.Prelude.Types.Right', V32} end), case V33 of {'Idris.Prelude.Types.Left', E1} -> (fun (V34) -> {'Idris.Prelude.Types.Left', V34} end(E1)); {'Idris.Prelude.Types.Right', E2} -> (fun (V35) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Just', V0}} end(E2)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E0)); {'Idris.Prelude.Types.Left', E3} -> (fun (V36) -> ('un--firstAvailable'(V1)) end(E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'nested--6337-307--in--un--getPkgDir'(V0, V1, V2) -> case V1 of [] -> fun (V3) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Nothing'}} end; [E0 | E1] -> (fun (V4, V5) -> begin (V6 = ('Idris.Idris2.Utils.Path':'un--</>'(V4, V2))), fun (V7) -> begin (V36 = begin (V35 = (('Idris.Idris2.Erlang.System.Directory':'un--dirExists'('erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V8) -> fun (V9) -> fun (V10) -> fun (V11) -> fun (V12) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V10, V11, V12)) end end end end end, fun (V13) -> fun (V14) -> fun (V15) -> V14 end end end, fun (V16) -> fun (V17) -> fun (V18) -> fun (V19) -> fun (V20) -> begin (V21 = (V18(V20))), begin (V22 = (V19(V20))), (V21(V22)) end end end end end end end}, fun (V23) -> fun (V24) -> fun (V25) -> fun (V26) -> fun (V27) -> begin (V28 = (V25(V27))), ((V26(V28))(V27)) end end end end end end, fun (V29) -> fun (V30) -> fun (V31) -> begin (V32 = (V30(V31))), (V32(V31)) end end end end}, fun (V33) -> fun (V34) -> V34 end end}, V6))(V7))), {'Idris.Prelude.Types.Right', V35} end), case V36 of {'Idris.Prelude.Types.Left', E2} -> (fun (V37) -> {'Idris.Prelude.Types.Left', V37} end(E2)); {'Idris.Prelude.Types.Right', E3} -> (fun (V38) -> case V38 of 0 -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Just', V6}}; 1 -> (('nested--6337-307--in--un--getPkgDir'(V0, V5, V2))(V7)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'nested--7506-1357--in--un--findIpkgFile\x{27}'(V0, V1, V2) -> begin (V30 = (('Idris.Idris2.Erlang.System.Directory':'un--dirEntries'('erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3) -> fun (V4) -> fun (V5) -> fun (V6) -> fun (V7) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V5, V6, V7)) end end end end end, fun (V8) -> fun (V9) -> fun (V10) -> V9 end end end, fun (V11) -> fun (V12) -> fun (V13) -> fun (V14) -> fun (V15) -> begin (V16 = (V13(V15))), begin (V17 = (V14(V15))), (V16(V17)) end end end end end end end}, fun (V18) -> fun (V19) -> fun (V20) -> fun (V21) -> fun (V22) -> begin (V23 = (V20(V22))), ((V21(V23))(V22)) end end end end end end, fun (V24) -> fun (V25) -> fun (V26) -> begin (V27 = (V25(V26))), (V27(V26)) end end end end}, fun (V28) -> fun (V29) -> V29 end end}, V0))(V2))), case V30 of {'Idris.Prelude.Types.Right', E0} -> (fun (V31) -> begin (V32 = {'Idris.Prelude.Types.Right', V31}), (('case--case block in findIpkgFile,findIpkgFile\x{27}-1397'(V1, V0, V31, V32, ('Idris.Idris2.Data.List':'un--find'('erased', fun (V33) -> ('Idris.Idris2.Prelude.Types':'dn--un--==_Eq__(Maybe $a)'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V34) -> fun (V35) -> ('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V34, V35)) end end, fun (V36) -> fun (V37) -> ('Idris.Idris2.Prelude.EqOrd':'dn--un--/=_Eq__String'(V36, V37)) end end}, ('Idris.Idris2.Utils.Path':'un--extension'(V33)), {'Idris.Prelude.Types.Just', <<"ipkg"/utf8>>})) end, V31))))(V2)) end end(E0)); {'Idris.Prelude.Types.Left', E1} -> (fun (V38) -> {'Idris.Prelude.Types.Nothing'} end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end.
'un--toLocalFile'(V0) -> case V0 of {'Idris.Core.Directory.LocalFile', E0} -> (fun (V1) -> {'Idris.Prelude.Types.Just', V1} end(E0)); {'Idris.Core.Directory.EscriptFile', E1} -> (fun (V2) -> {'Idris.Prelude.Types.Nothing'} end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'un--readDataFile'(V0, V1, V2) -> begin (V3 = ('Idris.Idris2.Core.Context':'un--getDirs'(V0, V2))), case V3 of {'Idris.Prelude.Types.Left', E0} -> (fun (V4) -> {'Idris.Prelude.Types.Left', V4} end(E0)); {'Idris.Prelude.Types.Right', E1} -> (fun (V5) -> begin (V16 = ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', fun (V6) -> ('Idris.Idris2.Utils.Path':'un--</>'(V6, V1)) end, case V5 of {'Idris.Core.Options.MkDirs', E2, E3, E4, E5, E6, E7, E8, E9, E10} -> (fun (V7, V8, V9, V10, V11, V12, V13, V14, V15) -> V15 end(E2, E3, E4, E5, E6, E7, E8, E9, E10)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))), begin (V17 = (('un--firstAvailable'(V16))(V2))), case V17 of {'Idris.Prelude.Types.Left', E11} -> (fun (V18) -> {'Idris.Prelude.Types.Left', V18} end(E11)); {'Idris.Prelude.Types.Right', E12} -> (fun (V19) -> case V19 of {'Idris.Prelude.Types.Just', E13} -> (fun (V20) -> begin (V49 = begin (V48 = (('Idris.Idris2.Erlang.System.File':'un--readFile'('erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V21) -> fun (V22) -> fun (V23) -> fun (V24) -> fun (V25) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V23, V24, V25)) end end end end end, fun (V26) -> fun (V27) -> fun (V28) -> V27 end end end, fun (V29) -> fun (V30) -> fun (V31) -> fun (V32) -> fun (V33) -> begin (V34 = (V31(V33))), begin (V35 = (V32(V33))), (V34(V35)) end end end end end end end}, fun (V36) -> fun (V37) -> fun (V38) -> fun (V39) -> fun (V40) -> begin (V41 = (V38(V40))), ((V39(V41))(V40)) end end end end end end, fun (V42) -> fun (V43) -> fun (V44) -> begin (V45 = (V43(V44))), (V45(V44)) end end end end}, fun (V46) -> fun (V47) -> V47 end end}, V20))(V2))), {'Idris.Prelude.Types.Right', V48} end), case V49 of {'Idris.Prelude.Types.Left', E14} -> (fun (V50) -> {'Idris.Prelude.Types.Left', V50} end(E14)); {'Idris.Prelude.Types.Right', E15} -> (fun (V51) -> case V51 of {'Idris.Prelude.Types.Right', E16} -> (fun (V52) -> {'Idris.Prelude.Types.Right', V52} end(E16)); {'Idris.Prelude.Types.Left', E17} -> (fun (V53) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.FileErr', V20, V53}, V2)) end(E17)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E15)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E13)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.InternalError', ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t find data file "/utf8>>, ('Idris.Idris2.Prelude.Types.Strings':'un--++'(V1, ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<" in any of "/utf8>>, ('Idris.Idris2.Prelude.Show':'dn--un--show_Show__(List $a)'('erased', {'Idris.Prelude.Show.dn--un--__mkShow', fun (V54) -> ('Idris.Idris2.Prelude.Show':'dn--un--show_Show__String'(V54)) end, fun (V55) -> fun (V56) -> ('Idris.Idris2.Prelude.Show':'dn--un--showPrec_Show__String'(V55, V56)) end end}, V16))))))))}, V2)) end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E12)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end.
'un--pathToNS'(V0, V1, V2) -> begin (V3 = ('Idris.Idris2.Data.Maybe':'un--fromMaybe'('erased', fun () -> <<""/utf8>> end, V1))), begin (V4 = ('case--pathToNS-1054'(V2, V1, V0, V3, ('Idris.Idris2.Utils.Path':'un--isAbsolute'(V2))))), ('case--pathToNS-1076'(V2, V1, V0, V3, V4, ('Idris.Idris2.Utils.Path':'un--stripPrefix'(V4, V2)))) end end.
'un--nsToSource'(V0, V1, V2, V3) -> begin (V4 = ('Idris.Idris2.Core.Context':'un--getDirs'(V0, V3))), case V4 of {'Idris.Prelude.Types.Left', E0} -> (fun (V5) -> {'Idris.Prelude.Types.Left', V5} end(E0)); {'Idris.Prelude.Types.Right', E1} -> (fun (V6) -> begin (V7 = ('Idris.Idris2.Utils.Path':'un--joinPath'(('Idris.Idris2.Data.List':'un--reverse'('erased', ('Idris.Idris2.Core.Name.Namespace':'un--unsafeUnfoldModuleIdent'(V2))))))), begin (V18 = ('Idris.Idris2.Prelude.Types':'un--maybe'('erased', 'erased', fun () -> V7 end, fun () -> fun (V8) -> ('Idris.Idris2.Utils.Path':'un--</>'(V8, V7)) end end, case V6 of {'Idris.Core.Options.MkDirs', E2, E3, E4, E5, E6, E7, E8, E9, E10} -> (fun (V9, V10, V11, V12, V13, V14, V15, V16, V17) -> V10 end(E2, E3, E4, E5, E6, E7, E8, E9, E10)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))), begin (V20 = ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', fun (V19) -> ('Idris.Idris2.Utils.Path':'un--<.>'(V18, V19)) end, [<<".idr"/utf8>> | [<<".lidr"/utf8>> | [<<".yaff"/utf8>> | [<<".org"/utf8>> | [<<".md"/utf8>> | []]]]]]))), begin (V21 = (('un--firstAvailable'(V20))(V3))), case V21 of {'Idris.Prelude.Types.Left', E11} -> (fun (V22) -> {'Idris.Prelude.Types.Left', V22} end(E11)); {'Idris.Prelude.Types.Right', E12} -> (fun (V23) -> case V23 of {'Idris.Prelude.Types.Just', E13} -> (fun (V24) -> {'Idris.Prelude.Types.Right', V24} end(E13)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.ModuleNotFound', V1, V2}, V3)) end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E12)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end.
'un--nsToPath'(V0, V1, V2, V3) -> begin (V4 = ('Idris.Idris2.Core.Context':'un--getDirs'(V0, V3))), case V4 of {'Idris.Prelude.Types.Left', E0} -> (fun (V5) -> {'Idris.Prelude.Types.Left', V5} end(E0)); {'Idris.Prelude.Types.Right', E1} -> (fun (V6) -> begin (V7 = ('un--getPkgDirs'(V0, V3))), case V7 of {'Idris.Prelude.Types.Left', E2} -> (fun (V8) -> {'Idris.Prelude.Types.Left', V8} end(E2)); {'Idris.Prelude.Types.Right', E3} -> (fun (V9) -> begin (V10 = ('Idris.Idris2.Utils.Path':'un--joinPath'(('Idris.Idris2.Data.List':'un--reverse'('erased', ('Idris.Idris2.Core.Name.Namespace':'un--unsafeUnfoldModuleIdent'(V2))))))), begin (V30 = ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', fun (V11) -> ('Idris.Idris2.Utils.Path':'un--</>'(V11, ('Idris.Idris2.Utils.Path':'un--<.>'(V10, <<"ttc"/utf8>>)))) end, [('Idris.Idris2.Utils.Path':'un--</>'(case V6 of {'Idris.Core.Options.MkDirs', E4, E5, E6, E7, E8, E9, E10, E11, E12} -> (fun (V12, V13, V14, V15, V16, V17, V18, V19, V20) -> V14 end(E4, E5, E6, E7, E8, E9, E10, E11, E12)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end, <<"ttc"/utf8>>)) | ('Idris.Idris2.Prelude.Types.List':'un--++'('erased', V9, case V6 of {'Idris.Core.Options.MkDirs', E13, E14, E15, E16, E17, E18, E19, E20, E21} -> (fun (V21, V22, V23, V24, V25, V26, V27, V28, V29) -> V27 end(E13, E14, E15, E16, E17, E18, E19, E20, E21)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))]))), begin (V31 = (('un--firstAvailable'(V30))(V3))), case V31 of {'Idris.Prelude.Types.Left', E22} -> (fun (V32) -> {'Idris.Prelude.Types.Left', V32} end(E22)); {'Idris.Prelude.Types.Right', E23} -> (fun (V33) -> case V33 of {'Idris.Prelude.Types.Just', E24} -> (fun (V34) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Right', {'Idris.Core.Directory.LocalFile', V34}}} end(E24)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> begin (V35 = {'Idris.Prelude.Types.Left', {'Idris.Core.Core.ModuleNotFound', V1, V2}}), begin (V37 = begin (V36 = ('Idris.Idris2.Utils.Escript':'un--getEscriptPath'(V3))), {'Idris.Prelude.Types.Right', V36} end), case V37 of {'Idris.Prelude.Types.Left', E25} -> (fun (V38) -> {'Idris.Prelude.Types.Left', V38} end(E25)); {'Idris.Prelude.Types.Right', E26} -> (fun (V39) -> begin (V40 = {'Idris.Prelude.Types.Nothing'}), case V39 of {'Idris.Prelude.Types.Just', E27} -> (fun (V41) -> begin (V43 = begin (V42 = ('Idris.Idris2.Utils.Escript':'un--openArchive'(V41, V3))), {'Idris.Prelude.Types.Right', V42} end), case V43 of {'Idris.Prelude.Types.Left', E28} -> (fun (V44) -> {'Idris.Prelude.Types.Left', V44} end(E28)); {'Idris.Prelude.Types.Right', E29} -> (fun (V45) -> begin (V46 = {'Idris.Prelude.Types.Just', V41}), case V45 of {'Idris.Prelude.Types.Just', E30} -> (fun (V47) -> begin (V49 = begin (V48 = ('Idris.Idris2.Utils.Escript':'un--listFiles'(V47, V3))), {'Idris.Prelude.Types.Right', V48} end), case V49 of {'Idris.Prelude.Types.Left', E31} -> (fun (V50) -> {'Idris.Prelude.Types.Left', V50} end(E31)); {'Idris.Prelude.Types.Right', E32} -> (fun (V51) -> begin (V52 = {'Idris.Prelude.Types.Just', V47}), case V51 of {'Idris.Prelude.Types.Just', E33} -> (fun (V53) -> begin (V55 = begin (V54 = ('Idris.Idris2.Utils.Escript':'un--closeArchive'(V47, V3))), {'Idris.Prelude.Types.Right', V54} end), case V55 of {'Idris.Prelude.Types.Left', E34} -> (fun (V56) -> {'Idris.Prelude.Types.Left', V56} end(E34)); {'Idris.Prelude.Types.Right', E35} -> (fun (V57) -> begin (V58 = ('Idris.Idris2.Core.Context':'un--getSession'(V0, V3))), case V58 of {'Idris.Prelude.Types.Left', E36} -> (fun (V59) -> {'Idris.Prelude.Types.Left', V59} end(E36)); {'Idris.Prelude.Types.Right', E37} -> (fun (V60) -> begin (V76 = ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', fun (V61) -> ('Idris.Idris2.Utils.Path':'un--</>'(<<"idris2/priv/libs"/utf8>>, ('Idris.Idris2.Utils.Path':'un--</>'(V61, ('Idris.Idris2.Utils.Path':'un--<.>'(V10, <<"ttc"/utf8>>)))))) end, case V60 of {'Idris.Core.Options.MkSessionOpts', E38, E39, E40, E41, E42, E43, E44, E45, E46, E47, E48, E49, E50, E51} -> (fun (V62, V63, V64, V65, V66, V67, V68, V69, V70, V71, V72, V73, V74, V75) -> V67 end(E38, E39, E40, E41, E42, E43, E44, E45, E46, E47, E48, E49, E50, E51)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))), begin (V77 = {'Idris.Prelude.Types.Just', V53}), (('case--case block in case block in case block in case block in nsToPath-782'(V2, V1, V0, V6, V9, V10, V30, V40, V35, V41, V46, V47, V52, V53, V77, V57, V60, V76, ('Idris.Idris2.Data.List':'un--find'('erased', fun (V78) -> ('Idris.Idris2.Prelude.Types':'un--elem'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V79) -> fun (V80) -> ('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V79, V80)) end end, fun (V81) -> fun (V82) -> ('Idris.Idris2.Prelude.EqOrd':'dn--un--/=_Eq__String'(V81, V82)) end end}, V78, V53)) end, V76))))(V3)) end end end(E37)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E35)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E33)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> {'Idris.Prelude.Types.Right', V35} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E32)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E30)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> {'Idris.Prelude.Types.Right', V35} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E29)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E27)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> {'Idris.Prelude.Types.Right', V35} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E26)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E23)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end(E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end.
'un--mkdirAll'(V0) -> ('case--mkdirAll-1140'(V0, ('Idris.Idris2.Utils.Path':'dn--un--==_Eq__Path'(('Idris.Idris2.Utils.Path':'un--parse'(V0)), ('Idris.Idris2.Utils.Path':'un--emptyPath'()))))).
'un--makeBuildDirectory'(V0, V1, V2) -> begin (V3 = ('Idris.Idris2.Core.Context':'un--getDirs'(V0, V2))), case V3 of {'Idris.Prelude.Types.Left', E0} -> (fun (V4) -> {'Idris.Prelude.Types.Left', V4} end(E0)); {'Idris.Prelude.Types.Right', E1} -> (fun (V5) -> begin (V15 = ('Idris.Idris2.Utils.Path':'un--</>'(case V5 of {'Idris.Core.Options.MkDirs', E2, E3, E4, E5, E6, E7, E8, E9, E10} -> (fun (V6, V7, V8, V9, V10, V11, V12, V13, V14) -> V8 end(E2, E3, E4, E5, E6, E7, E8, E9, E10)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end, <<"ttc"/utf8>>))), begin (V16 = ('Idris.Idris2.Data.List':'un--reverse'('erased', ('Idris.Idris2.Data.Maybe':'un--fromMaybe'('erased', fun () -> [] end, ('Idris.Idris2.Data.List':'un--tail\x{27}'('erased', ('Idris.Idris2.Core.Name.Namespace':'un--unsafeUnfoldModuleIdent'(V1))))))))), begin (V17 = ('Idris.Idris2.Utils.Path':'un--joinPath'(V16))), begin (V19 = begin (V18 = (('un--mkdirAll'(('Idris.Idris2.Utils.Path':'un--</>'(V15, V17))))(V2))), {'Idris.Prelude.Types.Right', V18} end), case V19 of {'Idris.Prelude.Types.Left', E11} -> (fun (V20) -> {'Idris.Prelude.Types.Left', V20} end(E11)); {'Idris.Prelude.Types.Right', E12} -> (fun (V21) -> case V21 of {'Idris.Prelude.Types.Right', E13} -> (fun (V22) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkUnit'}} end(E13)); {'Idris.Prelude.Types.Left', E14} -> (fun (V23) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.FileErr', ('Idris.Idris2.Utils.Path':'un--</>'(case V5 of {'Idris.Core.Options.MkDirs', E15, E16, E17, E18, E19, E20, E21, E22, E23} -> (fun (V24, V25, V26, V27, V28, V29, V30, V31, V32) -> V26 end(E15, E16, E17, E18, E19, E20, E21, E22, E23)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end, V17)), V23}, V2)) end(E14)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E12)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end.
'un--getTTCFileName'(V0, V1, V2, V3) -> begin (V4 = ('Idris.Idris2.Core.Context':'un--getNS'(V0, V3))), case V4 of {'Idris.Prelude.Types.Left', E0} -> (fun (V5) -> {'Idris.Prelude.Types.Left', V5} end(E0)); {'Idris.Prelude.Types.Right', E1} -> (fun (V6) -> begin (V7 = ('Idris.Idris2.Core.Context':'un--getDirs'(V0, V3))), case V7 of {'Idris.Prelude.Types.Left', E2} -> (fun (V8) -> {'Idris.Prelude.Types.Left', V8} end(E2)); {'Idris.Prelude.Types.Right', E3} -> (fun (V9) -> begin (V28 = (('un--pathToNS'(case V9 of {'Idris.Core.Options.MkDirs', E4, E5, E6, E7, E8, E9, E10, E11, E12} -> (fun (V10, V11, V12, V13, V14, V15, V16, V17, V18) -> V10 end(E4, E5, E6, E7, E8, E9, E10, E11, E12)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end, case V9 of {'Idris.Core.Options.MkDirs', E13, E14, E15, E16, E17, E18, E19, E20, E21} -> (fun (V19, V20, V21, V22, V23, V24, V25, V26, V27) -> V20 end(E13, E14, E15, E16, E17, E18, E19, E20, E21)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end, V1))(V3))), case V28 of {'Idris.Prelude.Types.Left', E22} -> (fun (V29) -> {'Idris.Prelude.Types.Left', V29} end(E22)); {'Idris.Prelude.Types.Right', E23} -> (fun (V30) -> begin (V31 = ('Idris.Idris2.Utils.Path':'un--<.>'(('Idris.Idris2.Utils.Path':'un--joinPath'(('Idris.Idris2.Data.List':'un--reverse'('erased', ('Idris.Idris2.Core.Name.Namespace':'un--unsafeUnfoldModuleIdent'(V30)))))), V2))), begin (V41 = case V9 of {'Idris.Core.Options.MkDirs', E24, E25, E26, E27, E28, E29, E30, E31, E32} -> (fun (V32, V33, V34, V35, V36, V37, V38, V39, V40) -> V34 end(E24, E25, E26, E27, E28, E29, E30, E31, E32)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end), {'Idris.Prelude.Types.Right', ('Idris.Idris2.Utils.Path':'un--</>'(V41, ('Idris.Idris2.Utils.Path':'un--</>'(<<"ttc"/utf8>>, V31))))} end end end(E23)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end.
'un--getPkgDirs'(V0, V1) -> begin (V2 = ('Idris.Idris2.Core.Context':'un--getDirs'(V0, V1))), case V2 of {'Idris.Prelude.Types.Left', E0} -> (fun (V3) -> {'Idris.Prelude.Types.Left', V3} end(E0)); {'Idris.Prelude.Types.Right', E1} -> (fun (V4) -> begin (V5 = ('Idris.Idris2.Core.Context':'un--getSession'(V0, V1))), case V5 of {'Idris.Prelude.Types.Left', E2} -> (fun (V6) -> {'Idris.Prelude.Types.Left', V6} end(E2)); {'Idris.Prelude.Types.Right', E3} -> (fun (V7) -> begin (V32 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8) -> ('nested--6337-307--in--un--getPkgDir'(V0, case V4 of {'Idris.Core.Options.MkDirs', E4, E5, E6, E7, E8, E9, E10, E11, E12} -> (fun (V9, V10, V11, V12, V13, V14, V15, V16, V17) -> V14 end(E4, E5, E6, E7, E8, E9, E10, E11, E12)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end, V8)) end, case V7 of {'Idris.Core.Options.MkSessionOpts', E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24, E25, E26} -> (fun (V18, V19, V20, V21, V22, V23, V24, V25, V26, V27, V28, V29, V30, V31) -> V23 end(E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24, E25, E26)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))(V1))), case V32 of {'Idris.Prelude.Types.Left', E27} -> (fun (V33) -> {'Idris.Prelude.Types.Left', V33} end(E27)); {'Idris.Prelude.Types.Right', E28} -> (fun (V34) -> {'Idris.Prelude.Types.Right', ('Idris.Idris2.Data.List':'un--mapMaybe'('erased', 'erased', fun (V35) -> V35 end, V34))} end(E28)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end.
'un--getExecFileName'(V0, V1, V2) -> begin (V3 = ('Idris.Idris2.Core.Context':'un--getDirs'(V0, V2))), case V3 of {'Idris.Prelude.Types.Left', E0} -> (fun (V4) -> {'Idris.Prelude.Types.Left', V4} end(E0)); {'Idris.Prelude.Types.Right', E1} -> (fun (V5) -> {'Idris.Prelude.Types.Right', ('Idris.Idris2.Utils.Path':'un--</>'(case V5 of {'Idris.Core.Options.MkDirs', E2, E3, E4, E5, E6, E7, E8, E9, E10} -> (fun (V6, V7, V8, V9, V10, V11, V12, V13, V14) -> V8 end(E2, E3, E4, E5, E6, E7, E8, E9, E10)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end, V1))} end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end.
'un--firstAvailable'(V0) -> case V0 of [] -> fun (V1) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Nothing'}} end; [E0 | E1] -> (fun (V2, V3) -> fun (V4) -> begin (V33 = begin (V32 = (('Idris.Idris2.Erlang.System.File':'un--openFile'('erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5) -> fun (V6) -> fun (V7) -> fun (V8) -> fun (V9) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7, V8, V9)) end end end end end, fun (V10) -> fun (V11) -> fun (V12) -> V11 end end end, fun (V13) -> fun (V14) -> fun (V15) -> fun (V16) -> fun (V17) -> begin (V18 = (V15(V17))), begin (V19 = (V16(V17))), (V18(V19)) end end end end end end end}, fun (V20) -> fun (V21) -> fun (V22) -> fun (V23) -> fun (V24) -> begin (V25 = (V22(V24))), ((V23(V25))(V24)) end end end end end end, fun (V26) -> fun (V27) -> fun (V28) -> begin (V29 = (V27(V28))), (V29(V28)) end end end end}, fun (V30) -> fun (V31) -> V31 end end}, V2, {'Idris.Erlang.System.File.Read'}))(V4))), {'Idris.Prelude.Types.Right', V32} end), case V33 of {'Idris.Prelude.Types.Left', E2} -> (fun (V34) -> {'Idris.Prelude.Types.Left', V34} end(E2)); {'Idris.Prelude.Types.Right', E3} -> (fun (V35) -> case V35 of {'Idris.Prelude.Types.Right', E4} -> (fun (V36) -> begin (V65 = begin (V64 = (('Idris.Idris2.Erlang.System.File':'un--closeFile'('erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V37) -> fun (V38) -> fun (V39) -> fun (V40) -> fun (V41) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V39, V40, V41)) end end end end end, fun (V42) -> fun (V43) -> fun (V44) -> V43 end end end, fun (V45) -> fun (V46) -> fun (V47) -> fun (V48) -> fun (V49) -> begin (V50 = (V47(V49))), begin (V51 = (V48(V49))), (V50(V51)) end end end end end end end}, fun (V52) -> fun (V53) -> fun (V54) -> fun (V55) -> fun (V56) -> begin (V57 = (V54(V56))), ((V55(V57))(V56)) end end end end end end, fun (V58) -> fun (V59) -> fun (V60) -> begin (V61 = (V59(V60))), (V61(V60)) end end end end}, fun (V62) -> fun (V63) -> V63 end end}, V36))(V4))), {'Idris.Prelude.Types.Right', V64} end), case V65 of {'Idris.Prelude.Types.Left', E5} -> (fun (V66) -> {'Idris.Prelude.Types.Left', V66} end(E5)); {'Idris.Prelude.Types.Right', E6} -> (fun (V67) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Just', V2}} end(E6)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E4)); {'Idris.Prelude.Types.Left', E7} -> (fun (V68) -> (('un--firstAvailable'(V3))(V4)) end(E7)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'un--findLibraryFile'(V0, V1, V2) -> begin (V3 = ('Idris.Idris2.Core.Context':'un--getDirs'(V0, V2))), case V3 of {'Idris.Prelude.Types.Left', E0} -> (fun (V4) -> {'Idris.Prelude.Types.Left', V4} end(E0)); {'Idris.Prelude.Types.Right', E1} -> (fun (V5) -> begin (V6 = ('un--getPkgDirs'(V0, V2))), case V6 of {'Idris.Prelude.Types.Left', E2} -> (fun (V7) -> {'Idris.Prelude.Types.Left', V7} end(E2)); {'Idris.Prelude.Types.Right', E3} -> (fun (V8) -> begin (V20 = ('Idris.Idris2.Prelude.Types.List':'un--++'('erased', ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', fun (V9) -> ('Idris.Idris2.Utils.Path':'un--</>'(V9, V1)) end, case V5 of {'Idris.Core.Options.MkDirs', E4, E5, E6, E7, E8, E9, E10, E11, E12} -> (fun (V10, V11, V12, V13, V14, V15, V16, V17, V18) -> V17 end(E4, E5, E6, E7, E8, E9, E10, E11, E12)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end)), ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', fun (V19) -> ('Idris.Idris2.Utils.Path':'un--</>'(V19, <<"lib"/utf8>>)) end, V8))))), begin (V21 = (('un--firstAvailable'(V20))(V2))), case V21 of {'Idris.Prelude.Types.Left', E13} -> (fun (V22) -> {'Idris.Prelude.Types.Left', V22} end(E13)); {'Idris.Prelude.Types.Right', E14} -> (fun (V23) -> case V23 of {'Idris.Prelude.Types.Just', E15} -> (fun (V24) -> {'Idris.Prelude.Types.Right', V24} end(E15)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.InternalError', ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t find library "/utf8>>, V1))}, V2)) end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E14)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end.
'un--findIpkgFile'(V0) -> begin (V28 = (('Idris.Idris2.Erlang.System.Directory':'un--currentDir'('erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V1) -> fun (V2) -> fun (V3) -> fun (V4) -> fun (V5) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V3, V4, V5)) end end end end end, fun (V6) -> fun (V7) -> fun (V8) -> V7 end end end, fun (V9) -> fun (V10) -> fun (V11) -> fun (V12) -> fun (V13) -> begin (V14 = (V11(V13))), begin (V15 = (V12(V13))), (V14(V15)) end end end end end end end}, fun (V16) -> fun (V17) -> fun (V18) -> fun (V19) -> fun (V20) -> begin (V21 = (V18(V20))), ((V19(V21))(V20)) end end end end end end, fun (V22) -> fun (V23) -> fun (V24) -> begin (V25 = (V23(V24))), (V25(V24)) end end end end}, fun (V26) -> fun (V27) -> V27 end end}))(V0))), case V28 of {'Idris.Prelude.Types.Just', E0} -> (fun (V29) -> begin (V30 = ('nested--7506-1357--in--un--findIpkgFile\x{27}'(V29, <<""/utf8>>, V0))), V30 end end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> {'Idris.Prelude.Types.Nothing'} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end.
'un--filenameFromModuleLocation'(V0) -> case V0 of {'Idris.Core.Directory.LocalFile', E0} -> (fun (V1) -> V1 end(E0)); {'Idris.Core.Directory.EscriptFile', E1} -> (fun (V2) -> V2 end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'un--ensureDirectoryExists'(V0, V1) -> begin (V3 = begin (V2 = (('un--mkdirAll'(V0))(V1))), {'Idris.Prelude.Types.Right', V2} end), case V3 of {'Idris.Prelude.Types.Left', E0} -> (fun (V4) -> {'Idris.Prelude.Types.Left', V4} end(E0)); {'Idris.Prelude.Types.Right', E1} -> (fun (V5) -> case V5 of {'Idris.Prelude.Types.Right', E2} -> (fun (V6) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkUnit'}} end(E2)); {'Idris.Prelude.Types.Left', E3} -> (fun (V7) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.FileErr', V0, V7}, V1)) end(E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end.