-module('Idris.Idris2.Compiler.CompileExpr'). -compile('no_auto_import'). -compile('inline'). -compile({'inline_size',24}). -export([ 'case--case block in mkForgetDef-7981'/6, 'case--mkForgetDef-7969'/4, 'case--compileDef-7909'/4, 'case--toCDef-7719'/6, 'case--toCDef-7647'/7, 'case--toCDef-7586'/5, 'case--case block in nfToCFType-7197'/14, 'case--nfToCFType-7120'/11, 'case--getNArgs-6869'/6, 'case--case block in case block in getFieldArgs-6679'/14, 'case--case block in getFieldArgs-6635'/9, 'case--getFieldArgs-6618'/4, 'case--case block in case block in getPArgs-6496'/13, 'case--case block in getPArgs-6459'/10, 'case--getPArgs-6441'/4, 'case--mkArgList-6397'/3, 'case--toCExpTree\x{27}-6238'/15, 'case--case block in toCExpTree\x{27}-6060'/19, 'case--toCExpTree\x{27}-6004'/15, 'case--getNewType-5795'/12, 'case--getNewType,mkSubst-5690'/17, 'case--case block in case block in case block in conCases-5449'/18, 'case--case block in case block in conCases-5401'/14, 'case--case block in conCases-5335'/12, 'case--conCases-5312'/10, 'case--case block in toCExp-5177'/10, 'case--toCExp-5127'/5, 'case--toCExpTm-5061'/7, 'case--toCExpTm-4751'/8, 'case--boolHackTree-4688'/6, 'case--natHackTree-4543'/6, 'case--natHack-4334'/5, 'case--natHack-4302'/5, 'case--natHack-4286'/5, 'case--natHack-4270'/5, 'case--natHack-4240'/4, 'case--natHack-4226'/4, 'case--magic,go-4017'/7, 'case--case block in mkDropSubst-3862'/8, 'case--mkDropSubst-3841'/6, 'case--dropPos,drop-3744'/10, 'case--applyNewType,keep-3645'/10, 'case--case block in numArgs-3237'/8, 'case--numArgs-3222'/6, 'nested--9619-4649--in--un--toBool'/6, 'nested--12773-7667--in--un--toArgExp'/7, 'nested--12773-7536--in--un--toArgExp'/6, 'nested--10275-5664--in--un--mkSubst'/15, 'nested--8327-3441--in--un--mkLocal'/6, 'nested--8327-3442--in--un--mkApp'/6, 'nested--8529-3624--in--un--keepArg'/7, 'nested--8529-3623--in--un--keep'/8, 'nested--8881-3935--in--un--go'/5, 'nested--12773-7668--in--un--getVars'/8, 'nested--12773-7537--in--un--getVars'/7, 'nested--8881-3934--in--un--fire'/5, 'nested--8648-3730--in--un--drop'/8, 'nested--10269-5284--in--un--dcon'/9, 'nested--8426-3542--in--un--applyAll'/5, 'nested--8426-3564--in--un--addArg'/7, 'un--weakenVar'/3, 'un--tryZBranch'/2, 'un--trySBranch'/3, 'un--toCExpTree\x{27}'/4, 'un--toCExpTree'/4, 'un--toCExpTm'/4, 'un--toCExp'/4, 'un--toCDef'/4, 'un--numArgs'/3, 'un--nfToCFType'/4, 'un--natMinus'/4, 'un--natHackTree'/2, 'un--natHack'/2, 'un--natBranch'/2, 'un--mkForgetDef'/3, 'un--mkDropSubst'/4, 'un--mkArgList'/2, 'un--magic'/3, 'un--isNatCon'/1, 'un--isFiniteEnum'/1, 'un--getZBranch'/2, 'un--getSBranch'/3, 'un--getPArgs'/4, 'un--getNewType'/6, 'un--getNArgs'/4, 'un--getFieldArgs'/4, 'un--getDef'/4, 'un--getCFTypes'/3, 'un--expandToArity'/4, 'un--etaExpand'/5, 'un--eraseConArgs'/5, 'un--dropPos'/3, 'un--constCases'/4, 'un--conCases'/4, 'un--compileExp'/3, 'un--compileDef'/3, 'un--boolHackTree'/2, 'un--applyNewType'/5 ]). 'case--case block in mkForgetDef-7981'(V0, V1, V2, V3, V4, V5) -> case V5 of {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V6) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkUnit'}} end end()); {'Idris.Prelude.Types.Just', E0} -> (fun (V7) -> begin (V8 = ('Idris.Idris2.Core.CompileExpr':'un--forgetDef'(V7))), fun (V9) -> ('Idris.Idris2.Core.Context':'un--setNamedCompiled'(V1, V0, V8, V9)) end end end(E0)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--mkForgetDef-7969'(V0, V1, V2, V3) -> case V3 of {'Idris.Prelude.Types.Just', E0} -> (fun (V4) -> begin (V5 = {'Idris.Prelude.Types.Just', V4}), ('case--case block in mkForgetDef-7981'(V0, V1, V2, V4, V5, case V4 of {'Idris.Core.Context.MkGlobalDef', E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21} -> (fun (V6, V7, V8, V9, V10, V11, V12, V13, V14, V15, V16, V17, V18, V19, V20, V21, V22, V23, V24, V25, V26) -> V24 end(E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end)) end end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V27) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.InternalError', ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Trying to compile unknown name "/utf8>>, ('Idris.Idris2.Core.Name':'dn--un--show_Show__Name'(V0))))}, V27)) end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--compileDef-7909'(V0, V1, V2, V3) -> case V3 of {'Idris.Prelude.Types.Just', E0} -> (fun (V4) -> fun (V5) -> begin (V55 = begin (V31 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V1, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V6) -> fun (V7) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Def'(V6, V7)) end end, fun (V8) -> fun (V9) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Def'(V8, V9)) end end}, case V4 of {'Idris.Core.Context.MkGlobalDef', E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21} -> (fun (V10, V11, V12, V13, V14, V15, V16, V17, V18, V19, V20, V21, V22, V23, V24, V25, V26, V27, V28, V29, V30) -> V27 end(E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end, V5))), case V31 of {'Idris.Prelude.Types.Left', E22} -> (fun (V32) -> {'Idris.Prelude.Types.Left', V32} end(E22)); {'Idris.Prelude.Types.Right', E23} -> (fun (V33) -> (('un--toCDef'(V1, V0, case V4 of {'Idris.Core.Context.MkGlobalDef', E24, E25, E26, E27, E28, E29, E30, E31, E32, E33, E34, E35, E36, E37, E38, E39, E40, E41, E42, E43, E44} -> (fun (V34, V35, V36, V37, V38, V39, V40, V41, V42, V43, V44, V45, V46, V47, V48, V49, V50, V51, V52, V53, V54) -> V36 end(E24, E25, E26, E27, E28, E29, E30, E31, E32, E33, E34, E35, E36, E37, E38, E39, E40, E41, E42, E43, E44)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end, V33))(V5)) end(E23)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end), case V55 of {'Idris.Prelude.Types.Left', E45} -> (fun (V56) -> {'Idris.Prelude.Types.Left', V56} end(E45)); {'Idris.Prelude.Types.Right', E46} -> (fun (V57) -> ('Idris.Idris2.Core.Context':'un--setCompiled'(V1, V0, V57, V5)) end(E46)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V58) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.InternalError', ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Trying to compile unknown name "/utf8>>, ('Idris.Idris2.Core.Name':'dn--un--show_Show__Name'(V0))))}, V58)) end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--toCDef-7719'(V0, V1, V2, V3, V4, V5) -> case V5 of {'Idris.Builtin.DPair.MkDPair', E0, E1} -> (fun (V6, V7) -> fun (V8) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.MkFun', V6, {'Idris.Core.CompileExpr.COp', V0, ('Idris.Idris2.Core.FC':'un--emptyFC'()), V1, ('Idris.Idris2.Data.Vect':'dn--un--map_Functor__(Vect $n)'('erased', 'erased', 'erased', fun (V9) -> ('nested--12773-7667--in--un--toArgExp'(V0, V1, V2, V3, V4, 'erased', V9)) end, ('nested--12773-7668--in--un--getVars'(V0, V1, V2, V3, V4, 'erased', 'erased', V7))))}}} end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--toCDef-7647'(V0, V1, V2, V3, V4, V5, V6) -> case V6 of {'Idris.Builtin.MkPair', E0, E1} -> (fun (V7, V8) -> fun (V9) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.MkForeign', V0, V7, V8}} end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--toCDef-7586'(V0, V1, V2, V3, V4) -> case V4 of {'Idris.Builtin.DPair.MkDPair', E0, E1} -> (fun (V5, V6) -> fun (V7) -> begin (V8 = (('Idris.Idris2.Core.Context':'un--getFullName'(V3, V2))(V7))), case V8 of {'Idris.Prelude.Types.Left', E2} -> (fun (V9) -> {'Idris.Prelude.Types.Left', V9} end(E2)); {'Idris.Prelude.Types.Right', E3} -> (fun (V10) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.MkFun', V5, {'Idris.Core.CompileExpr.CExtPrim', ('Idris.Idris2.Core.FC':'un--emptyFC'()), V10, ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', fun (V11) -> ('nested--12773-7536--in--un--toArgExp'(V0, V1, V2, V3, 'erased', V11)) end, ('nested--12773-7537--in--un--getVars'(V0, V1, V2, V3, 'erased', 'erased', V6))))}}} end(E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--case block in nfToCFType-7197'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13) -> case V13 of {'Idris.Builtin.MkPair', E0, E1} -> (fun (V14, V15) -> fun (V16) -> begin (V17 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V7, [], V8, V15))(V16))), case V17 of {'Idris.Prelude.Types.Left', E2} -> (fun (V18) -> {'Idris.Prelude.Types.Left', V18} end(E2)); {'Idris.Prelude.Types.Right', E3} -> (fun (V19) -> begin (V20 = (('un--nfToCFType'(V7, V5, 0, V19))(V16))), case V20 of {'Idris.Prelude.Types.Left', E4} -> (fun (V21) -> {'Idris.Prelude.Types.Left', V21} end(E4)); {'Idris.Prelude.Types.Right', E5} -> (fun (V22) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V14, V22}} end(E5)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--nfToCFType-7120'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10) -> case V10 of {'Idris.Compiler.CompileExpr.User', E0, E1} -> (fun (V11, V12) -> fun (V13) -> begin (V15 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V14) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V7, [], V8, V14)) end, V12))(V13))), case V15 of {'Idris.Prelude.Types.Left', E2} -> (fun (V16) -> {'Idris.Prelude.Types.Left', V16} end(E2)); {'Idris.Prelude.Types.Right', E3} -> (fun (V17) -> begin (V19 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V18) -> ('un--nfToCFType'(V7, V5, V6, V18)) end, V17))(V13))), case V19 of {'Idris.Prelude.Types.Left', E4} -> (fun (V20) -> {'Idris.Prelude.Types.Left', V20} end(E4)); {'Idris.Prelude.Types.Right', E5} -> (fun (V21) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V9, V21}} end(E5)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E0, E1)); {'Idris.Compiler.CompileExpr.Struct', E6, E7} -> (fun (V22, V23) -> fun (V24) -> begin (V35 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V25) -> case V25 of {'Idris.Builtin.MkPair', E8, E9} -> (fun (V26, V27) -> fun (V28) -> begin (V29 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V7, [], V8, V27))(V28))), case V29 of {'Idris.Prelude.Types.Left', E10} -> (fun (V30) -> {'Idris.Prelude.Types.Left', V30} end(E10)); {'Idris.Prelude.Types.Right', E11} -> (fun (V31) -> begin (V32 = (('un--nfToCFType'(V7, V5, 0, V31))(V28))), case V32 of {'Idris.Prelude.Types.Left', E12} -> (fun (V33) -> {'Idris.Prelude.Types.Left', V33} end(E12)); {'Idris.Prelude.Types.Right', E13} -> (fun (V34) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V26, V34}} end(E13)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E11)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E8, E9)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V23))(V24))), case V35 of {'Idris.Prelude.Types.Left', E14} -> (fun (V36) -> {'Idris.Prelude.Types.Left', V36} end(E14)); {'Idris.Prelude.Types.Right', E15} -> (fun (V37) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V22, V37}} end(E15)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E6, E7)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> fun (V38) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> fun (V39) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> fun (V40) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> fun (V41) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end end()); {'Idris.Compiler.CompileExpr.NIORes', E16} -> (fun (V42) -> fun (V43) -> begin (V44 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V7, [], V8, V42))(V43))), case V44 of {'Idris.Prelude.Types.Left', E17} -> (fun (V45) -> {'Idris.Prelude.Types.Left', V45} end(E17)); {'Idris.Prelude.Types.Right', E18} -> (fun (V46) -> begin (V47 = (('un--nfToCFType'(V7, V5, V6, V46))(V43))), case V47 of {'Idris.Prelude.Types.Left', E19} -> (fun (V48) -> {'Idris.Prelude.Types.Left', V48} end(E19)); {'Idris.Prelude.Types.Right', E20} -> (fun (V49) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V49}} end(E20)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E18)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E16)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--getNArgs-6869'(V0, V1, V2, V3, V4, V5) -> case V5 of {'Idris.Core.Value.NPrimVal', E0, E1} -> (fun (V6, V7) -> case V7 of {'Idris.Core.TT.Str', E2} -> (fun (V8) -> fun (V9) -> begin (V10 = ('un--getFieldArgs'(V4, V3, V2, V9))), case V10 of {'Idris.Prelude.Types.Left', E3} -> (fun (V11) -> {'Idris.Prelude.Types.Left', V11} end(E3)); {'Idris.Prelude.Types.Right', E4} -> (fun (V12) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.Struct', V8, V12}} end(E4)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2)); _ -> fun (V13) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V5)), <<"Unknown name for struct"/utf8>>}, V13)) end end end(E0, E1)); _ -> fun (V14) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V5)), <<"Unknown name for struct"/utf8>>}, V14)) end end. 'case--case block in case block in getFieldArgs-6679'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13) -> case V13 of {'Idris.Builtin.MkPair', E0, E1} -> (fun (V14, V15) -> fun (V16) -> {'Idris.Prelude.Types.Right', [{'Idris.Builtin.MkPair', V14, V15} | V12]} end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--case block in getFieldArgs-6635'(V0, V1, V2, V3, V4, V5, V6, V7, V8) -> case V6 of [E0 | E1] -> (fun (V9, V10) -> case V10 of [E2 | E3] -> (fun (V11, V12) -> case V12 of [E4 | E5] -> (fun (V13, V14) -> case V14 of [] -> fun (V15) -> begin (V16 = ('un--getFieldArgs'(V2, V1, V13, V15))), case V16 of {'Idris.Prelude.Types.Left', E6} -> (fun (V17) -> {'Idris.Prelude.Types.Left', V17} end(E6)); {'Idris.Prelude.Types.Right', E7} -> (fun (V18) -> begin (V19 = ('un--getPArgs'(V2, V1, V11, V15))), case V19 of {'Idris.Prelude.Types.Left', E8} -> (fun (V20) -> {'Idris.Prelude.Types.Left', V20} end(E8)); {'Idris.Prelude.Types.Right', E9} -> (fun (V21) -> case V21 of {'Idris.Builtin.MkPair', E10, E11} -> (fun (V22, V23) -> {'Idris.Prelude.Types.Right', [{'Idris.Builtin.MkPair', V22, V23} | V18]} end(E10, E11)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E9)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E7)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end; _ -> fun (V24) -> {'Idris.Prelude.Types.Right', []} end end end(E4, E5)); _ -> fun (V25) -> {'Idris.Prelude.Types.Right', []} end end end(E2, E3)); _ -> fun (V26) -> {'Idris.Prelude.Types.Right', []} end end end(E0, E1)); _ -> fun (V27) -> {'Idris.Prelude.Types.Right', []} end end. 'case--getFieldArgs-6618'(V0, V1, V2, V3) -> case V3 of {'Idris.Core.Value.NDCon', E0, E1, E2, E3, E4} -> (fun (V4, V5, V6, V7, V8) -> case V8 of [E5 | E6] -> (fun (V9, V10) -> case V10 of [E7 | E8] -> (fun (V11, V12) -> case V12 of [E9 | E10] -> (fun (V13, V14) -> case V14 of [] -> fun (V15) -> begin (V16 = ('un--getFieldArgs'(V2, V1, V13, V15))), case V16 of {'Idris.Prelude.Types.Left', E11} -> (fun (V17) -> {'Idris.Prelude.Types.Left', V17} end(E11)); {'Idris.Prelude.Types.Right', E12} -> (fun (V18) -> begin (V19 = ('un--getPArgs'(V2, V1, V11, V15))), case V19 of {'Idris.Prelude.Types.Left', E13} -> (fun (V20) -> {'Idris.Prelude.Types.Left', V20} end(E13)); {'Idris.Prelude.Types.Right', E14} -> (fun (V21) -> case V21 of {'Idris.Builtin.MkPair', E15, E16} -> (fun (V22, V23) -> {'Idris.Prelude.Types.Right', [{'Idris.Builtin.MkPair', V22, V23} | V18]} end(E15, E16)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E14)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E12)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end; _ -> fun (V24) -> {'Idris.Prelude.Types.Right', []} end end end(E9, E10)); _ -> fun (V25) -> {'Idris.Prelude.Types.Right', []} end end end(E7, E8)); _ -> fun (V26) -> {'Idris.Prelude.Types.Right', []} end end end(E5, E6)); _ -> fun (V27) -> {'Idris.Prelude.Types.Right', []} end end end(E0, E1, E2, E3, E4)); _ -> fun (V28) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), <<"Badly formed struct type"/utf8>>}, V28)) end end. 'case--case block in case block in getPArgs-6496'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12) -> case V12 of {'Idris.Core.Value.NPrimVal', E0, E1} -> (fun (V13, V14) -> case V14 of {'Idris.Core.TT.Str', E2} -> (fun (V15) -> fun (V16) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V15, V10}} end end(E2)); _ -> fun (V17) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V12)), <<"Unknown field name"/utf8>>}, V17)) end end end(E0, E1)); _ -> fun (V18) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V12)), <<"Unknown field name"/utf8>>}, V18)) end end. 'case--case block in getPArgs-6459'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9) -> case V9 of [E0 | E1] -> (fun (V10, V11) -> case V11 of [E2 | E3] -> (fun (V12, V13) -> fun (V14) -> begin (V15 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V2, [], V1, V12))(V14))), case V15 of {'Idris.Prelude.Types.Left', E4} -> (fun (V16) -> {'Idris.Prelude.Types.Left', V16} end(E4)); {'Idris.Prelude.Types.Right', E5} -> (fun (V17) -> case V17 of {'Idris.Core.Value.NPrimVal', E6, E7} -> (fun (V18, V19) -> case V19 of {'Idris.Core.TT.Str', E8} -> (fun (V20) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V20, V10}} end(E8)); _ -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V17)), <<"Unknown field name"/utf8>>}, V14)) end end(E6, E7)); _ -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V17)), <<"Unknown field name"/utf8>>}, V14)) end end(E5)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2, E3)); _ -> fun (V21) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V7, <<"Badly formed struct type"/utf8>>}, V21)) end end end(E0, E1)); _ -> fun (V22) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V7, <<"Badly formed struct type"/utf8>>}, V22)) end end. 'case--getPArgs-6441'(V0, V1, V2, V3) -> case V3 of {'Idris.Core.Value.NDCon', E0, E1, E2, E3, E4} -> (fun (V4, V5, V6, V7, V8) -> begin (V9 = {'Idris.Core.Value.NDCon', V4, V5, V6, V7, V8}), ('case--case block in getPArgs-6459'(V0, V1, V2, V5, V6, V7, V8, V4, V9, ('Idris.Idris2.Data.List':'un--reverse'('erased', V8)))) end end(E0, E1, E2, E3, E4)); _ -> fun (V10) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), <<"Badly formed struct type"/utf8>>}, V10)) end end. 'case--mkArgList-6397'(V0, V1, V2) -> case V2 of {'Idris.Builtin.DPair.MkDPair', E0, E1} -> (fun (V3, V4) -> {'Idris.Builtin.DPair.MkDPair', [{'Idris.Core.Name.MN', <<"arg"/utf8>>, V1} | V3], {'Idris.Compiler.CompileExpr.ConsArg', {'Idris.Core.Name.MN', <<"arg"/utf8>>, V1}, V4}} end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--toCExpTree\x{27}-6238'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13, V14) -> case V14 of 0 -> fun (V15) -> {'Idris.Prelude.Types.Right', ('Idris.Idris2.Data.Maybe':'un--fromMaybe'('erased', fun () -> {'Idris.Core.CompileExpr.CErased', V11} end, V13))} end; 1 -> fun (V16) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CConstCase', V11, {'Idris.Core.CompileExpr.CLocal', V7, V11}, V12, V13}} end; _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--case block in toCExpTree\x{27}-6060'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13, V14, V15, V16, V17, V18) -> case V18 of 0 -> fun (V19) -> {'Idris.Prelude.Types.Right', ('Idris.Idris2.Data.Maybe':'un--fromMaybe'('erased', fun () -> {'Idris.Core.CompileExpr.CErased', V13} end, V17))} end; 1 -> fun (V20) -> {'Idris.Prelude.Types.Right', ('un--boolHackTree'('erased', ('un--natHackTree'('erased', {'Idris.Core.CompileExpr.CConCase', V13, {'Idris.Core.CompileExpr.CLocal', V2, V13}, V16, V17}))))} end; _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--toCExpTree\x{27}-6004'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13, V14) -> case V14 of {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V15) -> begin (V44 = begin (V43 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V16) -> fun (V17) -> fun (V18) -> fun (V19) -> fun (V20) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V18, V19, V20)) end end end end end, fun (V21) -> fun (V22) -> fun (V23) -> V22 end end end, fun (V24) -> fun (V25) -> fun (V26) -> fun (V27) -> fun (V28) -> begin (V29 = (V26(V28))), begin (V30 = (V27(V28))), (V29(V30)) end end end end end end end}, fun (V31) -> fun (V32) -> fun (V33) -> fun (V34) -> fun (V35) -> begin (V36 = (V33(V35))), ((V34(V36))(V35)) end end end end end end, fun (V37) -> fun (V38) -> fun (V39) -> begin (V40 = (V38(V39))), (V40(V39)) end end end end}, fun (V41) -> fun (V42) -> V42 end end}, V12))(V15))), {'Idris.Prelude.Types.Right', V43} end), case V44 of {'Idris.Prelude.Types.Left', E0} -> (fun (V45) -> {'Idris.Prelude.Types.Left', V45} end(E0)); {'Idris.Prelude.Types.Right', E1} -> (fun (V46) -> begin (V47 = (('un--conCases'(V0, V12, V11, V8))(V15))), case V47 of {'Idris.Prelude.Types.Left', E2} -> (fun (V48) -> {'Idris.Prelude.Types.Left', V48} end(E2)); {'Idris.Prelude.Types.Right', E3} -> (fun (V49) -> begin (V50 = (('un--getDef'(V0, V12, V11, V8))(V15))), case V50 of {'Idris.Prelude.Types.Left', E4} -> (fun (V51) -> {'Idris.Prelude.Types.Left', V51} end(E4)); {'Idris.Prelude.Types.Right', E5} -> (fun (V52) -> begin (V53 = {'Idris.Prelude.Types.Nothing'}), (('case--case block in toCExpTree\x{27}-6060'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, 'erased', V11, V12, V13, V53, V46, V49, V52, ('Idris.Idris2.Data.List':'un--isNil'('erased', V49))))(V15)) end end(E5)); _ -> ('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 end end()); {'Idris.Prelude.Types.Just', E6} -> (fun (V54) -> fun (V55) -> {'Idris.Prelude.Types.Right', V54} end end(E6)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--getNewType-5795'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11) -> case V11 of {'Idris.Prelude.Types.Just', E0} -> (fun (V12) -> case V12 of {'Idris.Core.Context.DCon', E1, E2, E3} -> (fun (V13, V14, V15) -> case V15 of {'Idris.Prelude.Types.Just', E4} -> (fun (V16) -> case V16 of {'Idris.Builtin.MkPair', E5, E6} -> (fun (V17, V18) -> begin (V19 = ('nested--10275-5664--in--un--mkSubst'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, 'erased', 0, V7, V18, V0))), fun (V20) -> begin (V21 = (('un--toCExpTree'(('Idris.Idris2.Prelude.Types.List':'un--++'('erased', V0, V1)), V9, V6, V2))(V20))), case V21 of {'Idris.Prelude.Types.Left', E7} -> (fun (V22) -> {'Idris.Prelude.Types.Left', V22} end(E7)); {'Idris.Prelude.Types.Right', E8} -> (fun (V23) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Just', ('Idris.Idris2.Core.CompileExpr':'un--substs'(V0, V1, V19, V23))}} end(E8)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end(E5, E6)); _ -> fun (V24) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Nothing'}} end end end(E4)); _ -> fun (V25) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Nothing'}} end end end(E1, E2, E3)); _ -> fun (V26) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Nothing'}} end end end(E0)); _ -> fun (V27) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Nothing'}} end end. 'case--getNewType,mkSubst-5690'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13, V14, V15, V16) -> case V16 of 0 -> {'Idris.Core.CompileExpr.SubstCEnv.::', V14, ('nested--10275-5664--in--un--mkSubst'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, 'erased', ('Idris.Idris2.Prelude.Types':'dn--un--+_Num__Nat'((1 + 0), V15)), V14, V13, V12))}; 1 -> {'Idris.Core.CompileExpr.SubstCEnv.::', {'Idris.Core.CompileExpr.CErased', V8}, ('nested--10275-5664--in--un--mkSubst'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, 'erased', ('Idris.Idris2.Prelude.Types':'dn--un--+_Num__Nat'((1 + 0), V15)), V14, V13, V12))}; _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--case block in case block in case block in conCases-5449'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13, V14, V15, V16, V17) -> case V17 of 0 -> fun (V18) -> {'Idris.Prelude.Types.Right', [{'Idris.Core.CompileExpr.MkConAlt', V12, {'Idris.Prelude.Types.Just', V3}, V13, ('Idris.Idris2.Core.CompileExpr':'un--shrinkCExp'('erased', 'erased', V14, V15))} | V16]} end; 1 -> fun (V19) -> {'Idris.Prelude.Types.Right', [{'Idris.Core.CompileExpr.MkConAlt', V12, {'Idris.Prelude.Types.Nothing'}, V13, ('Idris.Idris2.Core.CompileExpr':'un--shrinkCExp'('erased', 'erased', V14, V15))} | V16]} end; _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--case block in case block in conCases-5401'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13) -> case V13 of {'Idris.Builtin.DPair.MkDPair', E0, E1} -> (fun (V14, V15) -> fun (V16) -> begin (V17 = (('un--toCExpTree'(('Idris.Idris2.Prelude.Types.List':'un--++'('erased', V0, V1)), V7, V6, V2))(V16))), case V17 of {'Idris.Prelude.Types.Left', E2} -> (fun (V18) -> {'Idris.Prelude.Types.Left', V18} end(E2)); {'Idris.Prelude.Types.Right', E3} -> (fun (V19) -> begin (V20 = (('un--conCases'(V1, V7, V6, V5))(V16))), case V20 of {'Idris.Prelude.Types.Left', E4} -> (fun (V21) -> {'Idris.Prelude.Types.Left', V21} end(E4)); {'Idris.Prelude.Types.Right', E5} -> (fun (V22) -> (('case--case block in case block in case block in conCases-5449'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V14, V15, V19, V22, ('nested--10269-5284--in--un--dcon'(V0, V1, V2, V3, V4, V5, V6, V7, case V9 of {'Idris.Core.Context.MkGlobalDef', E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24, E25, E26} -> (fun (V23, V24, V25, V26, V27, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40, V41, V42, V43) -> V40 end(E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24, E25, E26)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))))(V16)) end(E5)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--case block in conCases-5335'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11) -> case V11 of {'Idris.Core.Context.DCon', E23, E24, E25} -> (fun (V12, V13, V14) -> case V14 of {'Idris.Prelude.Types.Just', E49} -> (fun (V15) -> ('un--conCases'(V1, V7, V6, V5)) end(E49)); _ -> fun (V16) -> begin (V17 = (('Idris.Idris2.Core.Context':'un--getFullName'(V7, V4))(V16))), case V17 of {'Idris.Prelude.Types.Left', E26} -> (fun (V18) -> {'Idris.Prelude.Types.Left', V18} end(E26)); {'Idris.Prelude.Types.Right', E27} -> (fun (V19) -> (('case--case block in case block in conCases-5401'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V19, ('un--mkDropSubst'(0, case V9 of {'Idris.Core.Context.MkGlobalDef', E28, E29, E30, E31, E32, E33, E34, E35, E36, E37, E38, E39, E40, E41, E42, E43, E44, E45, E46, E47, E48} -> (fun (V20, V21, V22, V23, V24, V25, V26, V27, V28, V29, V30, V31, V32, V33, V34, V35, V36, V37, V38, V39, V40) -> V23 end(E28, E29, E30, E31, E32, E33, E34, E35, E36, E37, E38, E39, E40, E41, E42, E43, E44, E45, E46, E47, E48)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end, V1, V0))))(V16)) end(E27)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end(E23, E24, E25)); _ -> fun (V41) -> begin (V42 = (('Idris.Idris2.Core.Context':'un--getFullName'(V7, V4))(V41))), case V42 of {'Idris.Prelude.Types.Left', E0} -> (fun (V43) -> {'Idris.Prelude.Types.Left', V43} end(E0)); {'Idris.Prelude.Types.Right', E1} -> (fun (V44) -> (('case--case block in case block in conCases-5401'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V44, ('un--mkDropSubst'(0, case V9 of {'Idris.Core.Context.MkGlobalDef', E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22} -> (fun (V45, V46, V47, V48, V49, V50, V51, V52, V53, V54, V55, V56, V57, V58, V59, V60, V61, V62, V63, V64, V65) -> V48 end(E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end, V1, V0))))(V41)) end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end. 'case--conCases-5312'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9) -> case V9 of {'Idris.Prelude.Types.Just', E0} -> (fun (V10) -> begin (V11 = {'Idris.Prelude.Types.Just', V10}), ('case--case block in conCases-5335'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V10, V11, case V10 of {'Idris.Core.Context.MkGlobalDef', E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21} -> (fun (V12, V13, V14, V15, V16, V17, V18, V19, V20, V21, V22, V23, V24, V25, V26, V27, V28, V29, V30, V31, V32) -> V29 end(E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end)) end end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V33) -> begin (V34 = (('Idris.Idris2.Core.Context':'un--getFullName'(V7, V4))(V33))), case V34 of {'Idris.Prelude.Types.Left', E22} -> (fun (V35) -> {'Idris.Prelude.Types.Left', V35} end(E22)); {'Idris.Prelude.Types.Right', E23} -> (fun (V36) -> begin (V37 = (('un--toCExpTree'(('Idris.Idris2.Prelude.Types.List':'un--++'('erased', V0, V1)), V7, V6, V2))(V33))), case V37 of {'Idris.Prelude.Types.Left', E24} -> (fun (V38) -> {'Idris.Prelude.Types.Left', V38} end(E24)); {'Idris.Prelude.Types.Right', E25} -> (fun (V39) -> begin (V40 = (('un--conCases'(V1, V7, V6, V5))(V33))), case V40 of {'Idris.Prelude.Types.Left', E26} -> (fun (V41) -> {'Idris.Prelude.Types.Left', V41} end(E26)); {'Idris.Prelude.Types.Right', E27} -> (fun (V42) -> {'Idris.Prelude.Types.Right', [{'Idris.Core.CompileExpr.MkConAlt', V36, {'Idris.Prelude.Types.Nothing'}, V0, V39} | V42]} end(E27)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E25)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E23)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--case block in toCExp-5177'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9) -> case V9 of {'Idris.Compiler.CompileExpr.Arity', E0} -> (fun (V10) -> begin (V11 = ('un--expandToArity'(V0, V10, V8, V6))), fun (V12) -> {'Idris.Prelude.Types.Right', ('un--natHack'('erased', V11))} end end end(E0)); {'Idris.Compiler.CompileExpr.NewTypeBy', E1, E2} -> (fun (V13, V14) -> begin (V15 = ('un--applyNewType'(V0, V13, V14, V8, V6))), fun (V16) -> {'Idris.Prelude.Types.Right', ('un--natHack'('erased', V15))} end end end(E1, E2)); {'Idris.Compiler.CompileExpr.EraseArgs', E3, E4} -> (fun (V17, V18) -> begin (V19 = ('un--eraseConArgs'(V0, V17, V18, V8, V6))), fun (V20) -> {'Idris.Prelude.Types.Right', ('un--natHack'('erased', V19))} end end end(E3, E4)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--toCExp-5127'(V0, V1, V2, V3, V4) -> case V4 of {'Idris.Builtin.MkPair', E0, E1} -> (fun (V5, V6) -> fun (V7) -> begin (V9 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8) -> ('un--toCExp'(V0, V3, V2, V8)) end, V6))(V7))), case V9 of {'Idris.Prelude.Types.Left', E2} -> (fun (V10) -> {'Idris.Prelude.Types.Left', V10} end(E2)); {'Idris.Prelude.Types.Right', E3} -> (fun (V11) -> begin (V40 = begin (V39 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V12) -> fun (V13) -> fun (V14) -> fun (V15) -> fun (V16) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V14, V15, V16)) end end end end end, fun (V17) -> fun (V18) -> fun (V19) -> V18 end end end, fun (V20) -> fun (V21) -> fun (V22) -> fun (V23) -> fun (V24) -> begin (V25 = (V22(V24))), begin (V26 = (V23(V24))), (V25(V26)) end end end end end end end}, fun (V27) -> fun (V28) -> fun (V29) -> fun (V30) -> fun (V31) -> begin (V32 = (V29(V31))), ((V30(V32))(V31)) end end end end end end, fun (V33) -> fun (V34) -> fun (V35) -> begin (V36 = (V34(V35))), (V36(V35)) end end end end}, fun (V37) -> fun (V38) -> V38 end end}, V3))(V7))), {'Idris.Prelude.Types.Right', V39} end), case V40 of {'Idris.Prelude.Types.Left', E4} -> (fun (V41) -> {'Idris.Prelude.Types.Left', V41} end(E4)); {'Idris.Prelude.Types.Right', E5} -> (fun (V42) -> begin (V43 = (('un--toCExpTm'(V0, V3, V2, V5))(V7))), case V43 of {'Idris.Prelude.Types.Left', E6} -> (fun (V44) -> {'Idris.Prelude.Types.Left', V44} end(E6)); {'Idris.Prelude.Types.Right', E7} -> (fun (V45) -> begin (V46 = (('un--numArgs'('erased', V42, V5))(V7))), case V46 of {'Idris.Prelude.Types.Left', E8} -> (fun (V47) -> {'Idris.Prelude.Types.Left', V47} end(E8)); {'Idris.Prelude.Types.Right', E9} -> (fun (V48) -> case V48 of {'Idris.Compiler.CompileExpr.Arity', E10} -> (fun (V49) -> begin (V50 = ('un--expandToArity'(V0, V49, V45, V11))), {'Idris.Prelude.Types.Right', ('un--natHack'('erased', V50))} end end(E10)); {'Idris.Compiler.CompileExpr.NewTypeBy', E11, E12} -> (fun (V51, V52) -> begin (V53 = ('un--applyNewType'(V0, V51, V52, V45, V11))), {'Idris.Prelude.Types.Right', ('un--natHack'('erased', V53))} end end(E11, E12)); {'Idris.Compiler.CompileExpr.EraseArgs', E13, E14} -> (fun (V54, V55) -> begin (V56 = ('un--eraseConArgs'(V0, V54, V55, V45, V11))), {'Idris.Prelude.Types.Right', ('un--natHack'('erased', V56))} end end(E13, E14)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E9)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E7)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E5)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--toCExpTm-5061'(V0, V1, V2, V3, V4, V5, V6) -> case V6 of 0 -> fun (V7) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CPrimVal', V3, V2}} end; 1 -> fun (V8) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CCon', V3, {'Idris.Core.Name.UN', ('Idris.Idris2.Core.TT':'dn--un--show_Show__Constant'(V2))}, {'Idris.Prelude.Types.Nothing'}, []}} end; _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--toCExpTm-4751'(V0, V1, V2, V3, V4, V5, V6, V7) -> case V7 of 0 -> fun (V8) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CPrimVal', V4, {'Idris.Core.TT.I', V2}}} end; 1 -> fun (V9) -> begin (V10 = (('Idris.Idris2.Core.Context':'un--getFullName'(V6, V3))(V9))), case V10 of {'Idris.Prelude.Types.Left', E0} -> (fun (V11) -> {'Idris.Prelude.Types.Left', V11} end(E0)); {'Idris.Prelude.Types.Right', E1} -> (fun (V12) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CCon', V4, V12, {'Idris.Prelude.Types.Just', V2}, []}} end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end; _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--boolHackTree-4688'(V0, V1, V2, V3, V4, V5) -> case V5 of {'Idris.Prelude.Types.Just', E0} -> (fun (V6) -> {'Idris.Core.CompileExpr.CConstCase', V4, V3, V6, V1} end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> {'Idris.Core.CompileExpr.CConCase', V4, V3, V2, V1} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--natHackTree-4543'(V0, V1, V2, V3, V4, V5) -> case V5 of 0 -> begin (V7 = ('Idris.Idris2.Prelude.Types':'un--maybe'('erased', 'erased', fun () -> {'Idris.Core.CompileExpr.CCrash', V4, <<"Nat case not covered"/utf8>>} end, fun () -> fun (V6) -> V6 end end, V1))), begin (V9 = ('Idris.Idris2.Prelude.Types':'un--maybe'('erased', 'erased', fun () -> V7 end, fun () -> fun (V8) -> V8 end end, ('un--getSBranch'('erased', V3, V2))))), begin (V11 = ('Idris.Idris2.Prelude.Types':'un--maybe'('erased', 'erased', fun () -> V7 end, fun () -> fun (V10) -> V10 end end, ('un--getZBranch'('erased', V2))))), {'Idris.Core.CompileExpr.CConstCase', V4, V3, [{'Idris.Core.CompileExpr.MkConstAlt', {'Idris.Core.TT.BI', 0}, V11} | []], {'Idris.Prelude.Types.Just', V9}} end end end; 1 -> {'Idris.Core.CompileExpr.CConCase', V4, V3, V2, V1}; _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--natHack-4334'(V0, V1, V2, V3, V4) -> case V4 of {'Idris.Data.Vect.::', E0, E1} -> (fun (V5, V6) -> case V6 of {'Idris.Data.Vect.::', E2, E3} -> (fun (V7, V8) -> case V8 of {'Idris.Data.Vect.Nil'} -> (fun () -> {'Idris.Core.CompileExpr.CApp', V1, {'Idris.Core.CompileExpr.CRef', V2, {'Idris.Core.Name.UN', <<"prim__mul_Integer"/utf8>>}}, [V5 | [V7 | []]]} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2, E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--natHack-4302'(V0, V1, V2, V3, V4) -> case V4 of {'Idris.Data.Vect.::', E0, E1} -> (fun (V5, V6) -> case V6 of {'Idris.Data.Vect.::', E2, E3} -> (fun (V7, V8) -> case V8 of {'Idris.Data.Vect.Nil'} -> (fun () -> {'Idris.Core.CompileExpr.CApp', V1, {'Idris.Core.CompileExpr.CRef', V2, {'Idris.Core.Name.UN', <<"prim__add_Integer"/utf8>>}}, [V5 | [V7 | []]]} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2, E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--natHack-4286'(V0, V1, V2, V3, V4) -> case V4 of {'Idris.Data.Vect.::', E0, E1} -> (fun (V5, V6) -> case V6 of {'Idris.Data.Vect.Nil'} -> (fun () -> V5 end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--natHack-4270'(V0, V1, V2, V3, V4) -> case V4 of {'Idris.Data.Vect.::', E0, E1} -> (fun (V5, V6) -> case V6 of {'Idris.Data.Vect.Nil'} -> (fun () -> V5 end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--natHack-4240'(V0, V1, V2, V3) -> case V3 of {'Idris.Data.Vect.::', E0, E1} -> (fun (V4, V5) -> case V5 of {'Idris.Data.Vect.Nil'} -> (fun () -> {'Idris.Core.CompileExpr.CApp', V1, {'Idris.Core.CompileExpr.CRef', V1, {'Idris.Core.Name.UN', <<"prim__add_Integer"/utf8>>}}, [{'Idris.Core.CompileExpr.CPrimVal', V1, {'Idris.Core.TT.BI', 1}} | [V4 | []]]} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--natHack-4226'(V0, V1, V2, V3) -> case V3 of {'Idris.Data.Vect.Nil'} -> (fun () -> {'Idris.Core.CompileExpr.CPrimVal', V1, {'Idris.Core.TT.BI', 0}} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--magic,go-4017'(V0, V1, V2, V3, V4, V5, V6) -> case V6 of {'Idris.Prelude.Types.Nothing'} -> (fun () -> ('nested--8881-3935--in--un--go'('erased', V1, V2, V4, V5)) end()); {'Idris.Prelude.Types.Just', E0} -> (fun (V7) -> V7 end(E0)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--case block in mkDropSubst-3862'(V0, V1, V2, V3, V4, V5, V6, V7) -> case V7 of 0 -> {'Idris.Builtin.DPair.MkDPair', V5, {'Idris.Core.TT.DropCons', V6}}; 1 -> {'Idris.Builtin.DPair.MkDPair', [V0 | V5], {'Idris.Core.TT.KeepCons', V6}}; _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--mkDropSubst-3841'(V0, V1, V2, V3, V4, V5) -> case V5 of {'Idris.Builtin.DPair.MkDPair', E0, E1} -> (fun (V6, V7) -> ('case--case block in mkDropSubst-3862'(V0, V1, V2, V3, V4, V6, V7, ('Idris.Idris2.Prelude.Types':'un--elem'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V8) -> fun (V9) -> ('Idris.Idris2.Prelude.Types':'dn--un--==_Eq__Nat'(V8, V9)) end end, fun (V10) -> fun (V11) -> ('Idris.Idris2.Prelude.Types':'dn--un--/=_Eq__Nat'(V10, V11)) end end}, V4, V3)))) end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--dropPos,drop-3744'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9) -> case V9 of 0 -> ('nested--8648-3730--in--un--drop'('erased', V1, V2, V3, V4, V5, ('Idris.Idris2.Prelude.Types':'dn--un--+_Num__Nat'((1 + 0), V8)), V7)); 1 -> [V6 | ('nested--8648-3730--in--un--drop'('erased', V1, V2, V3, V4, V5, ('Idris.Idris2.Prelude.Types':'dn--un--+_Num__Nat'((1 + 0), V8)), V7))]; _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--applyNewType,keep-3645'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9) -> case V9 of 0 -> V6; 1 -> ('nested--8529-3623--in--un--keep'(V0, V1, V2, V3, V4, 'erased', ('Idris.Idris2.Prelude.Types':'dn--un--+_Num__Nat'((1 + 0), V8)), V7)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'case--case block in numArgs-3237'(V0, V1, V2, V3, V4, V5, V6, V7) -> case V7 of {'Idris.Core.Context.DCon', E0, E1, E2} -> (fun (V8, V9, V10) -> case V10 of {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V11) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.EraseArgs', V9, case V5 of {'Idris.Core.Context.MkGlobalDef', E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23} -> (fun (V12, V13, V14, V15, V16, V17, V18, V19, V20, V21, V22, V23, V24, V25, V26, V27, V28, V29, V30, V31, V32) -> V15 end(E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end}} end end()); {'Idris.Prelude.Types.Just', E24} -> (fun (V33) -> case V33 of {'Idris.Builtin.MkPair', E25, E26} -> (fun (V34, V35) -> fun (V36) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.NewTypeBy', V9, V35}} end end(E25, E26)); _ -> fun (V37) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.Arity', 0}} end end end(E24)); _ -> fun (V38) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.Arity', 0}} end end end(E0, E1, E2)); {'Idris.Core.Context.PMDef', E27, E28, E29, E30, E31} -> (fun (V39, V40, V41, V42, V43) -> fun (V44) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.Arity', ('Idris.Idris2.Prelude.Types.List':'un--length'('erased', V40))}} end end(E27, E28, E29, E30, E31)); {'Idris.Core.Context.ExternDef', E32} -> (fun (V45) -> fun (V46) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.Arity', V45}} end end(E32)); {'Idris.Core.Context.ForeignDef', E33, E34} -> (fun (V47, V48) -> fun (V49) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.Arity', V47}} end end(E33, E34)); {'Idris.Core.Context.Builtin', E35, E36} -> (fun (V50, V51) -> fun (V52) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.Arity', V50}} end end(E35, E36)); _ -> fun (V53) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.Arity', 0}} end end. 'case--numArgs-3222'(V0, V1, V2, V3, V4, V5) -> case V5 of {'Idris.Prelude.Types.Just', E0} -> (fun (V6) -> begin (V7 = {'Idris.Prelude.Types.Just', V6}), ('case--case block in numArgs-3237'('erased', V1, V2, V3, V4, V6, V7, case V6 of {'Idris.Core.Context.MkGlobalDef', E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21} -> (fun (V8, V9, V10, V11, V12, V13, V14, V15, V16, V17, V18, V19, V20, V21, V22, V23, V24, V25, V26, V27, V28) -> V25 end(E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end)) end end(E0)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> fun (V29) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.Arity', 0}} end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'nested--9619-4649--in--un--toBool'(V0, V1, V2, V3, V4, V5) -> case V5 of {'Idris.Core.CompileExpr.MkConAlt', E0, E1, E2, E3} -> (fun (V6, V7, V8, V9) -> case V7 of {'Idris.Prelude.Types.Just', E4} -> (fun (V10) -> case V8 of [] -> ('Idris.Idris2.Prelude.Types':'dn--un-->>=_Monad__Maybe'('erased', 'erased', ('Idris.Idris2.Prelude.Interfaces':'un--guard'('erased', {'Idris.Prelude.Interfaces.dn--un--__mkAlternative', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V11) -> fun (V12) -> fun (V13) -> fun (V14) -> ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__Maybe'('erased', 'erased', V13, V14)) end end end end, fun (V15) -> fun (V16) -> ('Idris.Idris2.Prelude.Types':'dn--un--pure_Applicative__Maybe'('erased', V16)) end end, fun (V17) -> fun (V18) -> fun (V19) -> fun (V20) -> ('Idris.Idris2.Prelude.Types':'dn--un--<*>_Applicative__Maybe'('erased', 'erased', V19, V20)) end end end end}, fun (V21) -> ('Idris.Idris2.Prelude.Types':'dn--un--empty_Alternative__Maybe'('erased')) end, fun (V22) -> fun (V23) -> fun (V24) -> ('Idris.Idris2.Prelude.Types':'dn--un--<|>_Alternative__Maybe'('erased', V23, V24)) end end end}, ('un--isFiniteEnum'(V6)))), fun (V25) -> ('Idris.Idris2.Prelude.Types':'dn--un--pure_Applicative__Maybe'('erased', {'Idris.Core.CompileExpr.MkConstAlt', {'Idris.Core.TT.I', V10}, V9})) end)); _ -> {'Idris.Prelude.Types.Nothing'} end end(E4)); _ -> {'Idris.Prelude.Types.Nothing'} end end(E0, E1, E2, E3)); _ -> {'Idris.Prelude.Types.Nothing'} end. 'nested--12773-7667--in--un--toArgExp'(V0, V1, V2, V3, V4, V5, V6) -> {'Idris.Core.CompileExpr.CLocal', V6, ('Idris.Idris2.Core.FC':'un--emptyFC'())}. 'nested--12773-7536--in--un--toArgExp'(V0, V1, V2, V3, V4, V5) -> {'Idris.Core.CompileExpr.CLocal', V5, ('Idris.Idris2.Core.FC':'un--emptyFC'())}. 'nested--10275-5664--in--un--mkSubst'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13, V14) -> case V14 of [] -> {'Idris.Core.CompileExpr.SubstCEnv.Nil'}; [E0 | E1] -> (fun (V15, V16) -> ('case--getNewType,mkSubst-5690'(V0, V1, V2, V3, V4, V5, V6, V7, V8, V9, 'erased', V15, V16, V13, V12, V11, ('Idris.Idris2.Prelude.Types':'dn--un--==_Eq__Nat'(V11, V13)))) end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'nested--8327-3441--in--un--mkLocal'(V0, V1, V2, V3, V4, V5) -> {'Idris.Core.CompileExpr.CLocal', V5, V4}. 'nested--8327-3442--in--un--mkApp'(V0, V1, V2, V3, V4, V5) -> case V5 of [] -> V4; _ -> case V4 of {'Idris.Core.CompileExpr.CApp', E0, E1, E2} -> (fun (V6, V7, V8) -> {'Idris.Core.CompileExpr.CApp', V6, V7, ('Idris.Idris2.Prelude.Types.List':'un--++'('erased', V8, V5))} end(E0, E1, E2)); {'Idris.Core.CompileExpr.CCon', E3, E4, E5, E6} -> (fun (V9, V10, V11, V12) -> {'Idris.Core.CompileExpr.CCon', V9, V10, V11, ('Idris.Idris2.Prelude.Types.List':'un--++'('erased', V12, V5))} end(E3, E4, E5, E6)); {'Idris.Core.CompileExpr.CExtPrim', E7, E8, E9} -> (fun (V13, V14, V15) -> {'Idris.Core.CompileExpr.CExtPrim', V13, V14, ('Idris.Idris2.Prelude.Types.List':'un--++'('erased', V15, V5))} end(E7, E8, E9)); _ -> {'Idris.Core.CompileExpr.CApp', ('Idris.Idris2.Core.CompileExpr':'un--getFC'('erased', V4)), V4, V5} end end. 'nested--8529-3624--in--un--keepArg'(V0, V1, V2, V3, V4, V5, V6) -> case V6 of {'Idris.Core.CompileExpr.CLam', E0, E1, E2} -> (fun (V7, V8, V9) -> {'Idris.Core.CompileExpr.CLam', V7, V8, ('nested--8529-3624--in--un--keepArg'(V0, V1, V2, V3, V4, 'erased', V9))} end(E0, E1, E2)); {'Idris.Core.CompileExpr.CCon', E3, E4, E5, E6} -> (fun (V10, V11, V12, V13) -> ('nested--8529-3623--in--un--keep'(V0, V1, V2, V3, V4, 'erased', 0, V13)) end(E3, E4, E5, E6)); _ -> {'Idris.Core.CompileExpr.CErased', ('Idris.Idris2.Core.CompileExpr':'un--getFC'('erased', V2))} end. 'nested--8529-3623--in--un--keep'(V0, V1, V2, V3, V4, V5, V6, V7) -> case V7 of [] -> {'Idris.Core.CompileExpr.CErased', ('Idris.Idris2.Core.CompileExpr':'un--getFC'('erased', V2))}; [E0 | E1] -> (fun (V8, V9) -> ('case--applyNewType,keep-3645'(V0, V1, V2, V3, V4, 'erased', V8, V9, V6, ('Idris.Idris2.Prelude.Types':'dn--un--==_Eq__Nat'(V6, V3)))) end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'nested--8881-3935--in--un--go'(V0, V1, V2, V3, V4) -> case V3 of [] -> V4; [E0 | E1] -> (fun (V5, V6) -> ('case--magic,go-4017'('erased', V1, V2, V5, V6, V4, ('nested--8881-3934--in--un--fire'('erased', V1, V2, V5, V4)))) end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'nested--12773-7668--in--un--getVars'(V0, V1, V2, V3, V4, V5, V6, V7) -> case V7 of {'Idris.Compiler.CompileExpr.NoArgs'} -> (fun () -> {'Idris.Data.Vect.Nil'} end()); {'Idris.Compiler.CompileExpr.ConsArg', E0, E1} -> (fun (V8, V9) -> {'Idris.Data.Vect.::', 0, ('Idris.Idris2.Data.Vect':'dn--un--map_Functor__(Vect $n)'('erased', 'erased', 'erased', fun (V10) -> ('un--weakenVar'('erased', 'erased', V10)) end, ('nested--12773-7668--in--un--getVars'(V0, V1, V2, V3, V4, 'erased', 'erased', V9))))} end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'nested--12773-7537--in--un--getVars'(V0, V1, V2, V3, V4, V5, V6) -> case V6 of {'Idris.Compiler.CompileExpr.NoArgs'} -> (fun () -> [] end()); {'Idris.Compiler.CompileExpr.ConsArg', E0, E1} -> (fun (V7, V8) -> [0 | ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', fun (V9) -> ('un--weakenVar'('erased', 'erased', V9)) end, ('nested--12773-7537--in--un--getVars'(V0, V1, V2, V3, 'erased', 'erased', V8))))] end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'nested--8881-3934--in--un--fire'(V0, V1, V2, V3, V4) -> case V3 of {'Idris.Compiler.CompileExpr.MagicCCon', E0, E1, E2, E3} -> (fun (V5, V6, V7, V8) -> case V4 of {'Idris.Core.CompileExpr.CCon', E4, E5, E6, E7} -> (fun (V9, V10, V11, V12) -> case V10 of {'Idris.Core.Name.NS', E8, E9} -> (fun (V13, V14) -> case V14 of {'Idris.Core.Name.UN', E10} -> (fun (V15) -> ('Idris.Idris2.Prelude.Types':'dn--un-->>=_Monad__Maybe'('erased', 'erased', ('Idris.Idris2.Prelude.Interfaces':'un--guard'('erased', {'Idris.Prelude.Interfaces.dn--un--__mkAlternative', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V16) -> fun (V17) -> fun (V18) -> fun (V19) -> ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__Maybe'('erased', 'erased', V18, V19)) end end end end, fun (V20) -> fun (V21) -> ('Idris.Idris2.Prelude.Types':'dn--un--pure_Applicative__Maybe'('erased', V21)) end end, fun (V22) -> fun (V23) -> fun (V24) -> fun (V25) -> ('Idris.Idris2.Prelude.Types':'dn--un--<*>_Applicative__Maybe'('erased', 'erased', V24, V25)) end end end end}, fun (V26) -> ('Idris.Idris2.Prelude.Types':'dn--un--empty_Alternative__Maybe'('erased')) end, fun (V27) -> fun (V28) -> fun (V29) -> ('Idris.Idris2.Prelude.Types':'dn--un--<|>_Alternative__Maybe'('erased', V28, V29)) end end end}, ('Idris.Idris2.Prelude.Basics':'un--&&'(('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V6, V15)), fun () -> ('Idris.Idris2.Core.Name.Namespace':'dn--un--==_Eq__Namespace'(V5, V13)) end)))), fun (V30) -> ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__Maybe'('erased', 'erased', ((V8(V9))('erased')), ('Idris.Idris2.Data.Vect':'un--toVect'('erased', V7, V12)))) end)) end(E10)); _ -> {'Idris.Prelude.Types.Nothing'} end end(E8, E9)); _ -> {'Idris.Prelude.Types.Nothing'} end end(E4, E5, E6, E7)); _ -> {'Idris.Prelude.Types.Nothing'} end end(E0, E1, E2, E3)); {'Idris.Compiler.CompileExpr.MagicCRef', E11, E12, E13, E14} -> (fun (V31, V32, V33, V34) -> case V4 of {'Idris.Core.CompileExpr.CApp', E15, E16, E17} -> (fun (V35, V36, V37) -> case V36 of {'Idris.Core.CompileExpr.CRef', E18, E19} -> (fun (V38, V39) -> case V39 of {'Idris.Core.Name.NS', E20, E21} -> (fun (V40, V41) -> case V41 of {'Idris.Core.Name.UN', E22} -> (fun (V42) -> ('Idris.Idris2.Prelude.Types':'dn--un-->>=_Monad__Maybe'('erased', 'erased', ('Idris.Idris2.Prelude.Interfaces':'un--guard'('erased', {'Idris.Prelude.Interfaces.dn--un--__mkAlternative', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V43) -> fun (V44) -> fun (V45) -> fun (V46) -> ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__Maybe'('erased', 'erased', V45, V46)) end end end end, fun (V47) -> fun (V48) -> ('Idris.Idris2.Prelude.Types':'dn--un--pure_Applicative__Maybe'('erased', V48)) end end, fun (V49) -> fun (V50) -> fun (V51) -> fun (V52) -> ('Idris.Idris2.Prelude.Types':'dn--un--<*>_Applicative__Maybe'('erased', 'erased', V51, V52)) end end end end}, fun (V53) -> ('Idris.Idris2.Prelude.Types':'dn--un--empty_Alternative__Maybe'('erased')) end, fun (V54) -> fun (V55) -> fun (V56) -> ('Idris.Idris2.Prelude.Types':'dn--un--<|>_Alternative__Maybe'('erased', V55, V56)) end end end}, ('Idris.Idris2.Prelude.Basics':'un--&&'(('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V32, V42)), fun () -> ('Idris.Idris2.Core.Name.Namespace':'dn--un--==_Eq__Namespace'(V31, V40)) end)))), fun (V57) -> ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__Maybe'('erased', 'erased', (((V34(V35))(V38))('erased')), ('Idris.Idris2.Data.Vect':'un--toVect'('erased', V33, V37)))) end)) end(E22)); _ -> {'Idris.Prelude.Types.Nothing'} end end(E20, E21)); _ -> {'Idris.Prelude.Types.Nothing'} end end(E18, E19)); _ -> {'Idris.Prelude.Types.Nothing'} end end(E15, E16, E17)); _ -> {'Idris.Prelude.Types.Nothing'} end end(E11, E12, E13, E14)); _ -> {'Idris.Prelude.Types.Nothing'} end. 'nested--8648-3730--in--un--drop'(V0, V1, V2, V3, V4, V5, V6, V7) -> case V7 of [] -> []; [E0 | E1] -> (fun (V8, V9) -> ('case--dropPos,drop-3744'('erased', V1, V2, V3, V4, V5, V8, V9, V6, ('Idris.Idris2.Prelude.Types':'un--elem'('erased', {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V10) -> fun (V11) -> ('Idris.Idris2.Prelude.Types':'dn--un--==_Eq__Nat'(V10, V11)) end end, fun (V12) -> fun (V13) -> ('Idris.Idris2.Prelude.Types':'dn--un--/=_Eq__Nat'(V12, V13)) end end}, V6, V5)))) end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'nested--10269-5284--in--un--dcon'(V0, V1, V2, V3, V4, V5, V6, V7, V8) -> case V8 of {'Idris.Core.Context.DCon', E0, E1, E2} -> (fun (V9, V10, V11) -> 0 end(E0, E1, E2)); _ -> 1 end. 'nested--8426-3542--in--un--applyAll'(V0, V1, V2, V3, V4) -> case V4 of [] -> V3; [E0 | E1] -> (fun (V5, V6) -> ('nested--8426-3542--in--un--applyAll'(V0, V1, V2, {'Idris.Core.CompileExpr.CApp', ('Idris.Idris2.Core.CompileExpr':'un--getFC'('erased', V3)), V3, [V5 | []]}, V6)) end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'nested--8426-3564--in--un--addArg'(V0, V1, V2, V3, V4, V5, V6) -> case V5 of {'Idris.Core.CompileExpr.CApp', E0, E1, E2} -> (fun (V7, V8, V9) -> {'Idris.Core.CompileExpr.CApp', V7, V8, ('Idris.Idris2.Prelude.Types.List':'un--++'('erased', V9, [V6 | []]))} end(E0, E1, E2)); {'Idris.Core.CompileExpr.CCon', E3, E4, E5, E6} -> (fun (V10, V11, V12, V13) -> {'Idris.Core.CompileExpr.CCon', V10, V11, V12, ('Idris.Idris2.Prelude.Types.List':'un--++'('erased', V13, [V6 | []]))} end(E3, E4, E5, E6)); {'Idris.Core.CompileExpr.CExtPrim', E7, E8, E9} -> (fun (V14, V15, V16) -> {'Idris.Core.CompileExpr.CExtPrim', V14, V15, ('Idris.Idris2.Prelude.Types.List':'un--++'('erased', V16, [V6 | []]))} end(E7, E8, E9)); _ -> {'Idris.Core.CompileExpr.CApp', ('Idris.Idris2.Core.CompileExpr':'un--getFC'('erased', V5)), V5, [V6 | []]} end. 'un--weakenVar'(V0, V1, V2) -> (1 + V2). 'un--tryZBranch'(V0, V1) -> case V1 of {'Idris.Core.CompileExpr.MkConAlt', E0, E1, E2, E3} -> (fun (V2, V3, V4, V5) -> case V2 of {'Idris.Core.Name.NS', E4, E5} -> (fun (V6, V7) -> case V7 of {'Idris.Core.Name.UN', E6} -> (fun (V8) -> case V4 of [] -> ('Idris.Idris2.Prelude.Types':'dn--un-->>=_Monad__Maybe'('erased', 'erased', ('Idris.Idris2.Prelude.Interfaces':'un--guard'('erased', {'Idris.Prelude.Interfaces.dn--un--__mkAlternative', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9) -> fun (V10) -> fun (V11) -> fun (V12) -> ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__Maybe'('erased', 'erased', V11, V12)) end end end end, fun (V13) -> fun (V14) -> ('Idris.Idris2.Prelude.Types':'dn--un--pure_Applicative__Maybe'('erased', V14)) end end, fun (V15) -> fun (V16) -> fun (V17) -> fun (V18) -> ('Idris.Idris2.Prelude.Types':'dn--un--<*>_Applicative__Maybe'('erased', 'erased', V17, V18)) end end end end}, fun (V19) -> ('Idris.Idris2.Prelude.Types':'dn--un--empty_Alternative__Maybe'('erased')) end, fun (V20) -> fun (V21) -> fun (V22) -> ('Idris.Idris2.Prelude.Types':'dn--un--<|>_Alternative__Maybe'('erased', V21, V22)) end end end}, ('Idris.Idris2.Prelude.Basics':'un--&&'(('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V8, <<"Z"/utf8>>)), fun () -> ('Idris.Idris2.Core.Name.Namespace':'dn--un--==_Eq__Namespace'(V6, ('Idris.Idris2.Core.Name.Namespace':'un--typesNS'()))) end)))), fun (V23) -> ('Idris.Idris2.Prelude.Types':'dn--un--pure_Applicative__Maybe'('erased', V5)) end)); _ -> {'Idris.Prelude.Types.Nothing'} end end(E6)); _ -> {'Idris.Prelude.Types.Nothing'} end end(E4, E5)); _ -> {'Idris.Prelude.Types.Nothing'} end end(E0, E1, E2, E3)); _ -> {'Idris.Prelude.Types.Nothing'} end. 'un--trySBranch'(V0, V1, V2) -> case V2 of {'Idris.Core.CompileExpr.MkConAlt', E0, E1, E2, E3} -> (fun (V3, V4, V5, V6) -> case V3 of {'Idris.Core.Name.NS', E4, E5} -> (fun (V7, V8) -> case V8 of {'Idris.Core.Name.UN', E6} -> (fun (V9) -> case V5 of [E7 | E8] -> (fun (V10, V11) -> case V11 of [] -> ('Idris.Idris2.Prelude.Types':'dn--un-->>=_Monad__Maybe'('erased', 'erased', ('Idris.Idris2.Prelude.Interfaces':'un--guard'('erased', {'Idris.Prelude.Interfaces.dn--un--__mkAlternative', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V12) -> fun (V13) -> fun (V14) -> fun (V15) -> ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__Maybe'('erased', 'erased', V14, V15)) end end end end, fun (V16) -> fun (V17) -> ('Idris.Idris2.Prelude.Types':'dn--un--pure_Applicative__Maybe'('erased', V17)) end end, fun (V18) -> fun (V19) -> fun (V20) -> fun (V21) -> ('Idris.Idris2.Prelude.Types':'dn--un--<*>_Applicative__Maybe'('erased', 'erased', V20, V21)) end end end end}, fun (V22) -> ('Idris.Idris2.Prelude.Types':'dn--un--empty_Alternative__Maybe'('erased')) end, fun (V23) -> fun (V24) -> fun (V25) -> ('Idris.Idris2.Prelude.Types':'dn--un--<|>_Alternative__Maybe'('erased', V24, V25)) end end end}, ('Idris.Idris2.Prelude.Basics':'un--&&'(('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V9, <<"S"/utf8>>)), fun () -> ('Idris.Idris2.Core.Name.Namespace':'dn--un--==_Eq__Namespace'(V7, ('Idris.Idris2.Core.Name.Namespace':'un--typesNS'()))) end)))), fun (V26) -> begin (V27 = ('Idris.Idris2.Core.CompileExpr':'un--getFC'('erased', V1))), ('Idris.Idris2.Prelude.Types':'dn--un--pure_Applicative__Maybe'('erased', {'Idris.Core.CompileExpr.CLet', V27, V10, 0, ('un--natMinus'(V27, V27, 'erased', {'Idris.Data.Vect.::', V1, {'Idris.Data.Vect.::', {'Idris.Core.CompileExpr.CPrimVal', V27, {'Idris.Core.TT.BI', 1}}, {'Idris.Data.Vect.Nil'}}})), V6})) end end)); _ -> {'Idris.Prelude.Types.Nothing'} end end(E7, E8)); _ -> {'Idris.Prelude.Types.Nothing'} end end(E6)); _ -> {'Idris.Prelude.Types.Nothing'} end end(E4, E5)); _ -> {'Idris.Prelude.Types.Nothing'} end end(E0, E1, E2, E3)); _ -> {'Idris.Prelude.Types.Nothing'} end. 'un--toCExpTree\x{27}'(V0, V1, V2, V3) -> case V3 of {'Idris.Core.CaseTree.Case', E0, E1, E2, E3} -> (fun (V4, V5, V6, V7) -> case V7 of [E4 | E5] -> (fun (V8, V9) -> case V8 of {'Idris.Core.CaseTree.ConCase', E6, E7, E8, E9} -> (fun (V10, V11, V12, V13) -> begin (V14 = ('Idris.Idris2.Core.TT':'un--getLoc'('erased', V6))), fun (V15) -> begin (V16 = (('un--getNewType'(V0, V1, V14, {'Idris.Core.CompileExpr.CLocal', V5, V14}, V2, V7))(V15))), case V16 of {'Idris.Prelude.Types.Left', E10} -> (fun (V17) -> {'Idris.Prelude.Types.Left', V17} end(E10)); {'Idris.Prelude.Types.Right', E11} -> (fun (V18) -> begin (V19 = [{'Idris.Core.CaseTree.ConCase', V10, V11, V12, V13} | V9]), case V18 of {'Idris.Prelude.Types.Nothing'} -> (fun () -> begin (V48 = begin (V47 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V20) -> fun (V21) -> fun (V22) -> fun (V23) -> fun (V24) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V22, V23, V24)) end end end end end, fun (V25) -> fun (V26) -> fun (V27) -> V26 end end end, fun (V28) -> fun (V29) -> fun (V30) -> fun (V31) -> fun (V32) -> begin (V33 = (V30(V32))), begin (V34 = (V31(V32))), (V33(V34)) end end end end end end end}, fun (V35) -> fun (V36) -> fun (V37) -> fun (V38) -> fun (V39) -> begin (V40 = (V37(V39))), ((V38(V40))(V39)) end end end end end end, fun (V41) -> fun (V42) -> fun (V43) -> begin (V44 = (V42(V43))), (V44(V43)) end end end end}, fun (V45) -> fun (V46) -> V46 end end}, V1))(V15))), {'Idris.Prelude.Types.Right', V47} end), case V48 of {'Idris.Prelude.Types.Left', E12} -> (fun (V49) -> {'Idris.Prelude.Types.Left', V49} end(E12)); {'Idris.Prelude.Types.Right', E13} -> (fun (V50) -> begin (V51 = (('un--conCases'(V0, V1, V2, V19))(V15))), case V51 of {'Idris.Prelude.Types.Left', E14} -> (fun (V52) -> {'Idris.Prelude.Types.Left', V52} end(E14)); {'Idris.Prelude.Types.Right', E15} -> (fun (V53) -> begin (V54 = (('un--getDef'(V0, V1, V2, V19))(V15))), case V54 of {'Idris.Prelude.Types.Left', E16} -> (fun (V55) -> {'Idris.Prelude.Types.Left', V55} end(E16)); {'Idris.Prelude.Types.Right', E17} -> (fun (V56) -> begin (V57 = {'Idris.Prelude.Types.Nothing'}), (('case--case block in toCExpTree\x{27}-6060'(V0, V4, V5, V9, V10, V11, V12, V13, V19, V6, 'erased', V2, V1, V14, V57, V50, V53, V56, ('Idris.Idris2.Data.List':'un--isNil'('erased', V53))))(V15)) end end(E17)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E15)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E13)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end()); {'Idris.Prelude.Types.Just', E18} -> (fun (V58) -> {'Idris.Prelude.Types.Right', V58} end(E18)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E11)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end(E6, E7, E8, E9)); {'Idris.Core.CaseTree.DelayCase', E19, E20, E21} -> (fun (V59, V60, V61) -> fun (V62) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.InternalError', <<"Unexpected DelayCase"/utf8>>}, V62)) end end(E19, E20, E21)); {'Idris.Core.CaseTree.ConstCase', E22, E23} -> (fun (V63, V64) -> begin (V65 = ('Idris.Idris2.Core.TT':'un--getLoc'('erased', V6))), fun (V66) -> begin (V67 = (('un--constCases'(V0, V1, V2, V7))(V66))), case V67 of {'Idris.Prelude.Types.Left', E24} -> (fun (V68) -> {'Idris.Prelude.Types.Left', V68} end(E24)); {'Idris.Prelude.Types.Right', E25} -> (fun (V69) -> begin (V70 = (('un--getDef'(V0, V1, V2, V7))(V66))), case V70 of {'Idris.Prelude.Types.Left', E26} -> (fun (V71) -> {'Idris.Prelude.Types.Left', V71} end(E26)); {'Idris.Prelude.Types.Right', E27} -> (fun (V72) -> begin (V73 = [{'Idris.Core.CaseTree.ConstCase', V63, V64} | V9]), (('case--toCExpTree\x{27}-6238'(V0, V4, V9, V63, V64, V73, V6, V5, 'erased', V2, V1, V65, V69, V72, ('Idris.Idris2.Data.List':'un--isNil'('erased', V69))))(V66)) end end(E27)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E25)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end(E22, E23)); {'Idris.Core.CaseTree.DefaultCase', E28} -> (fun (V74) -> ('un--toCExpTree'(V0, V1, V2, V74)) end(E28)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E4, E5)); [] -> fun (V75) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CCrash', ('Idris.Idris2.Core.TT':'un--getLoc'('erased', V6)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Missing case tree in "/utf8>>, ('Idris.Idris2.Core.Name':'dn--un--show_Show__Name'(V2))))}} end; _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E0, E1, E2, E3)); {'Idris.Core.CaseTree.STerm', E29, E30} -> (fun (V76, V77) -> ('un--toCExp'(V0, V1, V2, V77)) end(E29, E30)); {'Idris.Core.CaseTree.Unmatched', E31} -> (fun (V78) -> fun (V79) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CCrash', ('Idris.Idris2.Core.FC':'un--emptyFC'()), V78}} end end(E31)); {'Idris.Core.CaseTree.Impossible'} -> (fun () -> fun (V80) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CCrash', ('Idris.Idris2.Core.FC':'un--emptyFC'()), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Impossible case encountered in "/utf8>>, ('Idris.Idris2.Core.Name':'dn--un--show_Show__Name'(V2))))}} end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'un--toCExpTree'(V0, V1, V2, V3) -> case V3 of {'Idris.Core.CaseTree.Case', E0, E1, E2, E3} -> (fun (V4, V5, V6, V7) -> case V7 of [E4 | E5] -> (fun (V8, V9) -> case V8 of {'Idris.Core.CaseTree.DelayCase', E6, E7, E8} -> (fun (V10, V11, V12) -> begin (V13 = ('Idris.Idris2.Core.TT':'un--getLoc'('erased', V6))), fun (V14) -> begin (V15 = (('un--toCExpTree'([V10 | [V11 | V0]], V1, V2, V12))(V14))), case V15 of {'Idris.Prelude.Types.Left', E9} -> (fun (V16) -> {'Idris.Prelude.Types.Left', V16} end(E9)); {'Idris.Prelude.Types.Right', E10} -> (fun (V17) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CLet', V13, V11, 0, {'Idris.Core.CompileExpr.CForce', V13, {'Idris.Core.CompileExpr.CLocal', V5, ('Idris.Idris2.Core.TT':'un--getLoc'('erased', V6))}}, {'Idris.Core.CompileExpr.CLet', V13, V10, 0, {'Idris.Core.CompileExpr.CErased', V13}, V17}}} end(E10)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end(E6, E7, E8)); _ -> ('un--toCExpTree\x{27}'(V0, V1, V2, V3)) end end(E4, E5)); _ -> ('un--toCExpTree\x{27}'(V0, V1, V2, V3)) end end(E0, E1, E2, E3)); _ -> ('un--toCExpTree\x{27}'(V0, V1, V2, V3)) end. 'un--toCExpTm'(V0, V1, V2, V3) -> case V3 of {'Idris.Core.TT.Local', E0, E1, E2} -> (fun (V4, V5, V6) -> fun (V7) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CLocal', V6, V4}} end end(E0, E1, E2)); {'Idris.Core.TT.Ref', E3, E4, E5} -> (fun (V8, V9, V10) -> case V9 of {'Idris.Core.TT.DataCon', E8, E9} -> (fun (V11, V12) -> ('case--toCExpTm-4751'(V0, V12, V11, V10, V8, V2, V1, ('Idris.Idris2.Prelude.Basics':'un--&&'(('Idris.Idris2.Prelude.Types':'dn--un--==_Eq__Nat'(V12, 0)), fun () -> ('un--isFiniteEnum'(V10)) end)))) end(E8, E9)); {'Idris.Core.TT.TyCon', E10, E11} -> (fun (V13, V14) -> fun (V15) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CCon', V8, V10, {'Idris.Prelude.Types.Nothing'}, []}} end end(E10, E11)); _ -> fun (V16) -> begin (V17 = (('Idris.Idris2.Core.Context':'un--getFullName'(V1, V10))(V16))), case V17 of {'Idris.Prelude.Types.Left', E6} -> (fun (V18) -> {'Idris.Prelude.Types.Left', V18} end(E6)); {'Idris.Prelude.Types.Right', E7} -> (fun (V19) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CApp', V8, {'Idris.Core.CompileExpr.CRef', V8, V19}, []}} end(E7)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end(E3, E4, E5)); {'Idris.Core.TT.Meta', E12, E13, E14, E15} -> (fun (V20, V21, V22, V23) -> fun (V24) -> begin (V26 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V25) -> ('un--toCExp'(V0, V1, V2, V25)) end, V23))(V24))), case V26 of {'Idris.Prelude.Types.Left', E16} -> (fun (V27) -> {'Idris.Prelude.Types.Left', V27} end(E16)); {'Idris.Prelude.Types.Right', E17} -> (fun (V28) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CApp', V20, {'Idris.Core.CompileExpr.CRef', V20, V21}, V28}} end(E17)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E12, E13, E14, E15)); {'Idris.Core.TT.Bind', E18, E19, E20, E21} -> (fun (V29, V30, V31, V32) -> case V31 of {'Idris.Core.TT.Lam', E22, E23, E24, E25} -> (fun (V33, V34, V35, V36) -> fun (V37) -> begin (V38 = (('un--toCExp'([V30 | V0], V1, V2, V32))(V37))), case V38 of {'Idris.Prelude.Types.Left', E26} -> (fun (V39) -> {'Idris.Prelude.Types.Left', V39} end(E26)); {'Idris.Prelude.Types.Right', E27} -> (fun (V40) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CLam', V29, V30, V40}} end(E27)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E22, E23, E24, E25)); {'Idris.Core.TT.Let', E28, E29, E30, E31} -> (fun (V41, V42, V43, V44) -> fun (V45) -> begin (V46 = (('un--toCExp'([V30 | V0], V1, V2, V32))(V45))), case V46 of {'Idris.Prelude.Types.Left', E32} -> (fun (V47) -> {'Idris.Prelude.Types.Left', V47} end(E32)); {'Idris.Prelude.Types.Right', E33} -> (fun (V48) -> begin (V49 = (('un--toCExp'(V0, V1, V2, V43))(V45))), case V49 of {'Idris.Prelude.Types.Left', E34} -> (fun (V50) -> {'Idris.Prelude.Types.Left', V50} end(E34)); {'Idris.Prelude.Types.Right', E35} -> (fun (V51) -> {'Idris.Prelude.Types.Right', ('Idris.Idris2.Algebra.Semiring':'un--branchZero'('erased', 'erased', {'Idris.Builtin.MkPair', {'Idris.Algebra.Semiring.dn--un--__mkSemiring', fun (V52) -> fun (V53) -> ('Idris.Idris2.Algebra.ZeroOneOmega':'dn--un--|+|_Semiring__ZeroOneOmega'(V52, V53)) end end, ('Idris.Idris2.Algebra.ZeroOneOmega':'dn--un--plusNeutral_Semiring__ZeroOneOmega'()), fun (V54) -> fun (V55) -> ('Idris.Idris2.Algebra.ZeroOneOmega':'dn--un--|*|_Semiring__ZeroOneOmega'(V54, V55)) end end, ('Idris.Idris2.Algebra.ZeroOneOmega':'dn--un--timesNeutral_Semiring__ZeroOneOmega'())}, {'Idris.Prelude.EqOrd.dn--un--__mkEq', fun (V56) -> fun (V57) -> ('Idris.Idris2.Algebra.ZeroOneOmega':'dn--un--==_Eq__ZeroOneOmega'(V56, V57)) end end, fun (V58) -> fun (V59) -> ('Idris.Idris2.Algebra.ZeroOneOmega':'dn--un--/=_Eq__ZeroOneOmega'(V58, V59)) end end}}, fun () -> ('Idris.Idris2.Core.CompileExpr':'un--shrinkCExp'('erased', 'erased', {'Idris.Core.TT.DropCons', {'Idris.Core.TT.SubRefl'}}, V48)) end, fun () -> {'Idris.Core.CompileExpr.CLet', V29, V30, 0, V51, V48} end, V42))} end(E35)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E33)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E28, E29, E30, E31)); {'Idris.Core.TT.Pi', E36, E37, E38, E39} -> (fun (V60, V61, V62, V63) -> fun (V64) -> begin (V65 = (('un--toCExp'(V0, V1, V2, V63))(V64))), case V65 of {'Idris.Prelude.Types.Left', E40} -> (fun (V66) -> {'Idris.Prelude.Types.Left', V66} end(E40)); {'Idris.Prelude.Types.Right', E41} -> (fun (V67) -> begin (V68 = (('un--toCExp'([V30 | V0], V1, V2, V32))(V64))), case V68 of {'Idris.Prelude.Types.Left', E42} -> (fun (V69) -> {'Idris.Prelude.Types.Left', V69} end(E42)); {'Idris.Prelude.Types.Right', E43} -> (fun (V70) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CCon', V29, {'Idris.Core.Name.UN', <<"->"/utf8>>}, {'Idris.Prelude.Types.Nothing'}, [V67 | [{'Idris.Core.CompileExpr.CLam', V29, V30, V70} | []]]}} end(E43)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E41)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E36, E37, E38, E39)); _ -> fun (V71) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CErased', V29}} end end end(E18, E19, E20, E21)); {'Idris.Core.TT.App', E44, E45, E46} -> (fun (V72, V73, V74) -> fun (V75) -> begin (V76 = (('un--toCExp'(V0, V1, V2, V73))(V75))), case V76 of {'Idris.Prelude.Types.Left', E47} -> (fun (V77) -> {'Idris.Prelude.Types.Left', V77} end(E47)); {'Idris.Prelude.Types.Right', E48} -> (fun (V78) -> begin (V79 = (('un--toCExp'(V0, V1, V2, V74))(V75))), case V79 of {'Idris.Prelude.Types.Left', E49} -> (fun (V80) -> {'Idris.Prelude.Types.Left', V80} end(E49)); {'Idris.Prelude.Types.Right', E50} -> (fun (V81) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CApp', V72, V78, [V81 | []]}} end(E50)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E48)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E44, E45, E46)); {'Idris.Core.TT.As', E51, E52, E53, E54} -> (fun (V82, V83, V84, V85) -> ('un--toCExpTm'(V0, V1, V2, V85)) end(E51, E52, E53, E54)); {'Idris.Core.TT.TDelayed', E55, E56, E57} -> (fun (V86, V87, V88) -> fun (V89) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CErased', V86}} end end(E55, E56, E57)); {'Idris.Core.TT.TDelay', E58, E59, E60, E61} -> (fun (V90, V91, V92, V93) -> fun (V94) -> begin (V95 = (('un--toCExp'(V0, V1, V2, V93))(V94))), case V95 of {'Idris.Prelude.Types.Left', E62} -> (fun (V96) -> {'Idris.Prelude.Types.Left', V96} end(E62)); {'Idris.Prelude.Types.Right', E63} -> (fun (V97) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CDelay', V90, V97}} end(E63)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E58, E59, E60, E61)); {'Idris.Core.TT.TForce', E64, E65, E66} -> (fun (V98, V99, V100) -> fun (V101) -> begin (V102 = (('un--toCExp'(V0, V1, V2, V100))(V101))), case V102 of {'Idris.Prelude.Types.Left', E67} -> (fun (V103) -> {'Idris.Prelude.Types.Left', V103} end(E67)); {'Idris.Prelude.Types.Right', E68} -> (fun (V104) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CForce', V98, V104}} end(E68)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E64, E65, E66)); {'Idris.Core.TT.PrimVal', E69, E70} -> (fun (V105, V106) -> begin (V107 = ('Idris.Idris2.Core.TT':'un--constTag'(V106))), ('case--toCExpTm-5061'(V0, V1, V106, V105, V2, V107, ('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__Int'(V107, 0)))) end end(E69, E70)); {'Idris.Core.TT.Erased', E71, E72} -> (fun (V108, V109) -> fun (V110) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CErased', V108}} end end(E71, E72)); {'Idris.Core.TT.TType', E73} -> (fun (V111) -> fun (V112) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CCon', V111, {'Idris.Core.Name.UN', <<"Type"/utf8>>}, {'Idris.Prelude.Types.Nothing'}, []}} end end(E73)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'un--toCExp'(V0, V1, V2, V3) -> ('case--toCExp-5127'(V0, V3, V2, V1, ('Idris.Idris2.Core.TT':'un--getFnArgs'('erased', V3)))). 'un--toCDef'(V0, V1, V2, V3) -> case V3 of {'Idris.Core.Context.None'} -> (fun () -> fun (V4) -> begin (V5 = (('Idris.Idris2.Core.Context':'un--getFullName'(V0, V1))(V4))), case V5 of {'Idris.Prelude.Types.Left', E2} -> (fun (V6) -> {'Idris.Prelude.Types.Left', V6} end(E2)); {'Idris.Prelude.Types.Right', E3} -> (fun (V7) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.MkError', {'Idris.Core.CompileExpr.CCrash', ('Idris.Idris2.Core.FC':'un--emptyFC'()), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Encountered undefined name "/utf8>>, ('Idris.Idris2.Core.Name':'dn--un--show_Show__Name'(V7))))}}} end(E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end()); {'Idris.Core.Context.PMDef', E4, E5, E6, E7, E8} -> (fun (V8, V9, V10, V11, V12) -> fun (V13) -> begin (V14 = (('un--toCExpTree'(V9, V0, V1, V11))(V13))), case V14 of {'Idris.Prelude.Types.Left', E9} -> (fun (V15) -> {'Idris.Prelude.Types.Left', V15} end(E9)); {'Idris.Prelude.Types.Right', E10} -> (fun (V16) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.MkFun', V9, V16}} end(E10)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E4, E5, E6, E7, E8)); {'Idris.Core.Context.ExternDef', E11} -> (fun (V17) -> ('case--toCDef-7586'(V17, V2, V1, V0, ('un--mkArgList'(0, V17)))) end(E11)); {'Idris.Core.Context.ForeignDef', E12, E13} -> (fun (V18, V19) -> fun (V20) -> begin (V49 = begin (V48 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', '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}, V0))(V20))), {'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) -> begin (V55 = begin (V52 = (('Idris.Idris2.Core.Normalise':'un--nf'(V0, [], V51, {'Idris.Core.Env.Nil'}, V2))(V20))), case V52 of {'Idris.Prelude.Types.Left', E16} -> (fun (V53) -> {'Idris.Prelude.Types.Left', V53} end(E16)); {'Idris.Prelude.Types.Right', E17} -> (fun (V54) -> (('un--getCFTypes'(V0, [], V54))(V20)) end(E17)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end), case V55 of {'Idris.Prelude.Types.Left', E18} -> (fun (V56) -> {'Idris.Prelude.Types.Left', V56} end(E18)); {'Idris.Prelude.Types.Right', E19} -> (fun (V57) -> case V57 of {'Idris.Builtin.MkPair', E20, E21} -> (fun (V58, V59) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.MkForeign', V19, V58, V59}} end(E20, E21)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E19)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E15)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E12, E13)); {'Idris.Core.Context.Builtin', E22, E23} -> (fun (V60, V61) -> ('case--toCDef-7719'(V60, V61, V2, V1, V0, ('un--mkArgList'(0, V60)))) end(E22, E23)); {'Idris.Core.Context.DCon', E24, E25, E26} -> (fun (V62, V63, V64) -> begin (V66 = ('Idris.Idris2.Prelude.Types':'un--maybe'('erased', 'erased', fun () -> {'Idris.Prelude.Types.Nothing'} end, fun () -> fun (V65) -> {'Idris.Prelude.Types.Just', ('Idris.Idris2.Builtin':'un--snd'('erased', 'erased', V65))} end end, V64))), fun (V67) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.MkCon', {'Idris.Prelude.Types.Just', V62}, V63, V66}} end end end(E24, E25, E26)); {'Idris.Core.Context.TCon', E27, E28, E29, E30, E31, E32, E33, E34} -> (fun (V68, V69, V70, V71, V72, V73, V74, V75) -> fun (V76) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.MkCon', {'Idris.Prelude.Types.Nothing'}, V69, {'Idris.Prelude.Types.Nothing'}}} end end(E27, E28, E29, E30, E31, E32, E33, E34)); {'Idris.Core.Context.Hole', E35, E36} -> (fun (V77, V78) -> fun (V79) -> begin (V80 = (('Idris.Idris2.Core.Context':'un--getFullName'(V0, V1))(V79))), case V80 of {'Idris.Prelude.Types.Left', E37} -> (fun (V81) -> {'Idris.Prelude.Types.Left', V81} end(E37)); {'Idris.Prelude.Types.Right', E38} -> (fun (V82) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.MkError', {'Idris.Core.CompileExpr.CCrash', ('Idris.Idris2.Core.FC':'un--emptyFC'()), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Encountered unimplemented hole "/utf8>>, ('Idris.Idris2.Core.Name':'dn--un--show_Show__Name'(V82))))}}} end(E38)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E35, E36)); {'Idris.Core.Context.Guess', E39, E40, E41} -> (fun (V83, V84, V85) -> fun (V86) -> begin (V87 = (('Idris.Idris2.Core.Context':'un--getFullName'(V0, V1))(V86))), case V87 of {'Idris.Prelude.Types.Left', E42} -> (fun (V88) -> {'Idris.Prelude.Types.Left', V88} end(E42)); {'Idris.Prelude.Types.Right', E43} -> (fun (V89) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.MkError', {'Idris.Core.CompileExpr.CCrash', ('Idris.Idris2.Core.FC':'un--emptyFC'()), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Encountered constrained hole "/utf8>>, ('Idris.Idris2.Core.Name':'dn--un--show_Show__Name'(V89))))}}} end(E43)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E39, E40, E41)); {'Idris.Core.Context.BySearch', E44, E45, E46} -> (fun (V90, V91, V92) -> fun (V93) -> begin (V94 = (('Idris.Idris2.Core.Context':'un--getFullName'(V0, V1))(V93))), case V94 of {'Idris.Prelude.Types.Left', E47} -> (fun (V95) -> {'Idris.Prelude.Types.Left', V95} end(E47)); {'Idris.Prelude.Types.Right', E48} -> (fun (V96) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.MkError', {'Idris.Core.CompileExpr.CCrash', ('Idris.Idris2.Core.FC':'un--emptyFC'()), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Encountered incomplete proof search "/utf8>>, ('Idris.Idris2.Core.Name':'dn--un--show_Show__Name'(V96))))}}} end(E48)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E44, E45, E46)); _ -> fun (V97) -> begin (V98 = (('Idris.Idris2.Core.Context':'un--getFullName'(V0, V1))(V97))), case V98 of {'Idris.Prelude.Types.Left', E0} -> (fun (V99) -> {'Idris.Prelude.Types.Left', V99} end(E0)); {'Idris.Prelude.Types.Right', E1} -> (fun (V100) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.MkError', {'Idris.Core.CompileExpr.CCrash', ('Idris.Idris2.Core.FC':'un--emptyFC'()), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Encountered uncompilable name "/utf8>>, ('Idris.Idris2.Prelude.Show':'dn--un--show_Show__(|((Builtin.Pair $a) $b),((Builtin.MkPair $a) $b)|)'('erased', 'erased', {'Idris.Builtin.MkPair', {'Idris.Prelude.Show.dn--un--__mkShow', fun (V101) -> ('Idris.Idris2.Core.Name':'dn--un--show_Show__Name'(V101)) end, fun (V102) -> fun (V103) -> ('Idris.Idris2.Core.Name':'dn--un--showPrec_Show__Name'(V102, V103)) end end}, {'Idris.Prelude.Show.dn--un--__mkShow', fun (V104) -> ('Idris.Idris2.Core.Context':'dn--un--show_Show__Def'(V104)) end, fun (V105) -> fun (V106) -> ('Idris.Idris2.Core.Context':'dn--un--showPrec_Show__Def'(V105, V106)) end end}}, {'Idris.Builtin.MkPair', V100, V3}))))}}} end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end. 'un--numArgs'(V0, V1, V2) -> case V2 of {'Idris.Core.TT.Ref', E0, E1, E2} -> (fun (V3, V4, V5) -> case V4 of {'Idris.Core.TT.TyCon', E53, E54} -> (fun (V6, V7) -> fun (V8) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.Arity', V7}} end end(E53, E54)); _ -> fun (V9) -> begin (V36 = (('Idris.Idris2.Core.Context':'un--lookupCtxtExact'(V5, case V1 of {'Idris.Core.Context.MkDefs', E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24, E25, E26, E27, E28} -> (fun (V10, V11, V12, V13, V14, V15, V16, V17, V18, V19, V20, V21, V22, V23, V24, V25, V26, V27, V28, V29, V30, V31, V32, V33, V34, V35) -> V10 end(E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24, E25, E26, E27, E28)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))(V9))), case V36 of {'Idris.Prelude.Types.Left', E29} -> (fun (V37) -> {'Idris.Prelude.Types.Left', V37} end(E29)); {'Idris.Prelude.Types.Right', E30} -> (fun (V38) -> case V38 of {'Idris.Prelude.Types.Just', E31} -> (fun (V39) -> begin (V40 = {'Idris.Prelude.Types.Just', V39}), (('case--case block in numArgs-3237'('erased', V3, V4, V5, V1, V39, V40, case V39 of {'Idris.Core.Context.MkGlobalDef', E32, E33, E34, E35, E36, E37, E38, E39, E40, E41, E42, E43, E44, E45, E46, E47, E48, E49, E50, E51, E52} -> (fun (V41, V42, V43, V44, V45, V46, V47, V48, V49, V50, V51, V52, V53, V54, V55, V56, V57, V58, V59, V60, V61) -> V58 end(E32, E33, E34, E35, E36, E37, E38, E39, E40, E41, E42, E43, E44, E45, E46, E47, E48, E49, E50, E51, E52)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))(V9)) end end(E31)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.Arity', 0}} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E30)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end(E0, E1, E2)); _ -> fun (V62) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.Arity', 0}} end end. 'un--nfToCFType'(V0, V1, V2, V3) -> case V3 of {'Idris.Core.Value.NPrimVal', E1854, E1855} -> (fun (V4, V5) -> case V5 of {'Idris.Core.TT.IntType'} -> (fun () -> fun (V6) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFInt'}} end end()); {'Idris.Core.TT.Bits8Type'} -> (fun () -> fun (V7) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnsigned8'}} end end()); {'Idris.Core.TT.Bits16Type'} -> (fun () -> fun (V8) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnsigned16'}} end end()); {'Idris.Core.TT.Bits32Type'} -> (fun () -> fun (V9) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnsigned32'}} end end()); {'Idris.Core.TT.Bits64Type'} -> (fun () -> fun (V10) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnsigned64'}} end end()); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NPrimVal', E2596, E2597} -> (fun (V11, V12) -> case V12 of {'Idris.Core.TT.StringType'} -> (fun () -> fun (V13) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFString'}} end end()); _ -> case V3 of {'Idris.Core.Value.NPrimVal', E2782, E2783} -> (fun (V14, V15) -> case V15 of {'Idris.Core.TT.DoubleType'} -> (fun () -> fun (V16) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFDouble'}} end end()); {'Idris.Core.TT.CharType'} -> (fun () -> fun (V17) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFChar'}} end end()); {'Idris.Core.TT.WorldType'} -> (fun () -> fun (V18) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFWorld'}} end end()); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E2866, E2867, E2868, E2869} -> (fun (V19, V20, V21, V22) -> case V21 of {'Idris.Core.TT.Pi', E2911, E2912, E2913, E2914} -> (fun (V23, V24, V25, V26) -> fun (V27) -> begin (V56 = begin (V55 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V28) -> fun (V29) -> fun (V30) -> fun (V31) -> fun (V32) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V30, V31, V32)) end end end end end, fun (V33) -> fun (V34) -> fun (V35) -> V34 end end end, fun (V36) -> fun (V37) -> fun (V38) -> fun (V39) -> fun (V40) -> begin (V41 = (V38(V40))), begin (V42 = (V39(V40))), (V41(V42)) end end end end end end end}, fun (V43) -> fun (V44) -> fun (V45) -> fun (V46) -> fun (V47) -> begin (V48 = (V45(V47))), ((V46(V48))(V47)) end end end end end end, fun (V49) -> fun (V50) -> fun (V51) -> begin (V52 = (V50(V51))), (V52(V51)) end end end end}, fun (V53) -> fun (V54) -> V54 end end}, V0))(V27))), {'Idris.Prelude.Types.Right', V55} end), case V56 of {'Idris.Prelude.Types.Left', E2915} -> (fun (V57) -> {'Idris.Prelude.Types.Left', V57} end(E2915)); {'Idris.Prelude.Types.Right', E2916} -> (fun (V58) -> begin (V59 = (('un--nfToCFType'(V0, V19, 1, V26))(V27))), case V59 of {'Idris.Prelude.Types.Left', E2917} -> (fun (V60) -> {'Idris.Prelude.Types.Left', V60} end(E2917)); {'Idris.Prelude.Types.Right', E2918} -> (fun (V61) -> begin (V62 = (((V22(V58))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V19, 1}))))(V27))), case V62 of {'Idris.Prelude.Types.Left', E2919} -> (fun (V63) -> {'Idris.Prelude.Types.Left', V63} end(E2919)); {'Idris.Prelude.Types.Right', E2920} -> (fun (V64) -> begin (V65 = (('un--nfToCFType'(V0, V19, 1, V64))(V27))), case V65 of {'Idris.Prelude.Types.Left', E2921} -> (fun (V66) -> {'Idris.Prelude.Types.Left', V66} end(E2921)); {'Idris.Prelude.Types.Right', E2922} -> (fun (V67) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V61, V67}} end(E2922)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2920)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2918)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2916)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2911, E2912, E2913, E2914)); _ -> case V3 of {'Idris.Core.Value.NTCon', E2876, E2877, E2878, E2879, E2880} -> (fun (V68, V69, V70, V71, V72) -> fun (V73) -> begin (V102 = begin (V101 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V74) -> fun (V75) -> fun (V76) -> fun (V77) -> fun (V78) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V76, V77, V78)) end end end end end, fun (V79) -> fun (V80) -> fun (V81) -> V80 end end end, fun (V82) -> fun (V83) -> fun (V84) -> fun (V85) -> fun (V86) -> begin (V87 = (V84(V86))), begin (V88 = (V85(V86))), (V87(V88)) end end end end end end end}, fun (V89) -> fun (V90) -> fun (V91) -> fun (V92) -> fun (V93) -> begin (V94 = (V91(V93))), ((V92(V94))(V93)) end end end end end end, fun (V95) -> fun (V96) -> fun (V97) -> begin (V98 = (V96(V97))), (V98(V97)) end end end end}, fun (V99) -> fun (V100) -> V100 end end}, V0))(V73))), {'Idris.Prelude.Types.Right', V101} end), case V102 of {'Idris.Prelude.Types.Left', E2881} -> (fun (V103) -> {'Idris.Prelude.Types.Left', V103} end(E2881)); {'Idris.Prelude.Types.Right', E2882} -> (fun (V104) -> begin (V109 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V105) -> fun (V106) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V105, V106)) end end, fun (V107) -> fun (V108) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V107, V108)) end end}, V69, V73))), case V109 of {'Idris.Prelude.Types.Left', E2883} -> (fun (V110) -> {'Idris.Prelude.Types.Left', V110} end(E2883)); {'Idris.Prelude.Types.Right', E2884} -> (fun (V111) -> begin (V112 = (('un--getNArgs'(V0, V104, V111, V72))(V73))), case V112 of {'Idris.Prelude.Types.Left', E2885} -> (fun (V113) -> {'Idris.Prelude.Types.Left', V113} end(E2885)); {'Idris.Prelude.Types.Right', E2886} -> (fun (V114) -> case V114 of {'Idris.Compiler.CompileExpr.User', E2887, E2888} -> (fun (V115, V116) -> begin (V118 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V117) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V104, V117)) end, V116))(V73))), case V118 of {'Idris.Prelude.Types.Left', E2889} -> (fun (V119) -> {'Idris.Prelude.Types.Left', V119} end(E2889)); {'Idris.Prelude.Types.Right', E2890} -> (fun (V120) -> begin (V122 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V121) -> ('un--nfToCFType'(V0, V68, V2, V121)) end, V120))(V73))), case V122 of {'Idris.Prelude.Types.Left', E2891} -> (fun (V123) -> {'Idris.Prelude.Types.Left', V123} end(E2891)); {'Idris.Prelude.Types.Right', E2892} -> (fun (V124) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V111, V124}} end(E2892)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2890)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2887, E2888)); {'Idris.Compiler.CompileExpr.Struct', E2893, E2894} -> (fun (V125, V126) -> begin (V137 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V127) -> case V127 of {'Idris.Builtin.MkPair', E2895, E2896} -> (fun (V128, V129) -> fun (V130) -> begin (V131 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V104, V129))(V130))), case V131 of {'Idris.Prelude.Types.Left', E2897} -> (fun (V132) -> {'Idris.Prelude.Types.Left', V132} end(E2897)); {'Idris.Prelude.Types.Right', E2898} -> (fun (V133) -> begin (V134 = (('un--nfToCFType'(V0, V68, 0, V133))(V130))), case V134 of {'Idris.Prelude.Types.Left', E2899} -> (fun (V135) -> {'Idris.Prelude.Types.Left', V135} end(E2899)); {'Idris.Prelude.Types.Right', E2900} -> (fun (V136) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V128, V136}} end(E2900)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2898)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2895, E2896)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V126))(V73))), case V137 of {'Idris.Prelude.Types.Left', E2901} -> (fun (V138) -> {'Idris.Prelude.Types.Left', V138} end(E2901)); {'Idris.Prelude.Types.Right', E2902} -> (fun (V139) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V125, V139}} end(E2902)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2893, E2894)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2903} -> (fun (V140) -> begin (V141 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V104, V140))(V73))), case V141 of {'Idris.Prelude.Types.Left', E2904} -> (fun (V142) -> {'Idris.Prelude.Types.Left', V142} end(E2904)); {'Idris.Prelude.Types.Right', E2905} -> (fun (V143) -> begin (V144 = (('un--nfToCFType'(V0, V68, V2, V143))(V73))), case V144 of {'Idris.Prelude.Types.Left', E2906} -> (fun (V145) -> {'Idris.Prelude.Types.Left', V145} end(E2906)); {'Idris.Prelude.Types.Right', E2907} -> (fun (V146) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V146}} end(E2907)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2905)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2903)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2886)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2884)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2882)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2876, E2877, E2878, E2879, E2880)); {'Idris.Core.Value.NType', E2908} -> (fun (V147) -> fun (V148) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2908)); {'Idris.Core.Value.NErased', E2909, E2910} -> (fun (V149, V150) -> fun (V151) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2909, E2910)); _ -> fun (V152) -> begin (V181 = begin (V180 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V153) -> fun (V154) -> fun (V155) -> fun (V156) -> fun (V157) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V155, V156, V157)) end end end end end, fun (V158) -> fun (V159) -> fun (V160) -> V159 end end end, fun (V161) -> fun (V162) -> fun (V163) -> fun (V164) -> fun (V165) -> begin (V166 = (V163(V165))), begin (V167 = (V164(V165))), (V166(V167)) end end end end end end end}, fun (V168) -> fun (V169) -> fun (V170) -> fun (V171) -> fun (V172) -> begin (V173 = (V170(V172))), ((V171(V173))(V172)) end end end end end end, fun (V174) -> fun (V175) -> fun (V176) -> begin (V177 = (V175(V176))), (V177(V176)) end end end end}, fun (V178) -> fun (V179) -> V179 end end}, V0))(V152))), {'Idris.Prelude.Types.Right', V180} end), case V181 of {'Idris.Prelude.Types.Left', E2870} -> (fun (V182) -> {'Idris.Prelude.Types.Left', V182} end(E2870)); {'Idris.Prelude.Types.Right', E2871} -> (fun (V183) -> begin (V184 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V183, {'Idris.Core.Env.Nil'}, V3, V152))), case V184 of {'Idris.Prelude.Types.Left', E2872} -> (fun (V185) -> {'Idris.Prelude.Types.Left', V185} end(E2872)); {'Idris.Prelude.Types.Right', E2873} -> (fun (V186) -> begin (V191 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V187) -> fun (V188) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V187, V188)) end end, fun (V189) -> fun (V190) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V189, V190)) end end}, V186, V152))), case V191 of {'Idris.Prelude.Types.Left', E2874} -> (fun (V192) -> {'Idris.Prelude.Types.Left', V192} end(E2874)); {'Idris.Prelude.Types.Right', E2875} -> (fun (V193) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V193))))}, V152)) end(E2875)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2873)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2871)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E2866, E2867, E2868, E2869)); _ -> case V3 of {'Idris.Core.Value.NTCon', E2831, E2832, E2833, E2834, E2835} -> (fun (V194, V195, V196, V197, V198) -> fun (V199) -> begin (V228 = begin (V227 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V200) -> fun (V201) -> fun (V202) -> fun (V203) -> fun (V204) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V202, V203, V204)) end end end end end, fun (V205) -> fun (V206) -> fun (V207) -> V206 end end end, fun (V208) -> fun (V209) -> fun (V210) -> fun (V211) -> fun (V212) -> begin (V213 = (V210(V212))), begin (V214 = (V211(V212))), (V213(V214)) end end end end end end end}, fun (V215) -> fun (V216) -> fun (V217) -> fun (V218) -> fun (V219) -> begin (V220 = (V217(V219))), ((V218(V220))(V219)) end end end end end end, fun (V221) -> fun (V222) -> fun (V223) -> begin (V224 = (V222(V223))), (V224(V223)) end end end end}, fun (V225) -> fun (V226) -> V226 end end}, V0))(V199))), {'Idris.Prelude.Types.Right', V227} end), case V228 of {'Idris.Prelude.Types.Left', E2836} -> (fun (V229) -> {'Idris.Prelude.Types.Left', V229} end(E2836)); {'Idris.Prelude.Types.Right', E2837} -> (fun (V230) -> begin (V235 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V231) -> fun (V232) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V231, V232)) end end, fun (V233) -> fun (V234) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V233, V234)) end end}, V195, V199))), case V235 of {'Idris.Prelude.Types.Left', E2838} -> (fun (V236) -> {'Idris.Prelude.Types.Left', V236} end(E2838)); {'Idris.Prelude.Types.Right', E2839} -> (fun (V237) -> begin (V238 = (('un--getNArgs'(V0, V230, V237, V198))(V199))), case V238 of {'Idris.Prelude.Types.Left', E2840} -> (fun (V239) -> {'Idris.Prelude.Types.Left', V239} end(E2840)); {'Idris.Prelude.Types.Right', E2841} -> (fun (V240) -> case V240 of {'Idris.Compiler.CompileExpr.User', E2842, E2843} -> (fun (V241, V242) -> begin (V244 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V243) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V230, V243)) end, V242))(V199))), case V244 of {'Idris.Prelude.Types.Left', E2844} -> (fun (V245) -> {'Idris.Prelude.Types.Left', V245} end(E2844)); {'Idris.Prelude.Types.Right', E2845} -> (fun (V246) -> begin (V248 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V247) -> ('un--nfToCFType'(V0, V194, V2, V247)) end, V246))(V199))), case V248 of {'Idris.Prelude.Types.Left', E2846} -> (fun (V249) -> {'Idris.Prelude.Types.Left', V249} end(E2846)); {'Idris.Prelude.Types.Right', E2847} -> (fun (V250) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V237, V250}} end(E2847)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2845)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2842, E2843)); {'Idris.Compiler.CompileExpr.Struct', E2848, E2849} -> (fun (V251, V252) -> begin (V263 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V253) -> case V253 of {'Idris.Builtin.MkPair', E2850, E2851} -> (fun (V254, V255) -> fun (V256) -> begin (V257 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V230, V255))(V256))), case V257 of {'Idris.Prelude.Types.Left', E2852} -> (fun (V258) -> {'Idris.Prelude.Types.Left', V258} end(E2852)); {'Idris.Prelude.Types.Right', E2853} -> (fun (V259) -> begin (V260 = (('un--nfToCFType'(V0, V194, 0, V259))(V256))), case V260 of {'Idris.Prelude.Types.Left', E2854} -> (fun (V261) -> {'Idris.Prelude.Types.Left', V261} end(E2854)); {'Idris.Prelude.Types.Right', E2855} -> (fun (V262) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V254, V262}} end(E2855)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2853)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2850, E2851)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V252))(V199))), case V263 of {'Idris.Prelude.Types.Left', E2856} -> (fun (V264) -> {'Idris.Prelude.Types.Left', V264} end(E2856)); {'Idris.Prelude.Types.Right', E2857} -> (fun (V265) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V251, V265}} end(E2857)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2848, E2849)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2858} -> (fun (V266) -> begin (V267 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V230, V266))(V199))), case V267 of {'Idris.Prelude.Types.Left', E2859} -> (fun (V268) -> {'Idris.Prelude.Types.Left', V268} end(E2859)); {'Idris.Prelude.Types.Right', E2860} -> (fun (V269) -> begin (V270 = (('un--nfToCFType'(V0, V194, V2, V269))(V199))), case V270 of {'Idris.Prelude.Types.Left', E2861} -> (fun (V271) -> {'Idris.Prelude.Types.Left', V271} end(E2861)); {'Idris.Prelude.Types.Right', E2862} -> (fun (V272) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V272}} end(E2862)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2860)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2858)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2841)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2839)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2837)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2831, E2832, E2833, E2834, E2835)); {'Idris.Core.Value.NType', E2863} -> (fun (V273) -> fun (V274) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2863)); {'Idris.Core.Value.NErased', E2864, E2865} -> (fun (V275, V276) -> fun (V277) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2864, E2865)); _ -> fun (V278) -> begin (V307 = begin (V306 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V279) -> fun (V280) -> fun (V281) -> fun (V282) -> fun (V283) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V281, V282, V283)) end end end end end, fun (V284) -> fun (V285) -> fun (V286) -> V285 end end end, fun (V287) -> fun (V288) -> fun (V289) -> fun (V290) -> fun (V291) -> begin (V292 = (V289(V291))), begin (V293 = (V290(V291))), (V292(V293)) end end end end end end end}, fun (V294) -> fun (V295) -> fun (V296) -> fun (V297) -> fun (V298) -> begin (V299 = (V296(V298))), ((V297(V299))(V298)) end end end end end end, fun (V300) -> fun (V301) -> fun (V302) -> begin (V303 = (V301(V302))), (V303(V302)) end end end end}, fun (V304) -> fun (V305) -> V305 end end}, V0))(V278))), {'Idris.Prelude.Types.Right', V306} end), case V307 of {'Idris.Prelude.Types.Left', E2825} -> (fun (V308) -> {'Idris.Prelude.Types.Left', V308} end(E2825)); {'Idris.Prelude.Types.Right', E2826} -> (fun (V309) -> begin (V310 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V309, {'Idris.Core.Env.Nil'}, V3, V278))), case V310 of {'Idris.Prelude.Types.Left', E2827} -> (fun (V311) -> {'Idris.Prelude.Types.Left', V311} end(E2827)); {'Idris.Prelude.Types.Right', E2828} -> (fun (V312) -> begin (V317 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V313) -> fun (V314) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V313, V314)) end end, fun (V315) -> fun (V316) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V315, V316)) end end}, V312, V278))), case V317 of {'Idris.Prelude.Types.Left', E2829} -> (fun (V318) -> {'Idris.Prelude.Types.Left', V318} end(E2829)); {'Idris.Prelude.Types.Right', E2830} -> (fun (V319) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V319))))}, V278)) end(E2830)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2828)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2826)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E2964, E2965, E2966, E2967} -> (fun (V320, V321, V322, V323) -> fun (V324) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V320, <<"Function types not allowed in a foreign struct"/utf8>>}, V324)) end end(E2964, E2965, E2966, E2967)); _ -> case V3 of {'Idris.Core.Value.NTCon', E2929, E2930, E2931, E2932, E2933} -> (fun (V325, V326, V327, V328, V329) -> fun (V330) -> begin (V359 = begin (V358 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V331) -> fun (V332) -> fun (V333) -> fun (V334) -> fun (V335) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V333, V334, V335)) end end end end end, fun (V336) -> fun (V337) -> fun (V338) -> V337 end end end, fun (V339) -> fun (V340) -> fun (V341) -> fun (V342) -> fun (V343) -> begin (V344 = (V341(V343))), begin (V345 = (V342(V343))), (V344(V345)) end end end end end end end}, fun (V346) -> fun (V347) -> fun (V348) -> fun (V349) -> fun (V350) -> begin (V351 = (V348(V350))), ((V349(V351))(V350)) end end end end end end, fun (V352) -> fun (V353) -> fun (V354) -> begin (V355 = (V353(V354))), (V355(V354)) end end end end}, fun (V356) -> fun (V357) -> V357 end end}, V0))(V330))), {'Idris.Prelude.Types.Right', V358} end), case V359 of {'Idris.Prelude.Types.Left', E2934} -> (fun (V360) -> {'Idris.Prelude.Types.Left', V360} end(E2934)); {'Idris.Prelude.Types.Right', E2935} -> (fun (V361) -> begin (V366 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V362) -> fun (V363) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V362, V363)) end end, fun (V364) -> fun (V365) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V364, V365)) end end}, V326, V330))), case V366 of {'Idris.Prelude.Types.Left', E2936} -> (fun (V367) -> {'Idris.Prelude.Types.Left', V367} end(E2936)); {'Idris.Prelude.Types.Right', E2937} -> (fun (V368) -> begin (V369 = (('un--getNArgs'(V0, V361, V368, V329))(V330))), case V369 of {'Idris.Prelude.Types.Left', E2938} -> (fun (V370) -> {'Idris.Prelude.Types.Left', V370} end(E2938)); {'Idris.Prelude.Types.Right', E2939} -> (fun (V371) -> case V371 of {'Idris.Compiler.CompileExpr.User', E2940, E2941} -> (fun (V372, V373) -> begin (V375 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V374) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V361, V374)) end, V373))(V330))), case V375 of {'Idris.Prelude.Types.Left', E2942} -> (fun (V376) -> {'Idris.Prelude.Types.Left', V376} end(E2942)); {'Idris.Prelude.Types.Right', E2943} -> (fun (V377) -> begin (V379 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V378) -> ('un--nfToCFType'(V0, V325, V2, V378)) end, V377))(V330))), case V379 of {'Idris.Prelude.Types.Left', E2944} -> (fun (V380) -> {'Idris.Prelude.Types.Left', V380} end(E2944)); {'Idris.Prelude.Types.Right', E2945} -> (fun (V381) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V368, V381}} end(E2945)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2943)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2940, E2941)); {'Idris.Compiler.CompileExpr.Struct', E2946, E2947} -> (fun (V382, V383) -> begin (V394 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V384) -> case V384 of {'Idris.Builtin.MkPair', E2948, E2949} -> (fun (V385, V386) -> fun (V387) -> begin (V388 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V361, V386))(V387))), case V388 of {'Idris.Prelude.Types.Left', E2950} -> (fun (V389) -> {'Idris.Prelude.Types.Left', V389} end(E2950)); {'Idris.Prelude.Types.Right', E2951} -> (fun (V390) -> begin (V391 = (('un--nfToCFType'(V0, V325, 0, V390))(V387))), case V391 of {'Idris.Prelude.Types.Left', E2952} -> (fun (V392) -> {'Idris.Prelude.Types.Left', V392} end(E2952)); {'Idris.Prelude.Types.Right', E2953} -> (fun (V393) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V385, V393}} end(E2953)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2951)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2948, E2949)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V383))(V330))), case V394 of {'Idris.Prelude.Types.Left', E2954} -> (fun (V395) -> {'Idris.Prelude.Types.Left', V395} end(E2954)); {'Idris.Prelude.Types.Right', E2955} -> (fun (V396) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V382, V396}} end(E2955)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2946, E2947)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2956} -> (fun (V397) -> begin (V398 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V361, V397))(V330))), case V398 of {'Idris.Prelude.Types.Left', E2957} -> (fun (V399) -> {'Idris.Prelude.Types.Left', V399} end(E2957)); {'Idris.Prelude.Types.Right', E2958} -> (fun (V400) -> begin (V401 = (('un--nfToCFType'(V0, V325, V2, V400))(V330))), case V401 of {'Idris.Prelude.Types.Left', E2959} -> (fun (V402) -> {'Idris.Prelude.Types.Left', V402} end(E2959)); {'Idris.Prelude.Types.Right', E2960} -> (fun (V403) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V403}} end(E2960)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2958)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2956)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2939)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2937)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2935)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2929, E2930, E2931, E2932, E2933)); {'Idris.Core.Value.NType', E2961} -> (fun (V404) -> fun (V405) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2961)); {'Idris.Core.Value.NErased', E2962, E2963} -> (fun (V406, V407) -> fun (V408) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2962, E2963)); _ -> fun (V409) -> begin (V438 = begin (V437 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V410) -> fun (V411) -> fun (V412) -> fun (V413) -> fun (V414) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V412, V413, V414)) end end end end end, fun (V415) -> fun (V416) -> fun (V417) -> V416 end end end, fun (V418) -> fun (V419) -> fun (V420) -> fun (V421) -> fun (V422) -> begin (V423 = (V420(V422))), begin (V424 = (V421(V422))), (V423(V424)) end end end end end end end}, fun (V425) -> fun (V426) -> fun (V427) -> fun (V428) -> fun (V429) -> begin (V430 = (V427(V429))), ((V428(V430))(V429)) end end end end end end, fun (V431) -> fun (V432) -> fun (V433) -> begin (V434 = (V432(V433))), (V434(V433)) end end end end}, fun (V435) -> fun (V436) -> V436 end end}, V0))(V409))), {'Idris.Prelude.Types.Right', V437} end), case V438 of {'Idris.Prelude.Types.Left', E2923} -> (fun (V439) -> {'Idris.Prelude.Types.Left', V439} end(E2923)); {'Idris.Prelude.Types.Right', E2924} -> (fun (V440) -> begin (V441 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V440, {'Idris.Core.Env.Nil'}, V3, V409))), case V441 of {'Idris.Prelude.Types.Left', E2925} -> (fun (V442) -> {'Idris.Prelude.Types.Left', V442} end(E2925)); {'Idris.Prelude.Types.Right', E2926} -> (fun (V443) -> begin (V448 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V444) -> fun (V445) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V444, V445)) end end, fun (V446) -> fun (V447) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V446, V447)) end end}, V443, V409))), case V448 of {'Idris.Prelude.Types.Left', E2927} -> (fun (V449) -> {'Idris.Prelude.Types.Left', V449} end(E2927)); {'Idris.Prelude.Types.Right', E2928} -> (fun (V450) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V450))))}, V409)) end(E2928)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2926)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2924)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E2790, E2791, E2792, E2793, E2794} -> (fun (V451, V452, V453, V454, V455) -> fun (V456) -> begin (V485 = begin (V484 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V457) -> fun (V458) -> fun (V459) -> fun (V460) -> fun (V461) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V459, V460, V461)) end end end end end, fun (V462) -> fun (V463) -> fun (V464) -> V463 end end end, fun (V465) -> fun (V466) -> fun (V467) -> fun (V468) -> fun (V469) -> begin (V470 = (V467(V469))), begin (V471 = (V468(V469))), (V470(V471)) end end end end end end end}, fun (V472) -> fun (V473) -> fun (V474) -> fun (V475) -> fun (V476) -> begin (V477 = (V474(V476))), ((V475(V477))(V476)) end end end end end end, fun (V478) -> fun (V479) -> fun (V480) -> begin (V481 = (V479(V480))), (V481(V480)) end end end end}, fun (V482) -> fun (V483) -> V483 end end}, V0))(V456))), {'Idris.Prelude.Types.Right', V484} end), case V485 of {'Idris.Prelude.Types.Left', E2795} -> (fun (V486) -> {'Idris.Prelude.Types.Left', V486} end(E2795)); {'Idris.Prelude.Types.Right', E2796} -> (fun (V487) -> begin (V492 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V488) -> fun (V489) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V488, V489)) end end, fun (V490) -> fun (V491) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V490, V491)) end end}, V452, V456))), case V492 of {'Idris.Prelude.Types.Left', E2797} -> (fun (V493) -> {'Idris.Prelude.Types.Left', V493} end(E2797)); {'Idris.Prelude.Types.Right', E2798} -> (fun (V494) -> begin (V495 = (('un--getNArgs'(V0, V487, V494, V455))(V456))), case V495 of {'Idris.Prelude.Types.Left', E2799} -> (fun (V496) -> {'Idris.Prelude.Types.Left', V496} end(E2799)); {'Idris.Prelude.Types.Right', E2800} -> (fun (V497) -> case V497 of {'Idris.Compiler.CompileExpr.User', E2801, E2802} -> (fun (V498, V499) -> begin (V501 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V500) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V487, V500)) end, V499))(V456))), case V501 of {'Idris.Prelude.Types.Left', E2803} -> (fun (V502) -> {'Idris.Prelude.Types.Left', V502} end(E2803)); {'Idris.Prelude.Types.Right', E2804} -> (fun (V503) -> begin (V505 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V504) -> ('un--nfToCFType'(V0, V451, V2, V504)) end, V503))(V456))), case V505 of {'Idris.Prelude.Types.Left', E2805} -> (fun (V506) -> {'Idris.Prelude.Types.Left', V506} end(E2805)); {'Idris.Prelude.Types.Right', E2806} -> (fun (V507) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V494, V507}} end(E2806)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2804)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2801, E2802)); {'Idris.Compiler.CompileExpr.Struct', E2807, E2808} -> (fun (V508, V509) -> begin (V520 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V510) -> case V510 of {'Idris.Builtin.MkPair', E2809, E2810} -> (fun (V511, V512) -> fun (V513) -> begin (V514 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V487, V512))(V513))), case V514 of {'Idris.Prelude.Types.Left', E2811} -> (fun (V515) -> {'Idris.Prelude.Types.Left', V515} end(E2811)); {'Idris.Prelude.Types.Right', E2812} -> (fun (V516) -> begin (V517 = (('un--nfToCFType'(V0, V451, 0, V516))(V513))), case V517 of {'Idris.Prelude.Types.Left', E2813} -> (fun (V518) -> {'Idris.Prelude.Types.Left', V518} end(E2813)); {'Idris.Prelude.Types.Right', E2814} -> (fun (V519) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V511, V519}} end(E2814)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2812)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2809, E2810)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V509))(V456))), case V520 of {'Idris.Prelude.Types.Left', E2815} -> (fun (V521) -> {'Idris.Prelude.Types.Left', V521} end(E2815)); {'Idris.Prelude.Types.Right', E2816} -> (fun (V522) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V508, V522}} end(E2816)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2807, E2808)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2817} -> (fun (V523) -> begin (V524 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V487, V523))(V456))), case V524 of {'Idris.Prelude.Types.Left', E2818} -> (fun (V525) -> {'Idris.Prelude.Types.Left', V525} end(E2818)); {'Idris.Prelude.Types.Right', E2819} -> (fun (V526) -> begin (V527 = (('un--nfToCFType'(V0, V451, V2, V526))(V456))), case V527 of {'Idris.Prelude.Types.Left', E2820} -> (fun (V528) -> {'Idris.Prelude.Types.Left', V528} end(E2820)); {'Idris.Prelude.Types.Right', E2821} -> (fun (V529) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V529}} end(E2821)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2819)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2817)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2800)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2798)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2796)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2790, E2791, E2792, E2793, E2794)); {'Idris.Core.Value.NType', E2822} -> (fun (V530) -> fun (V531) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2822)); {'Idris.Core.Value.NErased', E2823, E2824} -> (fun (V532, V533) -> fun (V534) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2823, E2824)); _ -> fun (V535) -> begin (V564 = begin (V563 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V536) -> fun (V537) -> fun (V538) -> fun (V539) -> fun (V540) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V538, V539, V540)) end end end end end, fun (V541) -> fun (V542) -> fun (V543) -> V542 end end end, fun (V544) -> fun (V545) -> fun (V546) -> fun (V547) -> fun (V548) -> begin (V549 = (V546(V548))), begin (V550 = (V547(V548))), (V549(V550)) end end end end end end end}, fun (V551) -> fun (V552) -> fun (V553) -> fun (V554) -> fun (V555) -> begin (V556 = (V553(V555))), ((V554(V556))(V555)) end end end end end end, fun (V557) -> fun (V558) -> fun (V559) -> begin (V560 = (V558(V559))), (V560(V559)) end end end end}, fun (V561) -> fun (V562) -> V562 end end}, V0))(V535))), {'Idris.Prelude.Types.Right', V563} end), case V564 of {'Idris.Prelude.Types.Left', E2784} -> (fun (V565) -> {'Idris.Prelude.Types.Left', V565} end(E2784)); {'Idris.Prelude.Types.Right', E2785} -> (fun (V566) -> begin (V567 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V566, {'Idris.Core.Env.Nil'}, V3, V535))), case V567 of {'Idris.Prelude.Types.Left', E2786} -> (fun (V568) -> {'Idris.Prelude.Types.Left', V568} end(E2786)); {'Idris.Prelude.Types.Right', E2787} -> (fun (V569) -> begin (V574 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V570) -> fun (V571) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V570, V571)) end end, fun (V572) -> fun (V573) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V572, V573)) end end}, V569, V535))), case V574 of {'Idris.Prelude.Types.Left', E2788} -> (fun (V575) -> {'Idris.Prelude.Types.Left', V575} end(E2788)); {'Idris.Prelude.Types.Right', E2789} -> (fun (V576) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V576))))}, V535)) end(E2789)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2787)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2785)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end(E2782, E2783)); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E2680, E2681, E2682, E2683} -> (fun (V577, V578, V579, V580) -> case V579 of {'Idris.Core.TT.Pi', E2725, E2726, E2727, E2728} -> (fun (V581, V582, V583, V584) -> fun (V585) -> begin (V614 = begin (V613 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V586) -> fun (V587) -> fun (V588) -> fun (V589) -> fun (V590) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V588, V589, V590)) end end end end end, fun (V591) -> fun (V592) -> fun (V593) -> V592 end end end, fun (V594) -> fun (V595) -> fun (V596) -> fun (V597) -> fun (V598) -> begin (V599 = (V596(V598))), begin (V600 = (V597(V598))), (V599(V600)) end end end end end end end}, fun (V601) -> fun (V602) -> fun (V603) -> fun (V604) -> fun (V605) -> begin (V606 = (V603(V605))), ((V604(V606))(V605)) end end end end end end, fun (V607) -> fun (V608) -> fun (V609) -> begin (V610 = (V608(V609))), (V610(V609)) end end end end}, fun (V611) -> fun (V612) -> V612 end end}, V0))(V585))), {'Idris.Prelude.Types.Right', V613} end), case V614 of {'Idris.Prelude.Types.Left', E2729} -> (fun (V615) -> {'Idris.Prelude.Types.Left', V615} end(E2729)); {'Idris.Prelude.Types.Right', E2730} -> (fun (V616) -> begin (V617 = (('un--nfToCFType'(V0, V577, 1, V584))(V585))), case V617 of {'Idris.Prelude.Types.Left', E2731} -> (fun (V618) -> {'Idris.Prelude.Types.Left', V618} end(E2731)); {'Idris.Prelude.Types.Right', E2732} -> (fun (V619) -> begin (V620 = (((V580(V616))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V577, 1}))))(V585))), case V620 of {'Idris.Prelude.Types.Left', E2733} -> (fun (V621) -> {'Idris.Prelude.Types.Left', V621} end(E2733)); {'Idris.Prelude.Types.Right', E2734} -> (fun (V622) -> begin (V623 = (('un--nfToCFType'(V0, V577, 1, V622))(V585))), case V623 of {'Idris.Prelude.Types.Left', E2735} -> (fun (V624) -> {'Idris.Prelude.Types.Left', V624} end(E2735)); {'Idris.Prelude.Types.Right', E2736} -> (fun (V625) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V619, V625}} end(E2736)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2734)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2732)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2730)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2725, E2726, E2727, E2728)); _ -> case V3 of {'Idris.Core.Value.NTCon', E2690, E2691, E2692, E2693, E2694} -> (fun (V626, V627, V628, V629, V630) -> fun (V631) -> begin (V660 = begin (V659 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V632) -> fun (V633) -> fun (V634) -> fun (V635) -> fun (V636) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V634, V635, V636)) end end end end end, fun (V637) -> fun (V638) -> fun (V639) -> V638 end end end, fun (V640) -> fun (V641) -> fun (V642) -> fun (V643) -> fun (V644) -> begin (V645 = (V642(V644))), begin (V646 = (V643(V644))), (V645(V646)) end end end end end end end}, fun (V647) -> fun (V648) -> fun (V649) -> fun (V650) -> fun (V651) -> begin (V652 = (V649(V651))), ((V650(V652))(V651)) end end end end end end, fun (V653) -> fun (V654) -> fun (V655) -> begin (V656 = (V654(V655))), (V656(V655)) end end end end}, fun (V657) -> fun (V658) -> V658 end end}, V0))(V631))), {'Idris.Prelude.Types.Right', V659} end), case V660 of {'Idris.Prelude.Types.Left', E2695} -> (fun (V661) -> {'Idris.Prelude.Types.Left', V661} end(E2695)); {'Idris.Prelude.Types.Right', E2696} -> (fun (V662) -> begin (V667 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V663) -> fun (V664) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V663, V664)) end end, fun (V665) -> fun (V666) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V665, V666)) end end}, V627, V631))), case V667 of {'Idris.Prelude.Types.Left', E2697} -> (fun (V668) -> {'Idris.Prelude.Types.Left', V668} end(E2697)); {'Idris.Prelude.Types.Right', E2698} -> (fun (V669) -> begin (V670 = (('un--getNArgs'(V0, V662, V669, V630))(V631))), case V670 of {'Idris.Prelude.Types.Left', E2699} -> (fun (V671) -> {'Idris.Prelude.Types.Left', V671} end(E2699)); {'Idris.Prelude.Types.Right', E2700} -> (fun (V672) -> case V672 of {'Idris.Compiler.CompileExpr.User', E2701, E2702} -> (fun (V673, V674) -> begin (V676 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V675) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V662, V675)) end, V674))(V631))), case V676 of {'Idris.Prelude.Types.Left', E2703} -> (fun (V677) -> {'Idris.Prelude.Types.Left', V677} end(E2703)); {'Idris.Prelude.Types.Right', E2704} -> (fun (V678) -> begin (V680 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V679) -> ('un--nfToCFType'(V0, V626, V2, V679)) end, V678))(V631))), case V680 of {'Idris.Prelude.Types.Left', E2705} -> (fun (V681) -> {'Idris.Prelude.Types.Left', V681} end(E2705)); {'Idris.Prelude.Types.Right', E2706} -> (fun (V682) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V669, V682}} end(E2706)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2704)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2701, E2702)); {'Idris.Compiler.CompileExpr.Struct', E2707, E2708} -> (fun (V683, V684) -> begin (V695 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V685) -> case V685 of {'Idris.Builtin.MkPair', E2709, E2710} -> (fun (V686, V687) -> fun (V688) -> begin (V689 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V662, V687))(V688))), case V689 of {'Idris.Prelude.Types.Left', E2711} -> (fun (V690) -> {'Idris.Prelude.Types.Left', V690} end(E2711)); {'Idris.Prelude.Types.Right', E2712} -> (fun (V691) -> begin (V692 = (('un--nfToCFType'(V0, V626, 0, V691))(V688))), case V692 of {'Idris.Prelude.Types.Left', E2713} -> (fun (V693) -> {'Idris.Prelude.Types.Left', V693} end(E2713)); {'Idris.Prelude.Types.Right', E2714} -> (fun (V694) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V686, V694}} end(E2714)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2712)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2709, E2710)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V684))(V631))), case V695 of {'Idris.Prelude.Types.Left', E2715} -> (fun (V696) -> {'Idris.Prelude.Types.Left', V696} end(E2715)); {'Idris.Prelude.Types.Right', E2716} -> (fun (V697) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V683, V697}} end(E2716)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2707, E2708)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2717} -> (fun (V698) -> begin (V699 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V662, V698))(V631))), case V699 of {'Idris.Prelude.Types.Left', E2718} -> (fun (V700) -> {'Idris.Prelude.Types.Left', V700} end(E2718)); {'Idris.Prelude.Types.Right', E2719} -> (fun (V701) -> begin (V702 = (('un--nfToCFType'(V0, V626, V2, V701))(V631))), case V702 of {'Idris.Prelude.Types.Left', E2720} -> (fun (V703) -> {'Idris.Prelude.Types.Left', V703} end(E2720)); {'Idris.Prelude.Types.Right', E2721} -> (fun (V704) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V704}} end(E2721)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2719)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2717)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2700)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2698)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2696)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2690, E2691, E2692, E2693, E2694)); {'Idris.Core.Value.NType', E2722} -> (fun (V705) -> fun (V706) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2722)); {'Idris.Core.Value.NErased', E2723, E2724} -> (fun (V707, V708) -> fun (V709) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2723, E2724)); _ -> fun (V710) -> begin (V739 = begin (V738 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V711) -> fun (V712) -> fun (V713) -> fun (V714) -> fun (V715) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V713, V714, V715)) end end end end end, fun (V716) -> fun (V717) -> fun (V718) -> V717 end end end, fun (V719) -> fun (V720) -> fun (V721) -> fun (V722) -> fun (V723) -> begin (V724 = (V721(V723))), begin (V725 = (V722(V723))), (V724(V725)) end end end end end end end}, fun (V726) -> fun (V727) -> fun (V728) -> fun (V729) -> fun (V730) -> begin (V731 = (V728(V730))), ((V729(V731))(V730)) end end end end end end, fun (V732) -> fun (V733) -> fun (V734) -> begin (V735 = (V733(V734))), (V735(V734)) end end end end}, fun (V736) -> fun (V737) -> V737 end end}, V0))(V710))), {'Idris.Prelude.Types.Right', V738} end), case V739 of {'Idris.Prelude.Types.Left', E2684} -> (fun (V740) -> {'Idris.Prelude.Types.Left', V740} end(E2684)); {'Idris.Prelude.Types.Right', E2685} -> (fun (V741) -> begin (V742 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V741, {'Idris.Core.Env.Nil'}, V3, V710))), case V742 of {'Idris.Prelude.Types.Left', E2686} -> (fun (V743) -> {'Idris.Prelude.Types.Left', V743} end(E2686)); {'Idris.Prelude.Types.Right', E2687} -> (fun (V744) -> begin (V749 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V745) -> fun (V746) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V745, V746)) end end, fun (V747) -> fun (V748) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V747, V748)) end end}, V744, V710))), case V749 of {'Idris.Prelude.Types.Left', E2688} -> (fun (V750) -> {'Idris.Prelude.Types.Left', V750} end(E2688)); {'Idris.Prelude.Types.Right', E2689} -> (fun (V751) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V751))))}, V710)) end(E2689)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2687)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2685)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E2680, E2681, E2682, E2683)); _ -> case V3 of {'Idris.Core.Value.NTCon', E2645, E2646, E2647, E2648, E2649} -> (fun (V752, V753, V754, V755, V756) -> fun (V757) -> begin (V786 = begin (V785 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V758) -> fun (V759) -> fun (V760) -> fun (V761) -> fun (V762) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V760, V761, V762)) end end end end end, fun (V763) -> fun (V764) -> fun (V765) -> V764 end end end, fun (V766) -> fun (V767) -> fun (V768) -> fun (V769) -> fun (V770) -> begin (V771 = (V768(V770))), begin (V772 = (V769(V770))), (V771(V772)) end end end end end end end}, fun (V773) -> fun (V774) -> fun (V775) -> fun (V776) -> fun (V777) -> begin (V778 = (V775(V777))), ((V776(V778))(V777)) end end end end end end, fun (V779) -> fun (V780) -> fun (V781) -> begin (V782 = (V780(V781))), (V782(V781)) end end end end}, fun (V783) -> fun (V784) -> V784 end end}, V0))(V757))), {'Idris.Prelude.Types.Right', V785} end), case V786 of {'Idris.Prelude.Types.Left', E2650} -> (fun (V787) -> {'Idris.Prelude.Types.Left', V787} end(E2650)); {'Idris.Prelude.Types.Right', E2651} -> (fun (V788) -> begin (V793 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V789) -> fun (V790) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V789, V790)) end end, fun (V791) -> fun (V792) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V791, V792)) end end}, V753, V757))), case V793 of {'Idris.Prelude.Types.Left', E2652} -> (fun (V794) -> {'Idris.Prelude.Types.Left', V794} end(E2652)); {'Idris.Prelude.Types.Right', E2653} -> (fun (V795) -> begin (V796 = (('un--getNArgs'(V0, V788, V795, V756))(V757))), case V796 of {'Idris.Prelude.Types.Left', E2654} -> (fun (V797) -> {'Idris.Prelude.Types.Left', V797} end(E2654)); {'Idris.Prelude.Types.Right', E2655} -> (fun (V798) -> case V798 of {'Idris.Compiler.CompileExpr.User', E2656, E2657} -> (fun (V799, V800) -> begin (V802 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V801) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V788, V801)) end, V800))(V757))), case V802 of {'Idris.Prelude.Types.Left', E2658} -> (fun (V803) -> {'Idris.Prelude.Types.Left', V803} end(E2658)); {'Idris.Prelude.Types.Right', E2659} -> (fun (V804) -> begin (V806 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V805) -> ('un--nfToCFType'(V0, V752, V2, V805)) end, V804))(V757))), case V806 of {'Idris.Prelude.Types.Left', E2660} -> (fun (V807) -> {'Idris.Prelude.Types.Left', V807} end(E2660)); {'Idris.Prelude.Types.Right', E2661} -> (fun (V808) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V795, V808}} end(E2661)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2659)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2656, E2657)); {'Idris.Compiler.CompileExpr.Struct', E2662, E2663} -> (fun (V809, V810) -> begin (V821 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V811) -> case V811 of {'Idris.Builtin.MkPair', E2664, E2665} -> (fun (V812, V813) -> fun (V814) -> begin (V815 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V788, V813))(V814))), case V815 of {'Idris.Prelude.Types.Left', E2666} -> (fun (V816) -> {'Idris.Prelude.Types.Left', V816} end(E2666)); {'Idris.Prelude.Types.Right', E2667} -> (fun (V817) -> begin (V818 = (('un--nfToCFType'(V0, V752, 0, V817))(V814))), case V818 of {'Idris.Prelude.Types.Left', E2668} -> (fun (V819) -> {'Idris.Prelude.Types.Left', V819} end(E2668)); {'Idris.Prelude.Types.Right', E2669} -> (fun (V820) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V812, V820}} end(E2669)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2667)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2664, E2665)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V810))(V757))), case V821 of {'Idris.Prelude.Types.Left', E2670} -> (fun (V822) -> {'Idris.Prelude.Types.Left', V822} end(E2670)); {'Idris.Prelude.Types.Right', E2671} -> (fun (V823) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V809, V823}} end(E2671)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2662, E2663)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2672} -> (fun (V824) -> begin (V825 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V788, V824))(V757))), case V825 of {'Idris.Prelude.Types.Left', E2673} -> (fun (V826) -> {'Idris.Prelude.Types.Left', V826} end(E2673)); {'Idris.Prelude.Types.Right', E2674} -> (fun (V827) -> begin (V828 = (('un--nfToCFType'(V0, V752, V2, V827))(V757))), case V828 of {'Idris.Prelude.Types.Left', E2675} -> (fun (V829) -> {'Idris.Prelude.Types.Left', V829} end(E2675)); {'Idris.Prelude.Types.Right', E2676} -> (fun (V830) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V830}} end(E2676)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2674)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2672)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2655)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2653)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2651)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2645, E2646, E2647, E2648, E2649)); {'Idris.Core.Value.NType', E2677} -> (fun (V831) -> fun (V832) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2677)); {'Idris.Core.Value.NErased', E2678, E2679} -> (fun (V833, V834) -> fun (V835) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2678, E2679)); _ -> fun (V836) -> begin (V865 = begin (V864 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V837) -> fun (V838) -> fun (V839) -> fun (V840) -> fun (V841) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V839, V840, V841)) end end end end end, fun (V842) -> fun (V843) -> fun (V844) -> V843 end end end, fun (V845) -> fun (V846) -> fun (V847) -> fun (V848) -> fun (V849) -> begin (V850 = (V847(V849))), begin (V851 = (V848(V849))), (V850(V851)) end end end end end end end}, fun (V852) -> fun (V853) -> fun (V854) -> fun (V855) -> fun (V856) -> begin (V857 = (V854(V856))), ((V855(V857))(V856)) end end end end end end, fun (V858) -> fun (V859) -> fun (V860) -> begin (V861 = (V859(V860))), (V861(V860)) end end end end}, fun (V862) -> fun (V863) -> V863 end end}, V0))(V836))), {'Idris.Prelude.Types.Right', V864} end), case V865 of {'Idris.Prelude.Types.Left', E2639} -> (fun (V866) -> {'Idris.Prelude.Types.Left', V866} end(E2639)); {'Idris.Prelude.Types.Right', E2640} -> (fun (V867) -> begin (V868 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V867, {'Idris.Core.Env.Nil'}, V3, V836))), case V868 of {'Idris.Prelude.Types.Left', E2641} -> (fun (V869) -> {'Idris.Prelude.Types.Left', V869} end(E2641)); {'Idris.Prelude.Types.Right', E2642} -> (fun (V870) -> begin (V875 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V871) -> fun (V872) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V871, V872)) end end, fun (V873) -> fun (V874) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V873, V874)) end end}, V870, V836))), case V875 of {'Idris.Prelude.Types.Left', E2643} -> (fun (V876) -> {'Idris.Prelude.Types.Left', V876} end(E2643)); {'Idris.Prelude.Types.Right', E2644} -> (fun (V877) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V877))))}, V836)) end(E2644)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2642)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2640)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E2778, E2779, E2780, E2781} -> (fun (V878, V879, V880, V881) -> fun (V882) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V878, <<"Function types not allowed in a foreign struct"/utf8>>}, V882)) end end(E2778, E2779, E2780, E2781)); _ -> case V3 of {'Idris.Core.Value.NTCon', E2743, E2744, E2745, E2746, E2747} -> (fun (V883, V884, V885, V886, V887) -> fun (V888) -> begin (V917 = begin (V916 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V889) -> fun (V890) -> fun (V891) -> fun (V892) -> fun (V893) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V891, V892, V893)) end end end end end, fun (V894) -> fun (V895) -> fun (V896) -> V895 end end end, fun (V897) -> fun (V898) -> fun (V899) -> fun (V900) -> fun (V901) -> begin (V902 = (V899(V901))), begin (V903 = (V900(V901))), (V902(V903)) end end end end end end end}, fun (V904) -> fun (V905) -> fun (V906) -> fun (V907) -> fun (V908) -> begin (V909 = (V906(V908))), ((V907(V909))(V908)) end end end end end end, fun (V910) -> fun (V911) -> fun (V912) -> begin (V913 = (V911(V912))), (V913(V912)) end end end end}, fun (V914) -> fun (V915) -> V915 end end}, V0))(V888))), {'Idris.Prelude.Types.Right', V916} end), case V917 of {'Idris.Prelude.Types.Left', E2748} -> (fun (V918) -> {'Idris.Prelude.Types.Left', V918} end(E2748)); {'Idris.Prelude.Types.Right', E2749} -> (fun (V919) -> begin (V924 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V920) -> fun (V921) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V920, V921)) end end, fun (V922) -> fun (V923) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V922, V923)) end end}, V884, V888))), case V924 of {'Idris.Prelude.Types.Left', E2750} -> (fun (V925) -> {'Idris.Prelude.Types.Left', V925} end(E2750)); {'Idris.Prelude.Types.Right', E2751} -> (fun (V926) -> begin (V927 = (('un--getNArgs'(V0, V919, V926, V887))(V888))), case V927 of {'Idris.Prelude.Types.Left', E2752} -> (fun (V928) -> {'Idris.Prelude.Types.Left', V928} end(E2752)); {'Idris.Prelude.Types.Right', E2753} -> (fun (V929) -> case V929 of {'Idris.Compiler.CompileExpr.User', E2754, E2755} -> (fun (V930, V931) -> begin (V933 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V932) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V919, V932)) end, V931))(V888))), case V933 of {'Idris.Prelude.Types.Left', E2756} -> (fun (V934) -> {'Idris.Prelude.Types.Left', V934} end(E2756)); {'Idris.Prelude.Types.Right', E2757} -> (fun (V935) -> begin (V937 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V936) -> ('un--nfToCFType'(V0, V883, V2, V936)) end, V935))(V888))), case V937 of {'Idris.Prelude.Types.Left', E2758} -> (fun (V938) -> {'Idris.Prelude.Types.Left', V938} end(E2758)); {'Idris.Prelude.Types.Right', E2759} -> (fun (V939) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V926, V939}} end(E2759)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2757)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2754, E2755)); {'Idris.Compiler.CompileExpr.Struct', E2760, E2761} -> (fun (V940, V941) -> begin (V952 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V942) -> case V942 of {'Idris.Builtin.MkPair', E2762, E2763} -> (fun (V943, V944) -> fun (V945) -> begin (V946 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V919, V944))(V945))), case V946 of {'Idris.Prelude.Types.Left', E2764} -> (fun (V947) -> {'Idris.Prelude.Types.Left', V947} end(E2764)); {'Idris.Prelude.Types.Right', E2765} -> (fun (V948) -> begin (V949 = (('un--nfToCFType'(V0, V883, 0, V948))(V945))), case V949 of {'Idris.Prelude.Types.Left', E2766} -> (fun (V950) -> {'Idris.Prelude.Types.Left', V950} end(E2766)); {'Idris.Prelude.Types.Right', E2767} -> (fun (V951) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V943, V951}} end(E2767)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2765)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2762, E2763)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V941))(V888))), case V952 of {'Idris.Prelude.Types.Left', E2768} -> (fun (V953) -> {'Idris.Prelude.Types.Left', V953} end(E2768)); {'Idris.Prelude.Types.Right', E2769} -> (fun (V954) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V940, V954}} end(E2769)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2760, E2761)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2770} -> (fun (V955) -> begin (V956 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V919, V955))(V888))), case V956 of {'Idris.Prelude.Types.Left', E2771} -> (fun (V957) -> {'Idris.Prelude.Types.Left', V957} end(E2771)); {'Idris.Prelude.Types.Right', E2772} -> (fun (V958) -> begin (V959 = (('un--nfToCFType'(V0, V883, V2, V958))(V888))), case V959 of {'Idris.Prelude.Types.Left', E2773} -> (fun (V960) -> {'Idris.Prelude.Types.Left', V960} end(E2773)); {'Idris.Prelude.Types.Right', E2774} -> (fun (V961) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V961}} end(E2774)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2772)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2770)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2753)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2751)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2749)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2743, E2744, E2745, E2746, E2747)); {'Idris.Core.Value.NType', E2775} -> (fun (V962) -> fun (V963) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2775)); {'Idris.Core.Value.NErased', E2776, E2777} -> (fun (V964, V965) -> fun (V966) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2776, E2777)); _ -> fun (V967) -> begin (V996 = begin (V995 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V968) -> fun (V969) -> fun (V970) -> fun (V971) -> fun (V972) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V970, V971, V972)) end end end end end, fun (V973) -> fun (V974) -> fun (V975) -> V974 end end end, fun (V976) -> fun (V977) -> fun (V978) -> fun (V979) -> fun (V980) -> begin (V981 = (V978(V980))), begin (V982 = (V979(V980))), (V981(V982)) end end end end end end end}, fun (V983) -> fun (V984) -> fun (V985) -> fun (V986) -> fun (V987) -> begin (V988 = (V985(V987))), ((V986(V988))(V987)) end end end end end end, fun (V989) -> fun (V990) -> fun (V991) -> begin (V992 = (V990(V991))), (V992(V991)) end end end end}, fun (V993) -> fun (V994) -> V994 end end}, V0))(V967))), {'Idris.Prelude.Types.Right', V995} end), case V996 of {'Idris.Prelude.Types.Left', E2737} -> (fun (V997) -> {'Idris.Prelude.Types.Left', V997} end(E2737)); {'Idris.Prelude.Types.Right', E2738} -> (fun (V998) -> begin (V999 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V998, {'Idris.Core.Env.Nil'}, V3, V967))), case V999 of {'Idris.Prelude.Types.Left', E2739} -> (fun (V1000) -> {'Idris.Prelude.Types.Left', V1000} end(E2739)); {'Idris.Prelude.Types.Right', E2740} -> (fun (V1001) -> begin (V1006 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V1002) -> fun (V1003) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V1002, V1003)) end end, fun (V1004) -> fun (V1005) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V1004, V1005)) end end}, V1001, V967))), case V1006 of {'Idris.Prelude.Types.Left', E2741} -> (fun (V1007) -> {'Idris.Prelude.Types.Left', V1007} end(E2741)); {'Idris.Prelude.Types.Right', E2742} -> (fun (V1008) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V1008))))}, V967)) end(E2742)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2740)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2738)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E2604, E2605, E2606, E2607, E2608} -> (fun (V1009, V1010, V1011, V1012, V1013) -> fun (V1014) -> begin (V1043 = begin (V1042 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V1015) -> fun (V1016) -> fun (V1017) -> fun (V1018) -> fun (V1019) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V1017, V1018, V1019)) end end end end end, fun (V1020) -> fun (V1021) -> fun (V1022) -> V1021 end end end, fun (V1023) -> fun (V1024) -> fun (V1025) -> fun (V1026) -> fun (V1027) -> begin (V1028 = (V1025(V1027))), begin (V1029 = (V1026(V1027))), (V1028(V1029)) end end end end end end end}, fun (V1030) -> fun (V1031) -> fun (V1032) -> fun (V1033) -> fun (V1034) -> begin (V1035 = (V1032(V1034))), ((V1033(V1035))(V1034)) end end end end end end, fun (V1036) -> fun (V1037) -> fun (V1038) -> begin (V1039 = (V1037(V1038))), (V1039(V1038)) end end end end}, fun (V1040) -> fun (V1041) -> V1041 end end}, V0))(V1014))), {'Idris.Prelude.Types.Right', V1042} end), case V1043 of {'Idris.Prelude.Types.Left', E2609} -> (fun (V1044) -> {'Idris.Prelude.Types.Left', V1044} end(E2609)); {'Idris.Prelude.Types.Right', E2610} -> (fun (V1045) -> begin (V1050 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V1046) -> fun (V1047) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V1046, V1047)) end end, fun (V1048) -> fun (V1049) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V1048, V1049)) end end}, V1010, V1014))), case V1050 of {'Idris.Prelude.Types.Left', E2611} -> (fun (V1051) -> {'Idris.Prelude.Types.Left', V1051} end(E2611)); {'Idris.Prelude.Types.Right', E2612} -> (fun (V1052) -> begin (V1053 = (('un--getNArgs'(V0, V1045, V1052, V1013))(V1014))), case V1053 of {'Idris.Prelude.Types.Left', E2613} -> (fun (V1054) -> {'Idris.Prelude.Types.Left', V1054} end(E2613)); {'Idris.Prelude.Types.Right', E2614} -> (fun (V1055) -> case V1055 of {'Idris.Compiler.CompileExpr.User', E2615, E2616} -> (fun (V1056, V1057) -> begin (V1059 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1058) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1045, V1058)) end, V1057))(V1014))), case V1059 of {'Idris.Prelude.Types.Left', E2617} -> (fun (V1060) -> {'Idris.Prelude.Types.Left', V1060} end(E2617)); {'Idris.Prelude.Types.Right', E2618} -> (fun (V1061) -> begin (V1063 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1062) -> ('un--nfToCFType'(V0, V1009, V2, V1062)) end, V1061))(V1014))), case V1063 of {'Idris.Prelude.Types.Left', E2619} -> (fun (V1064) -> {'Idris.Prelude.Types.Left', V1064} end(E2619)); {'Idris.Prelude.Types.Right', E2620} -> (fun (V1065) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V1052, V1065}} end(E2620)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2618)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2615, E2616)); {'Idris.Compiler.CompileExpr.Struct', E2621, E2622} -> (fun (V1066, V1067) -> begin (V1078 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1068) -> case V1068 of {'Idris.Builtin.MkPair', E2623, E2624} -> (fun (V1069, V1070) -> fun (V1071) -> begin (V1072 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1045, V1070))(V1071))), case V1072 of {'Idris.Prelude.Types.Left', E2625} -> (fun (V1073) -> {'Idris.Prelude.Types.Left', V1073} end(E2625)); {'Idris.Prelude.Types.Right', E2626} -> (fun (V1074) -> begin (V1075 = (('un--nfToCFType'(V0, V1009, 0, V1074))(V1071))), case V1075 of {'Idris.Prelude.Types.Left', E2627} -> (fun (V1076) -> {'Idris.Prelude.Types.Left', V1076} end(E2627)); {'Idris.Prelude.Types.Right', E2628} -> (fun (V1077) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V1069, V1077}} end(E2628)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2626)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2623, E2624)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V1067))(V1014))), case V1078 of {'Idris.Prelude.Types.Left', E2629} -> (fun (V1079) -> {'Idris.Prelude.Types.Left', V1079} end(E2629)); {'Idris.Prelude.Types.Right', E2630} -> (fun (V1080) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V1066, V1080}} end(E2630)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2621, E2622)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2631} -> (fun (V1081) -> begin (V1082 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1045, V1081))(V1014))), case V1082 of {'Idris.Prelude.Types.Left', E2632} -> (fun (V1083) -> {'Idris.Prelude.Types.Left', V1083} end(E2632)); {'Idris.Prelude.Types.Right', E2633} -> (fun (V1084) -> begin (V1085 = (('un--nfToCFType'(V0, V1009, V2, V1084))(V1014))), case V1085 of {'Idris.Prelude.Types.Left', E2634} -> (fun (V1086) -> {'Idris.Prelude.Types.Left', V1086} end(E2634)); {'Idris.Prelude.Types.Right', E2635} -> (fun (V1087) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V1087}} end(E2635)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2633)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2631)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2614)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2612)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2610)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2604, E2605, E2606, E2607, E2608)); {'Idris.Core.Value.NType', E2636} -> (fun (V1088) -> fun (V1089) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2636)); {'Idris.Core.Value.NErased', E2637, E2638} -> (fun (V1090, V1091) -> fun (V1092) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2637, E2638)); _ -> fun (V1093) -> begin (V1122 = begin (V1121 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V1094) -> fun (V1095) -> fun (V1096) -> fun (V1097) -> fun (V1098) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V1096, V1097, V1098)) end end end end end, fun (V1099) -> fun (V1100) -> fun (V1101) -> V1100 end end end, fun (V1102) -> fun (V1103) -> fun (V1104) -> fun (V1105) -> fun (V1106) -> begin (V1107 = (V1104(V1106))), begin (V1108 = (V1105(V1106))), (V1107(V1108)) end end end end end end end}, fun (V1109) -> fun (V1110) -> fun (V1111) -> fun (V1112) -> fun (V1113) -> begin (V1114 = (V1111(V1113))), ((V1112(V1114))(V1113)) end end end end end end, fun (V1115) -> fun (V1116) -> fun (V1117) -> begin (V1118 = (V1116(V1117))), (V1118(V1117)) end end end end}, fun (V1119) -> fun (V1120) -> V1120 end end}, V0))(V1093))), {'Idris.Prelude.Types.Right', V1121} end), case V1122 of {'Idris.Prelude.Types.Left', E2598} -> (fun (V1123) -> {'Idris.Prelude.Types.Left', V1123} end(E2598)); {'Idris.Prelude.Types.Right', E2599} -> (fun (V1124) -> begin (V1125 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V1124, {'Idris.Core.Env.Nil'}, V3, V1093))), case V1125 of {'Idris.Prelude.Types.Left', E2600} -> (fun (V1126) -> {'Idris.Prelude.Types.Left', V1126} end(E2600)); {'Idris.Prelude.Types.Right', E2601} -> (fun (V1127) -> begin (V1132 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V1128) -> fun (V1129) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V1128, V1129)) end end, fun (V1130) -> fun (V1131) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V1130, V1131)) end end}, V1127, V1093))), case V1132 of {'Idris.Prelude.Types.Left', E2602} -> (fun (V1133) -> {'Idris.Prelude.Types.Left', V1133} end(E2602)); {'Idris.Prelude.Types.Right', E2603} -> (fun (V1134) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V1134))))}, V1093)) end(E2603)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2601)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2599)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end end(E2596, E2597)); _ -> case V3 of {'Idris.Core.Value.NPrimVal', E2410, E2411} -> (fun (V1135, V1136) -> case V1136 of {'Idris.Core.TT.DoubleType'} -> (fun () -> fun (V1137) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFDouble'}} end end()); {'Idris.Core.TT.CharType'} -> (fun () -> fun (V1138) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFChar'}} end end()); {'Idris.Core.TT.WorldType'} -> (fun () -> fun (V1139) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFWorld'}} end end()); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E2494, E2495, E2496, E2497} -> (fun (V1140, V1141, V1142, V1143) -> case V1142 of {'Idris.Core.TT.Pi', E2539, E2540, E2541, E2542} -> (fun (V1144, V1145, V1146, V1147) -> fun (V1148) -> begin (V1177 = begin (V1176 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V1149) -> fun (V1150) -> fun (V1151) -> fun (V1152) -> fun (V1153) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V1151, V1152, V1153)) end end end end end, fun (V1154) -> fun (V1155) -> fun (V1156) -> V1155 end end end, fun (V1157) -> fun (V1158) -> fun (V1159) -> fun (V1160) -> fun (V1161) -> begin (V1162 = (V1159(V1161))), begin (V1163 = (V1160(V1161))), (V1162(V1163)) end end end end end end end}, fun (V1164) -> fun (V1165) -> fun (V1166) -> fun (V1167) -> fun (V1168) -> begin (V1169 = (V1166(V1168))), ((V1167(V1169))(V1168)) end end end end end end, fun (V1170) -> fun (V1171) -> fun (V1172) -> begin (V1173 = (V1171(V1172))), (V1173(V1172)) end end end end}, fun (V1174) -> fun (V1175) -> V1175 end end}, V0))(V1148))), {'Idris.Prelude.Types.Right', V1176} end), case V1177 of {'Idris.Prelude.Types.Left', E2543} -> (fun (V1178) -> {'Idris.Prelude.Types.Left', V1178} end(E2543)); {'Idris.Prelude.Types.Right', E2544} -> (fun (V1179) -> begin (V1180 = (('un--nfToCFType'(V0, V1140, 1, V1147))(V1148))), case V1180 of {'Idris.Prelude.Types.Left', E2545} -> (fun (V1181) -> {'Idris.Prelude.Types.Left', V1181} end(E2545)); {'Idris.Prelude.Types.Right', E2546} -> (fun (V1182) -> begin (V1183 = (((V1143(V1179))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V1140, 1}))))(V1148))), case V1183 of {'Idris.Prelude.Types.Left', E2547} -> (fun (V1184) -> {'Idris.Prelude.Types.Left', V1184} end(E2547)); {'Idris.Prelude.Types.Right', E2548} -> (fun (V1185) -> begin (V1186 = (('un--nfToCFType'(V0, V1140, 1, V1185))(V1148))), case V1186 of {'Idris.Prelude.Types.Left', E2549} -> (fun (V1187) -> {'Idris.Prelude.Types.Left', V1187} end(E2549)); {'Idris.Prelude.Types.Right', E2550} -> (fun (V1188) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V1182, V1188}} end(E2550)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2548)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2546)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2544)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2539, E2540, E2541, E2542)); _ -> case V3 of {'Idris.Core.Value.NTCon', E2504, E2505, E2506, E2507, E2508} -> (fun (V1189, V1190, V1191, V1192, V1193) -> fun (V1194) -> begin (V1223 = begin (V1222 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V1195) -> fun (V1196) -> fun (V1197) -> fun (V1198) -> fun (V1199) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V1197, V1198, V1199)) end end end end end, fun (V1200) -> fun (V1201) -> fun (V1202) -> V1201 end end end, fun (V1203) -> fun (V1204) -> fun (V1205) -> fun (V1206) -> fun (V1207) -> begin (V1208 = (V1205(V1207))), begin (V1209 = (V1206(V1207))), (V1208(V1209)) end end end end end end end}, fun (V1210) -> fun (V1211) -> fun (V1212) -> fun (V1213) -> fun (V1214) -> begin (V1215 = (V1212(V1214))), ((V1213(V1215))(V1214)) end end end end end end, fun (V1216) -> fun (V1217) -> fun (V1218) -> begin (V1219 = (V1217(V1218))), (V1219(V1218)) end end end end}, fun (V1220) -> fun (V1221) -> V1221 end end}, V0))(V1194))), {'Idris.Prelude.Types.Right', V1222} end), case V1223 of {'Idris.Prelude.Types.Left', E2509} -> (fun (V1224) -> {'Idris.Prelude.Types.Left', V1224} end(E2509)); {'Idris.Prelude.Types.Right', E2510} -> (fun (V1225) -> begin (V1230 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V1226) -> fun (V1227) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V1226, V1227)) end end, fun (V1228) -> fun (V1229) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V1228, V1229)) end end}, V1190, V1194))), case V1230 of {'Idris.Prelude.Types.Left', E2511} -> (fun (V1231) -> {'Idris.Prelude.Types.Left', V1231} end(E2511)); {'Idris.Prelude.Types.Right', E2512} -> (fun (V1232) -> begin (V1233 = (('un--getNArgs'(V0, V1225, V1232, V1193))(V1194))), case V1233 of {'Idris.Prelude.Types.Left', E2513} -> (fun (V1234) -> {'Idris.Prelude.Types.Left', V1234} end(E2513)); {'Idris.Prelude.Types.Right', E2514} -> (fun (V1235) -> case V1235 of {'Idris.Compiler.CompileExpr.User', E2515, E2516} -> (fun (V1236, V1237) -> begin (V1239 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1238) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1225, V1238)) end, V1237))(V1194))), case V1239 of {'Idris.Prelude.Types.Left', E2517} -> (fun (V1240) -> {'Idris.Prelude.Types.Left', V1240} end(E2517)); {'Idris.Prelude.Types.Right', E2518} -> (fun (V1241) -> begin (V1243 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1242) -> ('un--nfToCFType'(V0, V1189, V2, V1242)) end, V1241))(V1194))), case V1243 of {'Idris.Prelude.Types.Left', E2519} -> (fun (V1244) -> {'Idris.Prelude.Types.Left', V1244} end(E2519)); {'Idris.Prelude.Types.Right', E2520} -> (fun (V1245) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V1232, V1245}} end(E2520)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2518)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2515, E2516)); {'Idris.Compiler.CompileExpr.Struct', E2521, E2522} -> (fun (V1246, V1247) -> begin (V1258 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1248) -> case V1248 of {'Idris.Builtin.MkPair', E2523, E2524} -> (fun (V1249, V1250) -> fun (V1251) -> begin (V1252 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1225, V1250))(V1251))), case V1252 of {'Idris.Prelude.Types.Left', E2525} -> (fun (V1253) -> {'Idris.Prelude.Types.Left', V1253} end(E2525)); {'Idris.Prelude.Types.Right', E2526} -> (fun (V1254) -> begin (V1255 = (('un--nfToCFType'(V0, V1189, 0, V1254))(V1251))), case V1255 of {'Idris.Prelude.Types.Left', E2527} -> (fun (V1256) -> {'Idris.Prelude.Types.Left', V1256} end(E2527)); {'Idris.Prelude.Types.Right', E2528} -> (fun (V1257) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V1249, V1257}} end(E2528)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2526)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2523, E2524)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V1247))(V1194))), case V1258 of {'Idris.Prelude.Types.Left', E2529} -> (fun (V1259) -> {'Idris.Prelude.Types.Left', V1259} end(E2529)); {'Idris.Prelude.Types.Right', E2530} -> (fun (V1260) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V1246, V1260}} end(E2530)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2521, E2522)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2531} -> (fun (V1261) -> begin (V1262 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1225, V1261))(V1194))), case V1262 of {'Idris.Prelude.Types.Left', E2532} -> (fun (V1263) -> {'Idris.Prelude.Types.Left', V1263} end(E2532)); {'Idris.Prelude.Types.Right', E2533} -> (fun (V1264) -> begin (V1265 = (('un--nfToCFType'(V0, V1189, V2, V1264))(V1194))), case V1265 of {'Idris.Prelude.Types.Left', E2534} -> (fun (V1266) -> {'Idris.Prelude.Types.Left', V1266} end(E2534)); {'Idris.Prelude.Types.Right', E2535} -> (fun (V1267) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V1267}} end(E2535)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2533)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2531)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2514)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2512)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2510)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2504, E2505, E2506, E2507, E2508)); {'Idris.Core.Value.NType', E2536} -> (fun (V1268) -> fun (V1269) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2536)); {'Idris.Core.Value.NErased', E2537, E2538} -> (fun (V1270, V1271) -> fun (V1272) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2537, E2538)); _ -> fun (V1273) -> begin (V1302 = begin (V1301 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V1274) -> fun (V1275) -> fun (V1276) -> fun (V1277) -> fun (V1278) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V1276, V1277, V1278)) end end end end end, fun (V1279) -> fun (V1280) -> fun (V1281) -> V1280 end end end, fun (V1282) -> fun (V1283) -> fun (V1284) -> fun (V1285) -> fun (V1286) -> begin (V1287 = (V1284(V1286))), begin (V1288 = (V1285(V1286))), (V1287(V1288)) end end end end end end end}, fun (V1289) -> fun (V1290) -> fun (V1291) -> fun (V1292) -> fun (V1293) -> begin (V1294 = (V1291(V1293))), ((V1292(V1294))(V1293)) end end end end end end, fun (V1295) -> fun (V1296) -> fun (V1297) -> begin (V1298 = (V1296(V1297))), (V1298(V1297)) end end end end}, fun (V1299) -> fun (V1300) -> V1300 end end}, V0))(V1273))), {'Idris.Prelude.Types.Right', V1301} end), case V1302 of {'Idris.Prelude.Types.Left', E2498} -> (fun (V1303) -> {'Idris.Prelude.Types.Left', V1303} end(E2498)); {'Idris.Prelude.Types.Right', E2499} -> (fun (V1304) -> begin (V1305 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V1304, {'Idris.Core.Env.Nil'}, V3, V1273))), case V1305 of {'Idris.Prelude.Types.Left', E2500} -> (fun (V1306) -> {'Idris.Prelude.Types.Left', V1306} end(E2500)); {'Idris.Prelude.Types.Right', E2501} -> (fun (V1307) -> begin (V1312 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V1308) -> fun (V1309) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V1308, V1309)) end end, fun (V1310) -> fun (V1311) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V1310, V1311)) end end}, V1307, V1273))), case V1312 of {'Idris.Prelude.Types.Left', E2502} -> (fun (V1313) -> {'Idris.Prelude.Types.Left', V1313} end(E2502)); {'Idris.Prelude.Types.Right', E2503} -> (fun (V1314) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V1314))))}, V1273)) end(E2503)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2501)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2499)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E2494, E2495, E2496, E2497)); _ -> case V3 of {'Idris.Core.Value.NTCon', E2459, E2460, E2461, E2462, E2463} -> (fun (V1315, V1316, V1317, V1318, V1319) -> fun (V1320) -> begin (V1349 = begin (V1348 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V1321) -> fun (V1322) -> fun (V1323) -> fun (V1324) -> fun (V1325) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V1323, V1324, V1325)) end end end end end, fun (V1326) -> fun (V1327) -> fun (V1328) -> V1327 end end end, fun (V1329) -> fun (V1330) -> fun (V1331) -> fun (V1332) -> fun (V1333) -> begin (V1334 = (V1331(V1333))), begin (V1335 = (V1332(V1333))), (V1334(V1335)) end end end end end end end}, fun (V1336) -> fun (V1337) -> fun (V1338) -> fun (V1339) -> fun (V1340) -> begin (V1341 = (V1338(V1340))), ((V1339(V1341))(V1340)) end end end end end end, fun (V1342) -> fun (V1343) -> fun (V1344) -> begin (V1345 = (V1343(V1344))), (V1345(V1344)) end end end end}, fun (V1346) -> fun (V1347) -> V1347 end end}, V0))(V1320))), {'Idris.Prelude.Types.Right', V1348} end), case V1349 of {'Idris.Prelude.Types.Left', E2464} -> (fun (V1350) -> {'Idris.Prelude.Types.Left', V1350} end(E2464)); {'Idris.Prelude.Types.Right', E2465} -> (fun (V1351) -> begin (V1356 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V1352) -> fun (V1353) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V1352, V1353)) end end, fun (V1354) -> fun (V1355) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V1354, V1355)) end end}, V1316, V1320))), case V1356 of {'Idris.Prelude.Types.Left', E2466} -> (fun (V1357) -> {'Idris.Prelude.Types.Left', V1357} end(E2466)); {'Idris.Prelude.Types.Right', E2467} -> (fun (V1358) -> begin (V1359 = (('un--getNArgs'(V0, V1351, V1358, V1319))(V1320))), case V1359 of {'Idris.Prelude.Types.Left', E2468} -> (fun (V1360) -> {'Idris.Prelude.Types.Left', V1360} end(E2468)); {'Idris.Prelude.Types.Right', E2469} -> (fun (V1361) -> case V1361 of {'Idris.Compiler.CompileExpr.User', E2470, E2471} -> (fun (V1362, V1363) -> begin (V1365 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1364) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1351, V1364)) end, V1363))(V1320))), case V1365 of {'Idris.Prelude.Types.Left', E2472} -> (fun (V1366) -> {'Idris.Prelude.Types.Left', V1366} end(E2472)); {'Idris.Prelude.Types.Right', E2473} -> (fun (V1367) -> begin (V1369 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1368) -> ('un--nfToCFType'(V0, V1315, V2, V1368)) end, V1367))(V1320))), case V1369 of {'Idris.Prelude.Types.Left', E2474} -> (fun (V1370) -> {'Idris.Prelude.Types.Left', V1370} end(E2474)); {'Idris.Prelude.Types.Right', E2475} -> (fun (V1371) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V1358, V1371}} end(E2475)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2473)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2470, E2471)); {'Idris.Compiler.CompileExpr.Struct', E2476, E2477} -> (fun (V1372, V1373) -> begin (V1384 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1374) -> case V1374 of {'Idris.Builtin.MkPair', E2478, E2479} -> (fun (V1375, V1376) -> fun (V1377) -> begin (V1378 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1351, V1376))(V1377))), case V1378 of {'Idris.Prelude.Types.Left', E2480} -> (fun (V1379) -> {'Idris.Prelude.Types.Left', V1379} end(E2480)); {'Idris.Prelude.Types.Right', E2481} -> (fun (V1380) -> begin (V1381 = (('un--nfToCFType'(V0, V1315, 0, V1380))(V1377))), case V1381 of {'Idris.Prelude.Types.Left', E2482} -> (fun (V1382) -> {'Idris.Prelude.Types.Left', V1382} end(E2482)); {'Idris.Prelude.Types.Right', E2483} -> (fun (V1383) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V1375, V1383}} end(E2483)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2481)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2478, E2479)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V1373))(V1320))), case V1384 of {'Idris.Prelude.Types.Left', E2484} -> (fun (V1385) -> {'Idris.Prelude.Types.Left', V1385} end(E2484)); {'Idris.Prelude.Types.Right', E2485} -> (fun (V1386) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V1372, V1386}} end(E2485)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2476, E2477)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2486} -> (fun (V1387) -> begin (V1388 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1351, V1387))(V1320))), case V1388 of {'Idris.Prelude.Types.Left', E2487} -> (fun (V1389) -> {'Idris.Prelude.Types.Left', V1389} end(E2487)); {'Idris.Prelude.Types.Right', E2488} -> (fun (V1390) -> begin (V1391 = (('un--nfToCFType'(V0, V1315, V2, V1390))(V1320))), case V1391 of {'Idris.Prelude.Types.Left', E2489} -> (fun (V1392) -> {'Idris.Prelude.Types.Left', V1392} end(E2489)); {'Idris.Prelude.Types.Right', E2490} -> (fun (V1393) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V1393}} end(E2490)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2488)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2486)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2469)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2467)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2465)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2459, E2460, E2461, E2462, E2463)); {'Idris.Core.Value.NType', E2491} -> (fun (V1394) -> fun (V1395) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2491)); {'Idris.Core.Value.NErased', E2492, E2493} -> (fun (V1396, V1397) -> fun (V1398) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2492, E2493)); _ -> fun (V1399) -> begin (V1428 = begin (V1427 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V1400) -> fun (V1401) -> fun (V1402) -> fun (V1403) -> fun (V1404) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V1402, V1403, V1404)) end end end end end, fun (V1405) -> fun (V1406) -> fun (V1407) -> V1406 end end end, fun (V1408) -> fun (V1409) -> fun (V1410) -> fun (V1411) -> fun (V1412) -> begin (V1413 = (V1410(V1412))), begin (V1414 = (V1411(V1412))), (V1413(V1414)) end end end end end end end}, fun (V1415) -> fun (V1416) -> fun (V1417) -> fun (V1418) -> fun (V1419) -> begin (V1420 = (V1417(V1419))), ((V1418(V1420))(V1419)) end end end end end end, fun (V1421) -> fun (V1422) -> fun (V1423) -> begin (V1424 = (V1422(V1423))), (V1424(V1423)) end end end end}, fun (V1425) -> fun (V1426) -> V1426 end end}, V0))(V1399))), {'Idris.Prelude.Types.Right', V1427} end), case V1428 of {'Idris.Prelude.Types.Left', E2453} -> (fun (V1429) -> {'Idris.Prelude.Types.Left', V1429} end(E2453)); {'Idris.Prelude.Types.Right', E2454} -> (fun (V1430) -> begin (V1431 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V1430, {'Idris.Core.Env.Nil'}, V3, V1399))), case V1431 of {'Idris.Prelude.Types.Left', E2455} -> (fun (V1432) -> {'Idris.Prelude.Types.Left', V1432} end(E2455)); {'Idris.Prelude.Types.Right', E2456} -> (fun (V1433) -> begin (V1438 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V1434) -> fun (V1435) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V1434, V1435)) end end, fun (V1436) -> fun (V1437) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V1436, V1437)) end end}, V1433, V1399))), case V1438 of {'Idris.Prelude.Types.Left', E2457} -> (fun (V1439) -> {'Idris.Prelude.Types.Left', V1439} end(E2457)); {'Idris.Prelude.Types.Right', E2458} -> (fun (V1440) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V1440))))}, V1399)) end(E2458)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2456)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2454)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E2592, E2593, E2594, E2595} -> (fun (V1441, V1442, V1443, V1444) -> fun (V1445) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V1441, <<"Function types not allowed in a foreign struct"/utf8>>}, V1445)) end end(E2592, E2593, E2594, E2595)); _ -> case V3 of {'Idris.Core.Value.NTCon', E2557, E2558, E2559, E2560, E2561} -> (fun (V1446, V1447, V1448, V1449, V1450) -> fun (V1451) -> begin (V1480 = begin (V1479 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V1452) -> fun (V1453) -> fun (V1454) -> fun (V1455) -> fun (V1456) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V1454, V1455, V1456)) end end end end end, fun (V1457) -> fun (V1458) -> fun (V1459) -> V1458 end end end, fun (V1460) -> fun (V1461) -> fun (V1462) -> fun (V1463) -> fun (V1464) -> begin (V1465 = (V1462(V1464))), begin (V1466 = (V1463(V1464))), (V1465(V1466)) end end end end end end end}, fun (V1467) -> fun (V1468) -> fun (V1469) -> fun (V1470) -> fun (V1471) -> begin (V1472 = (V1469(V1471))), ((V1470(V1472))(V1471)) end end end end end end, fun (V1473) -> fun (V1474) -> fun (V1475) -> begin (V1476 = (V1474(V1475))), (V1476(V1475)) end end end end}, fun (V1477) -> fun (V1478) -> V1478 end end}, V0))(V1451))), {'Idris.Prelude.Types.Right', V1479} end), case V1480 of {'Idris.Prelude.Types.Left', E2562} -> (fun (V1481) -> {'Idris.Prelude.Types.Left', V1481} end(E2562)); {'Idris.Prelude.Types.Right', E2563} -> (fun (V1482) -> begin (V1487 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V1483) -> fun (V1484) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V1483, V1484)) end end, fun (V1485) -> fun (V1486) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V1485, V1486)) end end}, V1447, V1451))), case V1487 of {'Idris.Prelude.Types.Left', E2564} -> (fun (V1488) -> {'Idris.Prelude.Types.Left', V1488} end(E2564)); {'Idris.Prelude.Types.Right', E2565} -> (fun (V1489) -> begin (V1490 = (('un--getNArgs'(V0, V1482, V1489, V1450))(V1451))), case V1490 of {'Idris.Prelude.Types.Left', E2566} -> (fun (V1491) -> {'Idris.Prelude.Types.Left', V1491} end(E2566)); {'Idris.Prelude.Types.Right', E2567} -> (fun (V1492) -> case V1492 of {'Idris.Compiler.CompileExpr.User', E2568, E2569} -> (fun (V1493, V1494) -> begin (V1496 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1495) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1482, V1495)) end, V1494))(V1451))), case V1496 of {'Idris.Prelude.Types.Left', E2570} -> (fun (V1497) -> {'Idris.Prelude.Types.Left', V1497} end(E2570)); {'Idris.Prelude.Types.Right', E2571} -> (fun (V1498) -> begin (V1500 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1499) -> ('un--nfToCFType'(V0, V1446, V2, V1499)) end, V1498))(V1451))), case V1500 of {'Idris.Prelude.Types.Left', E2572} -> (fun (V1501) -> {'Idris.Prelude.Types.Left', V1501} end(E2572)); {'Idris.Prelude.Types.Right', E2573} -> (fun (V1502) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V1489, V1502}} end(E2573)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2571)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2568, E2569)); {'Idris.Compiler.CompileExpr.Struct', E2574, E2575} -> (fun (V1503, V1504) -> begin (V1515 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1505) -> case V1505 of {'Idris.Builtin.MkPair', E2576, E2577} -> (fun (V1506, V1507) -> fun (V1508) -> begin (V1509 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1482, V1507))(V1508))), case V1509 of {'Idris.Prelude.Types.Left', E2578} -> (fun (V1510) -> {'Idris.Prelude.Types.Left', V1510} end(E2578)); {'Idris.Prelude.Types.Right', E2579} -> (fun (V1511) -> begin (V1512 = (('un--nfToCFType'(V0, V1446, 0, V1511))(V1508))), case V1512 of {'Idris.Prelude.Types.Left', E2580} -> (fun (V1513) -> {'Idris.Prelude.Types.Left', V1513} end(E2580)); {'Idris.Prelude.Types.Right', E2581} -> (fun (V1514) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V1506, V1514}} end(E2581)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2579)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2576, E2577)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V1504))(V1451))), case V1515 of {'Idris.Prelude.Types.Left', E2582} -> (fun (V1516) -> {'Idris.Prelude.Types.Left', V1516} end(E2582)); {'Idris.Prelude.Types.Right', E2583} -> (fun (V1517) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V1503, V1517}} end(E2583)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2574, E2575)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2584} -> (fun (V1518) -> begin (V1519 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1482, V1518))(V1451))), case V1519 of {'Idris.Prelude.Types.Left', E2585} -> (fun (V1520) -> {'Idris.Prelude.Types.Left', V1520} end(E2585)); {'Idris.Prelude.Types.Right', E2586} -> (fun (V1521) -> begin (V1522 = (('un--nfToCFType'(V0, V1446, V2, V1521))(V1451))), case V1522 of {'Idris.Prelude.Types.Left', E2587} -> (fun (V1523) -> {'Idris.Prelude.Types.Left', V1523} end(E2587)); {'Idris.Prelude.Types.Right', E2588} -> (fun (V1524) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V1524}} end(E2588)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2586)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2584)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2567)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2565)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2563)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2557, E2558, E2559, E2560, E2561)); {'Idris.Core.Value.NType', E2589} -> (fun (V1525) -> fun (V1526) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2589)); {'Idris.Core.Value.NErased', E2590, E2591} -> (fun (V1527, V1528) -> fun (V1529) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2590, E2591)); _ -> fun (V1530) -> begin (V1559 = begin (V1558 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V1531) -> fun (V1532) -> fun (V1533) -> fun (V1534) -> fun (V1535) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V1533, V1534, V1535)) end end end end end, fun (V1536) -> fun (V1537) -> fun (V1538) -> V1537 end end end, fun (V1539) -> fun (V1540) -> fun (V1541) -> fun (V1542) -> fun (V1543) -> begin (V1544 = (V1541(V1543))), begin (V1545 = (V1542(V1543))), (V1544(V1545)) end end end end end end end}, fun (V1546) -> fun (V1547) -> fun (V1548) -> fun (V1549) -> fun (V1550) -> begin (V1551 = (V1548(V1550))), ((V1549(V1551))(V1550)) end end end end end end, fun (V1552) -> fun (V1553) -> fun (V1554) -> begin (V1555 = (V1553(V1554))), (V1555(V1554)) end end end end}, fun (V1556) -> fun (V1557) -> V1557 end end}, V0))(V1530))), {'Idris.Prelude.Types.Right', V1558} end), case V1559 of {'Idris.Prelude.Types.Left', E2551} -> (fun (V1560) -> {'Idris.Prelude.Types.Left', V1560} end(E2551)); {'Idris.Prelude.Types.Right', E2552} -> (fun (V1561) -> begin (V1562 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V1561, {'Idris.Core.Env.Nil'}, V3, V1530))), case V1562 of {'Idris.Prelude.Types.Left', E2553} -> (fun (V1563) -> {'Idris.Prelude.Types.Left', V1563} end(E2553)); {'Idris.Prelude.Types.Right', E2554} -> (fun (V1564) -> begin (V1569 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V1565) -> fun (V1566) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V1565, V1566)) end end, fun (V1567) -> fun (V1568) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V1567, V1568)) end end}, V1564, V1530))), case V1569 of {'Idris.Prelude.Types.Left', E2555} -> (fun (V1570) -> {'Idris.Prelude.Types.Left', V1570} end(E2555)); {'Idris.Prelude.Types.Right', E2556} -> (fun (V1571) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V1571))))}, V1530)) end(E2556)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2554)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2552)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E2418, E2419, E2420, E2421, E2422} -> (fun (V1572, V1573, V1574, V1575, V1576) -> fun (V1577) -> begin (V1606 = begin (V1605 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V1578) -> fun (V1579) -> fun (V1580) -> fun (V1581) -> fun (V1582) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V1580, V1581, V1582)) end end end end end, fun (V1583) -> fun (V1584) -> fun (V1585) -> V1584 end end end, fun (V1586) -> fun (V1587) -> fun (V1588) -> fun (V1589) -> fun (V1590) -> begin (V1591 = (V1588(V1590))), begin (V1592 = (V1589(V1590))), (V1591(V1592)) end end end end end end end}, fun (V1593) -> fun (V1594) -> fun (V1595) -> fun (V1596) -> fun (V1597) -> begin (V1598 = (V1595(V1597))), ((V1596(V1598))(V1597)) end end end end end end, fun (V1599) -> fun (V1600) -> fun (V1601) -> begin (V1602 = (V1600(V1601))), (V1602(V1601)) end end end end}, fun (V1603) -> fun (V1604) -> V1604 end end}, V0))(V1577))), {'Idris.Prelude.Types.Right', V1605} end), case V1606 of {'Idris.Prelude.Types.Left', E2423} -> (fun (V1607) -> {'Idris.Prelude.Types.Left', V1607} end(E2423)); {'Idris.Prelude.Types.Right', E2424} -> (fun (V1608) -> begin (V1613 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V1609) -> fun (V1610) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V1609, V1610)) end end, fun (V1611) -> fun (V1612) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V1611, V1612)) end end}, V1573, V1577))), case V1613 of {'Idris.Prelude.Types.Left', E2425} -> (fun (V1614) -> {'Idris.Prelude.Types.Left', V1614} end(E2425)); {'Idris.Prelude.Types.Right', E2426} -> (fun (V1615) -> begin (V1616 = (('un--getNArgs'(V0, V1608, V1615, V1576))(V1577))), case V1616 of {'Idris.Prelude.Types.Left', E2427} -> (fun (V1617) -> {'Idris.Prelude.Types.Left', V1617} end(E2427)); {'Idris.Prelude.Types.Right', E2428} -> (fun (V1618) -> case V1618 of {'Idris.Compiler.CompileExpr.User', E2429, E2430} -> (fun (V1619, V1620) -> begin (V1622 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1621) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1608, V1621)) end, V1620))(V1577))), case V1622 of {'Idris.Prelude.Types.Left', E2431} -> (fun (V1623) -> {'Idris.Prelude.Types.Left', V1623} end(E2431)); {'Idris.Prelude.Types.Right', E2432} -> (fun (V1624) -> begin (V1626 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1625) -> ('un--nfToCFType'(V0, V1572, V2, V1625)) end, V1624))(V1577))), case V1626 of {'Idris.Prelude.Types.Left', E2433} -> (fun (V1627) -> {'Idris.Prelude.Types.Left', V1627} end(E2433)); {'Idris.Prelude.Types.Right', E2434} -> (fun (V1628) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V1615, V1628}} end(E2434)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2432)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2429, E2430)); {'Idris.Compiler.CompileExpr.Struct', E2435, E2436} -> (fun (V1629, V1630) -> begin (V1641 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1631) -> case V1631 of {'Idris.Builtin.MkPair', E2437, E2438} -> (fun (V1632, V1633) -> fun (V1634) -> begin (V1635 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1608, V1633))(V1634))), case V1635 of {'Idris.Prelude.Types.Left', E2439} -> (fun (V1636) -> {'Idris.Prelude.Types.Left', V1636} end(E2439)); {'Idris.Prelude.Types.Right', E2440} -> (fun (V1637) -> begin (V1638 = (('un--nfToCFType'(V0, V1572, 0, V1637))(V1634))), case V1638 of {'Idris.Prelude.Types.Left', E2441} -> (fun (V1639) -> {'Idris.Prelude.Types.Left', V1639} end(E2441)); {'Idris.Prelude.Types.Right', E2442} -> (fun (V1640) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V1632, V1640}} end(E2442)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2440)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2437, E2438)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V1630))(V1577))), case V1641 of {'Idris.Prelude.Types.Left', E2443} -> (fun (V1642) -> {'Idris.Prelude.Types.Left', V1642} end(E2443)); {'Idris.Prelude.Types.Right', E2444} -> (fun (V1643) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V1629, V1643}} end(E2444)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2435, E2436)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2445} -> (fun (V1644) -> begin (V1645 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1608, V1644))(V1577))), case V1645 of {'Idris.Prelude.Types.Left', E2446} -> (fun (V1646) -> {'Idris.Prelude.Types.Left', V1646} end(E2446)); {'Idris.Prelude.Types.Right', E2447} -> (fun (V1647) -> begin (V1648 = (('un--nfToCFType'(V0, V1572, V2, V1647))(V1577))), case V1648 of {'Idris.Prelude.Types.Left', E2448} -> (fun (V1649) -> {'Idris.Prelude.Types.Left', V1649} end(E2448)); {'Idris.Prelude.Types.Right', E2449} -> (fun (V1650) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V1650}} end(E2449)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2447)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2445)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2428)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2426)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2424)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2418, E2419, E2420, E2421, E2422)); {'Idris.Core.Value.NType', E2450} -> (fun (V1651) -> fun (V1652) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2450)); {'Idris.Core.Value.NErased', E2451, E2452} -> (fun (V1653, V1654) -> fun (V1655) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2451, E2452)); _ -> fun (V1656) -> begin (V1685 = begin (V1684 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V1657) -> fun (V1658) -> fun (V1659) -> fun (V1660) -> fun (V1661) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V1659, V1660, V1661)) end end end end end, fun (V1662) -> fun (V1663) -> fun (V1664) -> V1663 end end end, fun (V1665) -> fun (V1666) -> fun (V1667) -> fun (V1668) -> fun (V1669) -> begin (V1670 = (V1667(V1669))), begin (V1671 = (V1668(V1669))), (V1670(V1671)) end end end end end end end}, fun (V1672) -> fun (V1673) -> fun (V1674) -> fun (V1675) -> fun (V1676) -> begin (V1677 = (V1674(V1676))), ((V1675(V1677))(V1676)) end end end end end end, fun (V1678) -> fun (V1679) -> fun (V1680) -> begin (V1681 = (V1679(V1680))), (V1681(V1680)) end end end end}, fun (V1682) -> fun (V1683) -> V1683 end end}, V0))(V1656))), {'Idris.Prelude.Types.Right', V1684} end), case V1685 of {'Idris.Prelude.Types.Left', E2412} -> (fun (V1686) -> {'Idris.Prelude.Types.Left', V1686} end(E2412)); {'Idris.Prelude.Types.Right', E2413} -> (fun (V1687) -> begin (V1688 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V1687, {'Idris.Core.Env.Nil'}, V3, V1656))), case V1688 of {'Idris.Prelude.Types.Left', E2414} -> (fun (V1689) -> {'Idris.Prelude.Types.Left', V1689} end(E2414)); {'Idris.Prelude.Types.Right', E2415} -> (fun (V1690) -> begin (V1695 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V1691) -> fun (V1692) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V1691, V1692)) end end, fun (V1693) -> fun (V1694) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V1693, V1694)) end end}, V1690, V1656))), case V1695 of {'Idris.Prelude.Types.Left', E2416} -> (fun (V1696) -> {'Idris.Prelude.Types.Left', V1696} end(E2416)); {'Idris.Prelude.Types.Right', E2417} -> (fun (V1697) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V1697))))}, V1656)) end(E2417)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2415)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2413)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end(E2410, E2411)); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E2308, E2309, E2310, E2311} -> (fun (V1698, V1699, V1700, V1701) -> case V1700 of {'Idris.Core.TT.Pi', E2353, E2354, E2355, E2356} -> (fun (V1702, V1703, V1704, V1705) -> fun (V1706) -> begin (V1735 = begin (V1734 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V1707) -> fun (V1708) -> fun (V1709) -> fun (V1710) -> fun (V1711) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V1709, V1710, V1711)) end end end end end, fun (V1712) -> fun (V1713) -> fun (V1714) -> V1713 end end end, fun (V1715) -> fun (V1716) -> fun (V1717) -> fun (V1718) -> fun (V1719) -> begin (V1720 = (V1717(V1719))), begin (V1721 = (V1718(V1719))), (V1720(V1721)) end end end end end end end}, fun (V1722) -> fun (V1723) -> fun (V1724) -> fun (V1725) -> fun (V1726) -> begin (V1727 = (V1724(V1726))), ((V1725(V1727))(V1726)) end end end end end end, fun (V1728) -> fun (V1729) -> fun (V1730) -> begin (V1731 = (V1729(V1730))), (V1731(V1730)) end end end end}, fun (V1732) -> fun (V1733) -> V1733 end end}, V0))(V1706))), {'Idris.Prelude.Types.Right', V1734} end), case V1735 of {'Idris.Prelude.Types.Left', E2357} -> (fun (V1736) -> {'Idris.Prelude.Types.Left', V1736} end(E2357)); {'Idris.Prelude.Types.Right', E2358} -> (fun (V1737) -> begin (V1738 = (('un--nfToCFType'(V0, V1698, 1, V1705))(V1706))), case V1738 of {'Idris.Prelude.Types.Left', E2359} -> (fun (V1739) -> {'Idris.Prelude.Types.Left', V1739} end(E2359)); {'Idris.Prelude.Types.Right', E2360} -> (fun (V1740) -> begin (V1741 = (((V1701(V1737))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V1698, 1}))))(V1706))), case V1741 of {'Idris.Prelude.Types.Left', E2361} -> (fun (V1742) -> {'Idris.Prelude.Types.Left', V1742} end(E2361)); {'Idris.Prelude.Types.Right', E2362} -> (fun (V1743) -> begin (V1744 = (('un--nfToCFType'(V0, V1698, 1, V1743))(V1706))), case V1744 of {'Idris.Prelude.Types.Left', E2363} -> (fun (V1745) -> {'Idris.Prelude.Types.Left', V1745} end(E2363)); {'Idris.Prelude.Types.Right', E2364} -> (fun (V1746) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V1740, V1746}} end(E2364)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2362)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2360)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2358)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2353, E2354, E2355, E2356)); _ -> case V3 of {'Idris.Core.Value.NTCon', E2318, E2319, E2320, E2321, E2322} -> (fun (V1747, V1748, V1749, V1750, V1751) -> fun (V1752) -> begin (V1781 = begin (V1780 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V1753) -> fun (V1754) -> fun (V1755) -> fun (V1756) -> fun (V1757) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V1755, V1756, V1757)) end end end end end, fun (V1758) -> fun (V1759) -> fun (V1760) -> V1759 end end end, fun (V1761) -> fun (V1762) -> fun (V1763) -> fun (V1764) -> fun (V1765) -> begin (V1766 = (V1763(V1765))), begin (V1767 = (V1764(V1765))), (V1766(V1767)) end end end end end end end}, fun (V1768) -> fun (V1769) -> fun (V1770) -> fun (V1771) -> fun (V1772) -> begin (V1773 = (V1770(V1772))), ((V1771(V1773))(V1772)) end end end end end end, fun (V1774) -> fun (V1775) -> fun (V1776) -> begin (V1777 = (V1775(V1776))), (V1777(V1776)) end end end end}, fun (V1778) -> fun (V1779) -> V1779 end end}, V0))(V1752))), {'Idris.Prelude.Types.Right', V1780} end), case V1781 of {'Idris.Prelude.Types.Left', E2323} -> (fun (V1782) -> {'Idris.Prelude.Types.Left', V1782} end(E2323)); {'Idris.Prelude.Types.Right', E2324} -> (fun (V1783) -> begin (V1788 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V1784) -> fun (V1785) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V1784, V1785)) end end, fun (V1786) -> fun (V1787) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V1786, V1787)) end end}, V1748, V1752))), case V1788 of {'Idris.Prelude.Types.Left', E2325} -> (fun (V1789) -> {'Idris.Prelude.Types.Left', V1789} end(E2325)); {'Idris.Prelude.Types.Right', E2326} -> (fun (V1790) -> begin (V1791 = (('un--getNArgs'(V0, V1783, V1790, V1751))(V1752))), case V1791 of {'Idris.Prelude.Types.Left', E2327} -> (fun (V1792) -> {'Idris.Prelude.Types.Left', V1792} end(E2327)); {'Idris.Prelude.Types.Right', E2328} -> (fun (V1793) -> case V1793 of {'Idris.Compiler.CompileExpr.User', E2329, E2330} -> (fun (V1794, V1795) -> begin (V1797 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1796) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1783, V1796)) end, V1795))(V1752))), case V1797 of {'Idris.Prelude.Types.Left', E2331} -> (fun (V1798) -> {'Idris.Prelude.Types.Left', V1798} end(E2331)); {'Idris.Prelude.Types.Right', E2332} -> (fun (V1799) -> begin (V1801 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1800) -> ('un--nfToCFType'(V0, V1747, V2, V1800)) end, V1799))(V1752))), case V1801 of {'Idris.Prelude.Types.Left', E2333} -> (fun (V1802) -> {'Idris.Prelude.Types.Left', V1802} end(E2333)); {'Idris.Prelude.Types.Right', E2334} -> (fun (V1803) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V1790, V1803}} end(E2334)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2332)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2329, E2330)); {'Idris.Compiler.CompileExpr.Struct', E2335, E2336} -> (fun (V1804, V1805) -> begin (V1816 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1806) -> case V1806 of {'Idris.Builtin.MkPair', E2337, E2338} -> (fun (V1807, V1808) -> fun (V1809) -> begin (V1810 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1783, V1808))(V1809))), case V1810 of {'Idris.Prelude.Types.Left', E2339} -> (fun (V1811) -> {'Idris.Prelude.Types.Left', V1811} end(E2339)); {'Idris.Prelude.Types.Right', E2340} -> (fun (V1812) -> begin (V1813 = (('un--nfToCFType'(V0, V1747, 0, V1812))(V1809))), case V1813 of {'Idris.Prelude.Types.Left', E2341} -> (fun (V1814) -> {'Idris.Prelude.Types.Left', V1814} end(E2341)); {'Idris.Prelude.Types.Right', E2342} -> (fun (V1815) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V1807, V1815}} end(E2342)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2340)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2337, E2338)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V1805))(V1752))), case V1816 of {'Idris.Prelude.Types.Left', E2343} -> (fun (V1817) -> {'Idris.Prelude.Types.Left', V1817} end(E2343)); {'Idris.Prelude.Types.Right', E2344} -> (fun (V1818) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V1804, V1818}} end(E2344)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2335, E2336)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2345} -> (fun (V1819) -> begin (V1820 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1783, V1819))(V1752))), case V1820 of {'Idris.Prelude.Types.Left', E2346} -> (fun (V1821) -> {'Idris.Prelude.Types.Left', V1821} end(E2346)); {'Idris.Prelude.Types.Right', E2347} -> (fun (V1822) -> begin (V1823 = (('un--nfToCFType'(V0, V1747, V2, V1822))(V1752))), case V1823 of {'Idris.Prelude.Types.Left', E2348} -> (fun (V1824) -> {'Idris.Prelude.Types.Left', V1824} end(E2348)); {'Idris.Prelude.Types.Right', E2349} -> (fun (V1825) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V1825}} end(E2349)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2347)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2345)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2328)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2326)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2324)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2318, E2319, E2320, E2321, E2322)); {'Idris.Core.Value.NType', E2350} -> (fun (V1826) -> fun (V1827) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2350)); {'Idris.Core.Value.NErased', E2351, E2352} -> (fun (V1828, V1829) -> fun (V1830) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2351, E2352)); _ -> fun (V1831) -> begin (V1860 = begin (V1859 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V1832) -> fun (V1833) -> fun (V1834) -> fun (V1835) -> fun (V1836) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V1834, V1835, V1836)) end end end end end, fun (V1837) -> fun (V1838) -> fun (V1839) -> V1838 end end end, fun (V1840) -> fun (V1841) -> fun (V1842) -> fun (V1843) -> fun (V1844) -> begin (V1845 = (V1842(V1844))), begin (V1846 = (V1843(V1844))), (V1845(V1846)) end end end end end end end}, fun (V1847) -> fun (V1848) -> fun (V1849) -> fun (V1850) -> fun (V1851) -> begin (V1852 = (V1849(V1851))), ((V1850(V1852))(V1851)) end end end end end end, fun (V1853) -> fun (V1854) -> fun (V1855) -> begin (V1856 = (V1854(V1855))), (V1856(V1855)) end end end end}, fun (V1857) -> fun (V1858) -> V1858 end end}, V0))(V1831))), {'Idris.Prelude.Types.Right', V1859} end), case V1860 of {'Idris.Prelude.Types.Left', E2312} -> (fun (V1861) -> {'Idris.Prelude.Types.Left', V1861} end(E2312)); {'Idris.Prelude.Types.Right', E2313} -> (fun (V1862) -> begin (V1863 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V1862, {'Idris.Core.Env.Nil'}, V3, V1831))), case V1863 of {'Idris.Prelude.Types.Left', E2314} -> (fun (V1864) -> {'Idris.Prelude.Types.Left', V1864} end(E2314)); {'Idris.Prelude.Types.Right', E2315} -> (fun (V1865) -> begin (V1870 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V1866) -> fun (V1867) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V1866, V1867)) end end, fun (V1868) -> fun (V1869) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V1868, V1869)) end end}, V1865, V1831))), case V1870 of {'Idris.Prelude.Types.Left', E2316} -> (fun (V1871) -> {'Idris.Prelude.Types.Left', V1871} end(E2316)); {'Idris.Prelude.Types.Right', E2317} -> (fun (V1872) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V1872))))}, V1831)) end(E2317)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2315)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2313)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E2308, E2309, E2310, E2311)); _ -> case V3 of {'Idris.Core.Value.NTCon', E2273, E2274, E2275, E2276, E2277} -> (fun (V1873, V1874, V1875, V1876, V1877) -> fun (V1878) -> begin (V1907 = begin (V1906 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V1879) -> fun (V1880) -> fun (V1881) -> fun (V1882) -> fun (V1883) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V1881, V1882, V1883)) end end end end end, fun (V1884) -> fun (V1885) -> fun (V1886) -> V1885 end end end, fun (V1887) -> fun (V1888) -> fun (V1889) -> fun (V1890) -> fun (V1891) -> begin (V1892 = (V1889(V1891))), begin (V1893 = (V1890(V1891))), (V1892(V1893)) end end end end end end end}, fun (V1894) -> fun (V1895) -> fun (V1896) -> fun (V1897) -> fun (V1898) -> begin (V1899 = (V1896(V1898))), ((V1897(V1899))(V1898)) end end end end end end, fun (V1900) -> fun (V1901) -> fun (V1902) -> begin (V1903 = (V1901(V1902))), (V1903(V1902)) end end end end}, fun (V1904) -> fun (V1905) -> V1905 end end}, V0))(V1878))), {'Idris.Prelude.Types.Right', V1906} end), case V1907 of {'Idris.Prelude.Types.Left', E2278} -> (fun (V1908) -> {'Idris.Prelude.Types.Left', V1908} end(E2278)); {'Idris.Prelude.Types.Right', E2279} -> (fun (V1909) -> begin (V1914 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V1910) -> fun (V1911) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V1910, V1911)) end end, fun (V1912) -> fun (V1913) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V1912, V1913)) end end}, V1874, V1878))), case V1914 of {'Idris.Prelude.Types.Left', E2280} -> (fun (V1915) -> {'Idris.Prelude.Types.Left', V1915} end(E2280)); {'Idris.Prelude.Types.Right', E2281} -> (fun (V1916) -> begin (V1917 = (('un--getNArgs'(V0, V1909, V1916, V1877))(V1878))), case V1917 of {'Idris.Prelude.Types.Left', E2282} -> (fun (V1918) -> {'Idris.Prelude.Types.Left', V1918} end(E2282)); {'Idris.Prelude.Types.Right', E2283} -> (fun (V1919) -> case V1919 of {'Idris.Compiler.CompileExpr.User', E2284, E2285} -> (fun (V1920, V1921) -> begin (V1923 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1922) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1909, V1922)) end, V1921))(V1878))), case V1923 of {'Idris.Prelude.Types.Left', E2286} -> (fun (V1924) -> {'Idris.Prelude.Types.Left', V1924} end(E2286)); {'Idris.Prelude.Types.Right', E2287} -> (fun (V1925) -> begin (V1927 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1926) -> ('un--nfToCFType'(V0, V1873, V2, V1926)) end, V1925))(V1878))), case V1927 of {'Idris.Prelude.Types.Left', E2288} -> (fun (V1928) -> {'Idris.Prelude.Types.Left', V1928} end(E2288)); {'Idris.Prelude.Types.Right', E2289} -> (fun (V1929) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V1916, V1929}} end(E2289)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2287)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2284, E2285)); {'Idris.Compiler.CompileExpr.Struct', E2290, E2291} -> (fun (V1930, V1931) -> begin (V1942 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V1932) -> case V1932 of {'Idris.Builtin.MkPair', E2292, E2293} -> (fun (V1933, V1934) -> fun (V1935) -> begin (V1936 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1909, V1934))(V1935))), case V1936 of {'Idris.Prelude.Types.Left', E2294} -> (fun (V1937) -> {'Idris.Prelude.Types.Left', V1937} end(E2294)); {'Idris.Prelude.Types.Right', E2295} -> (fun (V1938) -> begin (V1939 = (('un--nfToCFType'(V0, V1873, 0, V1938))(V1935))), case V1939 of {'Idris.Prelude.Types.Left', E2296} -> (fun (V1940) -> {'Idris.Prelude.Types.Left', V1940} end(E2296)); {'Idris.Prelude.Types.Right', E2297} -> (fun (V1941) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V1933, V1941}} end(E2297)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2295)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2292, E2293)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V1931))(V1878))), case V1942 of {'Idris.Prelude.Types.Left', E2298} -> (fun (V1943) -> {'Idris.Prelude.Types.Left', V1943} end(E2298)); {'Idris.Prelude.Types.Right', E2299} -> (fun (V1944) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V1930, V1944}} end(E2299)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2290, E2291)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2300} -> (fun (V1945) -> begin (V1946 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1909, V1945))(V1878))), case V1946 of {'Idris.Prelude.Types.Left', E2301} -> (fun (V1947) -> {'Idris.Prelude.Types.Left', V1947} end(E2301)); {'Idris.Prelude.Types.Right', E2302} -> (fun (V1948) -> begin (V1949 = (('un--nfToCFType'(V0, V1873, V2, V1948))(V1878))), case V1949 of {'Idris.Prelude.Types.Left', E2303} -> (fun (V1950) -> {'Idris.Prelude.Types.Left', V1950} end(E2303)); {'Idris.Prelude.Types.Right', E2304} -> (fun (V1951) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V1951}} end(E2304)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2302)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2300)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2283)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2281)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2279)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2273, E2274, E2275, E2276, E2277)); {'Idris.Core.Value.NType', E2305} -> (fun (V1952) -> fun (V1953) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2305)); {'Idris.Core.Value.NErased', E2306, E2307} -> (fun (V1954, V1955) -> fun (V1956) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2306, E2307)); _ -> fun (V1957) -> begin (V1986 = begin (V1985 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V1958) -> fun (V1959) -> fun (V1960) -> fun (V1961) -> fun (V1962) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V1960, V1961, V1962)) end end end end end, fun (V1963) -> fun (V1964) -> fun (V1965) -> V1964 end end end, fun (V1966) -> fun (V1967) -> fun (V1968) -> fun (V1969) -> fun (V1970) -> begin (V1971 = (V1968(V1970))), begin (V1972 = (V1969(V1970))), (V1971(V1972)) end end end end end end end}, fun (V1973) -> fun (V1974) -> fun (V1975) -> fun (V1976) -> fun (V1977) -> begin (V1978 = (V1975(V1977))), ((V1976(V1978))(V1977)) end end end end end end, fun (V1979) -> fun (V1980) -> fun (V1981) -> begin (V1982 = (V1980(V1981))), (V1982(V1981)) end end end end}, fun (V1983) -> fun (V1984) -> V1984 end end}, V0))(V1957))), {'Idris.Prelude.Types.Right', V1985} end), case V1986 of {'Idris.Prelude.Types.Left', E2267} -> (fun (V1987) -> {'Idris.Prelude.Types.Left', V1987} end(E2267)); {'Idris.Prelude.Types.Right', E2268} -> (fun (V1988) -> begin (V1989 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V1988, {'Idris.Core.Env.Nil'}, V3, V1957))), case V1989 of {'Idris.Prelude.Types.Left', E2269} -> (fun (V1990) -> {'Idris.Prelude.Types.Left', V1990} end(E2269)); {'Idris.Prelude.Types.Right', E2270} -> (fun (V1991) -> begin (V1996 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V1992) -> fun (V1993) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V1992, V1993)) end end, fun (V1994) -> fun (V1995) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V1994, V1995)) end end}, V1991, V1957))), case V1996 of {'Idris.Prelude.Types.Left', E2271} -> (fun (V1997) -> {'Idris.Prelude.Types.Left', V1997} end(E2271)); {'Idris.Prelude.Types.Right', E2272} -> (fun (V1998) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V1998))))}, V1957)) end(E2272)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2270)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2268)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E2406, E2407, E2408, E2409} -> (fun (V1999, V2000, V2001, V2002) -> fun (V2003) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V1999, <<"Function types not allowed in a foreign struct"/utf8>>}, V2003)) end end(E2406, E2407, E2408, E2409)); _ -> case V3 of {'Idris.Core.Value.NTCon', E2371, E2372, E2373, E2374, E2375} -> (fun (V2004, V2005, V2006, V2007, V2008) -> fun (V2009) -> begin (V2038 = begin (V2037 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V2010) -> fun (V2011) -> fun (V2012) -> fun (V2013) -> fun (V2014) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V2012, V2013, V2014)) end end end end end, fun (V2015) -> fun (V2016) -> fun (V2017) -> V2016 end end end, fun (V2018) -> fun (V2019) -> fun (V2020) -> fun (V2021) -> fun (V2022) -> begin (V2023 = (V2020(V2022))), begin (V2024 = (V2021(V2022))), (V2023(V2024)) end end end end end end end}, fun (V2025) -> fun (V2026) -> fun (V2027) -> fun (V2028) -> fun (V2029) -> begin (V2030 = (V2027(V2029))), ((V2028(V2030))(V2029)) end end end end end end, fun (V2031) -> fun (V2032) -> fun (V2033) -> begin (V2034 = (V2032(V2033))), (V2034(V2033)) end end end end}, fun (V2035) -> fun (V2036) -> V2036 end end}, V0))(V2009))), {'Idris.Prelude.Types.Right', V2037} end), case V2038 of {'Idris.Prelude.Types.Left', E2376} -> (fun (V2039) -> {'Idris.Prelude.Types.Left', V2039} end(E2376)); {'Idris.Prelude.Types.Right', E2377} -> (fun (V2040) -> begin (V2045 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V2041) -> fun (V2042) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V2041, V2042)) end end, fun (V2043) -> fun (V2044) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V2043, V2044)) end end}, V2005, V2009))), case V2045 of {'Idris.Prelude.Types.Left', E2378} -> (fun (V2046) -> {'Idris.Prelude.Types.Left', V2046} end(E2378)); {'Idris.Prelude.Types.Right', E2379} -> (fun (V2047) -> begin (V2048 = (('un--getNArgs'(V0, V2040, V2047, V2008))(V2009))), case V2048 of {'Idris.Prelude.Types.Left', E2380} -> (fun (V2049) -> {'Idris.Prelude.Types.Left', V2049} end(E2380)); {'Idris.Prelude.Types.Right', E2381} -> (fun (V2050) -> case V2050 of {'Idris.Compiler.CompileExpr.User', E2382, E2383} -> (fun (V2051, V2052) -> begin (V2054 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2053) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2040, V2053)) end, V2052))(V2009))), case V2054 of {'Idris.Prelude.Types.Left', E2384} -> (fun (V2055) -> {'Idris.Prelude.Types.Left', V2055} end(E2384)); {'Idris.Prelude.Types.Right', E2385} -> (fun (V2056) -> begin (V2058 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2057) -> ('un--nfToCFType'(V0, V2004, V2, V2057)) end, V2056))(V2009))), case V2058 of {'Idris.Prelude.Types.Left', E2386} -> (fun (V2059) -> {'Idris.Prelude.Types.Left', V2059} end(E2386)); {'Idris.Prelude.Types.Right', E2387} -> (fun (V2060) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V2047, V2060}} end(E2387)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2385)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2382, E2383)); {'Idris.Compiler.CompileExpr.Struct', E2388, E2389} -> (fun (V2061, V2062) -> begin (V2073 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2063) -> case V2063 of {'Idris.Builtin.MkPair', E2390, E2391} -> (fun (V2064, V2065) -> fun (V2066) -> begin (V2067 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2040, V2065))(V2066))), case V2067 of {'Idris.Prelude.Types.Left', E2392} -> (fun (V2068) -> {'Idris.Prelude.Types.Left', V2068} end(E2392)); {'Idris.Prelude.Types.Right', E2393} -> (fun (V2069) -> begin (V2070 = (('un--nfToCFType'(V0, V2004, 0, V2069))(V2066))), case V2070 of {'Idris.Prelude.Types.Left', E2394} -> (fun (V2071) -> {'Idris.Prelude.Types.Left', V2071} end(E2394)); {'Idris.Prelude.Types.Right', E2395} -> (fun (V2072) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V2064, V2072}} end(E2395)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2393)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2390, E2391)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V2062))(V2009))), case V2073 of {'Idris.Prelude.Types.Left', E2396} -> (fun (V2074) -> {'Idris.Prelude.Types.Left', V2074} end(E2396)); {'Idris.Prelude.Types.Right', E2397} -> (fun (V2075) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V2061, V2075}} end(E2397)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2388, E2389)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2398} -> (fun (V2076) -> begin (V2077 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2040, V2076))(V2009))), case V2077 of {'Idris.Prelude.Types.Left', E2399} -> (fun (V2078) -> {'Idris.Prelude.Types.Left', V2078} end(E2399)); {'Idris.Prelude.Types.Right', E2400} -> (fun (V2079) -> begin (V2080 = (('un--nfToCFType'(V0, V2004, V2, V2079))(V2009))), case V2080 of {'Idris.Prelude.Types.Left', E2401} -> (fun (V2081) -> {'Idris.Prelude.Types.Left', V2081} end(E2401)); {'Idris.Prelude.Types.Right', E2402} -> (fun (V2082) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V2082}} end(E2402)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2400)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2398)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2381)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2379)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2377)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2371, E2372, E2373, E2374, E2375)); {'Idris.Core.Value.NType', E2403} -> (fun (V2083) -> fun (V2084) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2403)); {'Idris.Core.Value.NErased', E2404, E2405} -> (fun (V2085, V2086) -> fun (V2087) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2404, E2405)); _ -> fun (V2088) -> begin (V2117 = begin (V2116 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V2089) -> fun (V2090) -> fun (V2091) -> fun (V2092) -> fun (V2093) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V2091, V2092, V2093)) end end end end end, fun (V2094) -> fun (V2095) -> fun (V2096) -> V2095 end end end, fun (V2097) -> fun (V2098) -> fun (V2099) -> fun (V2100) -> fun (V2101) -> begin (V2102 = (V2099(V2101))), begin (V2103 = (V2100(V2101))), (V2102(V2103)) end end end end end end end}, fun (V2104) -> fun (V2105) -> fun (V2106) -> fun (V2107) -> fun (V2108) -> begin (V2109 = (V2106(V2108))), ((V2107(V2109))(V2108)) end end end end end end, fun (V2110) -> fun (V2111) -> fun (V2112) -> begin (V2113 = (V2111(V2112))), (V2113(V2112)) end end end end}, fun (V2114) -> fun (V2115) -> V2115 end end}, V0))(V2088))), {'Idris.Prelude.Types.Right', V2116} end), case V2117 of {'Idris.Prelude.Types.Left', E2365} -> (fun (V2118) -> {'Idris.Prelude.Types.Left', V2118} end(E2365)); {'Idris.Prelude.Types.Right', E2366} -> (fun (V2119) -> begin (V2120 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V2119, {'Idris.Core.Env.Nil'}, V3, V2088))), case V2120 of {'Idris.Prelude.Types.Left', E2367} -> (fun (V2121) -> {'Idris.Prelude.Types.Left', V2121} end(E2367)); {'Idris.Prelude.Types.Right', E2368} -> (fun (V2122) -> begin (V2127 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V2123) -> fun (V2124) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V2123, V2124)) end end, fun (V2125) -> fun (V2126) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V2125, V2126)) end end}, V2122, V2088))), case V2127 of {'Idris.Prelude.Types.Left', E2369} -> (fun (V2128) -> {'Idris.Prelude.Types.Left', V2128} end(E2369)); {'Idris.Prelude.Types.Right', E2370} -> (fun (V2129) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V2129))))}, V2088)) end(E2370)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2368)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2366)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E2232, E2233, E2234, E2235, E2236} -> (fun (V2130, V2131, V2132, V2133, V2134) -> fun (V2135) -> begin (V2164 = begin (V2163 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V2136) -> fun (V2137) -> fun (V2138) -> fun (V2139) -> fun (V2140) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V2138, V2139, V2140)) end end end end end, fun (V2141) -> fun (V2142) -> fun (V2143) -> V2142 end end end, fun (V2144) -> fun (V2145) -> fun (V2146) -> fun (V2147) -> fun (V2148) -> begin (V2149 = (V2146(V2148))), begin (V2150 = (V2147(V2148))), (V2149(V2150)) end end end end end end end}, fun (V2151) -> fun (V2152) -> fun (V2153) -> fun (V2154) -> fun (V2155) -> begin (V2156 = (V2153(V2155))), ((V2154(V2156))(V2155)) end end end end end end, fun (V2157) -> fun (V2158) -> fun (V2159) -> begin (V2160 = (V2158(V2159))), (V2160(V2159)) end end end end}, fun (V2161) -> fun (V2162) -> V2162 end end}, V0))(V2135))), {'Idris.Prelude.Types.Right', V2163} end), case V2164 of {'Idris.Prelude.Types.Left', E2237} -> (fun (V2165) -> {'Idris.Prelude.Types.Left', V2165} end(E2237)); {'Idris.Prelude.Types.Right', E2238} -> (fun (V2166) -> begin (V2171 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V2167) -> fun (V2168) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V2167, V2168)) end end, fun (V2169) -> fun (V2170) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V2169, V2170)) end end}, V2131, V2135))), case V2171 of {'Idris.Prelude.Types.Left', E2239} -> (fun (V2172) -> {'Idris.Prelude.Types.Left', V2172} end(E2239)); {'Idris.Prelude.Types.Right', E2240} -> (fun (V2173) -> begin (V2174 = (('un--getNArgs'(V0, V2166, V2173, V2134))(V2135))), case V2174 of {'Idris.Prelude.Types.Left', E2241} -> (fun (V2175) -> {'Idris.Prelude.Types.Left', V2175} end(E2241)); {'Idris.Prelude.Types.Right', E2242} -> (fun (V2176) -> case V2176 of {'Idris.Compiler.CompileExpr.User', E2243, E2244} -> (fun (V2177, V2178) -> begin (V2180 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2179) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2166, V2179)) end, V2178))(V2135))), case V2180 of {'Idris.Prelude.Types.Left', E2245} -> (fun (V2181) -> {'Idris.Prelude.Types.Left', V2181} end(E2245)); {'Idris.Prelude.Types.Right', E2246} -> (fun (V2182) -> begin (V2184 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2183) -> ('un--nfToCFType'(V0, V2130, V2, V2183)) end, V2182))(V2135))), case V2184 of {'Idris.Prelude.Types.Left', E2247} -> (fun (V2185) -> {'Idris.Prelude.Types.Left', V2185} end(E2247)); {'Idris.Prelude.Types.Right', E2248} -> (fun (V2186) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V2173, V2186}} end(E2248)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2246)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2243, E2244)); {'Idris.Compiler.CompileExpr.Struct', E2249, E2250} -> (fun (V2187, V2188) -> begin (V2199 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2189) -> case V2189 of {'Idris.Builtin.MkPair', E2251, E2252} -> (fun (V2190, V2191) -> fun (V2192) -> begin (V2193 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2166, V2191))(V2192))), case V2193 of {'Idris.Prelude.Types.Left', E2253} -> (fun (V2194) -> {'Idris.Prelude.Types.Left', V2194} end(E2253)); {'Idris.Prelude.Types.Right', E2254} -> (fun (V2195) -> begin (V2196 = (('un--nfToCFType'(V0, V2130, 0, V2195))(V2192))), case V2196 of {'Idris.Prelude.Types.Left', E2255} -> (fun (V2197) -> {'Idris.Prelude.Types.Left', V2197} end(E2255)); {'Idris.Prelude.Types.Right', E2256} -> (fun (V2198) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V2190, V2198}} end(E2256)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2254)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2251, E2252)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V2188))(V2135))), case V2199 of {'Idris.Prelude.Types.Left', E2257} -> (fun (V2200) -> {'Idris.Prelude.Types.Left', V2200} end(E2257)); {'Idris.Prelude.Types.Right', E2258} -> (fun (V2201) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V2187, V2201}} end(E2258)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2249, E2250)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2259} -> (fun (V2202) -> begin (V2203 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2166, V2202))(V2135))), case V2203 of {'Idris.Prelude.Types.Left', E2260} -> (fun (V2204) -> {'Idris.Prelude.Types.Left', V2204} end(E2260)); {'Idris.Prelude.Types.Right', E2261} -> (fun (V2205) -> begin (V2206 = (('un--nfToCFType'(V0, V2130, V2, V2205))(V2135))), case V2206 of {'Idris.Prelude.Types.Left', E2262} -> (fun (V2207) -> {'Idris.Prelude.Types.Left', V2207} end(E2262)); {'Idris.Prelude.Types.Right', E2263} -> (fun (V2208) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V2208}} end(E2263)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2261)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2259)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2242)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2240)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2238)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2232, E2233, E2234, E2235, E2236)); {'Idris.Core.Value.NType', E2264} -> (fun (V2209) -> fun (V2210) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2264)); {'Idris.Core.Value.NErased', E2265, E2266} -> (fun (V2211, V2212) -> fun (V2213) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2265, E2266)); _ -> fun (V2214) -> begin (V2243 = begin (V2242 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V2215) -> fun (V2216) -> fun (V2217) -> fun (V2218) -> fun (V2219) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V2217, V2218, V2219)) end end end end end, fun (V2220) -> fun (V2221) -> fun (V2222) -> V2221 end end end, fun (V2223) -> fun (V2224) -> fun (V2225) -> fun (V2226) -> fun (V2227) -> begin (V2228 = (V2225(V2227))), begin (V2229 = (V2226(V2227))), (V2228(V2229)) end end end end end end end}, fun (V2230) -> fun (V2231) -> fun (V2232) -> fun (V2233) -> fun (V2234) -> begin (V2235 = (V2232(V2234))), ((V2233(V2235))(V2234)) end end end end end end, fun (V2236) -> fun (V2237) -> fun (V2238) -> begin (V2239 = (V2237(V2238))), (V2239(V2238)) end end end end}, fun (V2240) -> fun (V2241) -> V2241 end end}, V0))(V2214))), {'Idris.Prelude.Types.Right', V2242} end), case V2243 of {'Idris.Prelude.Types.Left', E2226} -> (fun (V2244) -> {'Idris.Prelude.Types.Left', V2244} end(E2226)); {'Idris.Prelude.Types.Right', E2227} -> (fun (V2245) -> begin (V2246 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V2245, {'Idris.Core.Env.Nil'}, V3, V2214))), case V2246 of {'Idris.Prelude.Types.Left', E2228} -> (fun (V2247) -> {'Idris.Prelude.Types.Left', V2247} end(E2228)); {'Idris.Prelude.Types.Right', E2229} -> (fun (V2248) -> begin (V2253 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V2249) -> fun (V2250) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V2249, V2250)) end end, fun (V2251) -> fun (V2252) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V2251, V2252)) end end}, V2248, V2214))), case V2253 of {'Idris.Prelude.Types.Left', E2230} -> (fun (V2254) -> {'Idris.Prelude.Types.Left', V2254} end(E2230)); {'Idris.Prelude.Types.Right', E2231} -> (fun (V2255) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V2255))))}, V2214)) end(E2231)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2229)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2227)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end; 0 -> case V3 of {'Idris.Core.Value.NPrimVal', E3338, E3339} -> (fun (V2256, V2257) -> case V2257 of {'Idris.Core.TT.StringType'} -> (fun () -> fun (V2258) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V1, <<"String not allowed in a foreign struct"/utf8>>}, V2258)) end end()); _ -> case V3 of {'Idris.Core.Value.NPrimVal', E3524, E3525} -> (fun (V2259, V2260) -> case V2260 of {'Idris.Core.TT.DoubleType'} -> (fun () -> fun (V2261) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFDouble'}} end end()); {'Idris.Core.TT.CharType'} -> (fun () -> fun (V2262) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFChar'}} end end()); {'Idris.Core.TT.WorldType'} -> (fun () -> fun (V2263) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFWorld'}} end end()); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E3608, E3609, E3610, E3611} -> (fun (V2264, V2265, V2266, V2267) -> case V2266 of {'Idris.Core.TT.Pi', E3653, E3654, E3655, E3656} -> (fun (V2268, V2269, V2270, V2271) -> fun (V2272) -> begin (V2301 = begin (V2300 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V2273) -> fun (V2274) -> fun (V2275) -> fun (V2276) -> fun (V2277) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V2275, V2276, V2277)) end end end end end, fun (V2278) -> fun (V2279) -> fun (V2280) -> V2279 end end end, fun (V2281) -> fun (V2282) -> fun (V2283) -> fun (V2284) -> fun (V2285) -> begin (V2286 = (V2283(V2285))), begin (V2287 = (V2284(V2285))), (V2286(V2287)) end end end end end end end}, fun (V2288) -> fun (V2289) -> fun (V2290) -> fun (V2291) -> fun (V2292) -> begin (V2293 = (V2290(V2292))), ((V2291(V2293))(V2292)) end end end end end end, fun (V2294) -> fun (V2295) -> fun (V2296) -> begin (V2297 = (V2295(V2296))), (V2297(V2296)) end end end end}, fun (V2298) -> fun (V2299) -> V2299 end end}, V0))(V2272))), {'Idris.Prelude.Types.Right', V2300} end), case V2301 of {'Idris.Prelude.Types.Left', E3657} -> (fun (V2302) -> {'Idris.Prelude.Types.Left', V2302} end(E3657)); {'Idris.Prelude.Types.Right', E3658} -> (fun (V2303) -> begin (V2304 = (('un--nfToCFType'(V0, V2264, 1, V2271))(V2272))), case V2304 of {'Idris.Prelude.Types.Left', E3659} -> (fun (V2305) -> {'Idris.Prelude.Types.Left', V2305} end(E3659)); {'Idris.Prelude.Types.Right', E3660} -> (fun (V2306) -> begin (V2307 = (((V2267(V2303))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V2264, 1}))))(V2272))), case V2307 of {'Idris.Prelude.Types.Left', E3661} -> (fun (V2308) -> {'Idris.Prelude.Types.Left', V2308} end(E3661)); {'Idris.Prelude.Types.Right', E3662} -> (fun (V2309) -> begin (V2310 = (('un--nfToCFType'(V0, V2264, 1, V2309))(V2272))), case V2310 of {'Idris.Prelude.Types.Left', E3663} -> (fun (V2311) -> {'Idris.Prelude.Types.Left', V2311} end(E3663)); {'Idris.Prelude.Types.Right', E3664} -> (fun (V2312) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V2306, V2312}} end(E3664)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3662)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3660)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3658)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3653, E3654, E3655, E3656)); _ -> case V3 of {'Idris.Core.Value.NTCon', E3618, E3619, E3620, E3621, E3622} -> (fun (V2313, V2314, V2315, V2316, V2317) -> fun (V2318) -> begin (V2347 = begin (V2346 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V2319) -> fun (V2320) -> fun (V2321) -> fun (V2322) -> fun (V2323) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V2321, V2322, V2323)) end end end end end, fun (V2324) -> fun (V2325) -> fun (V2326) -> V2325 end end end, fun (V2327) -> fun (V2328) -> fun (V2329) -> fun (V2330) -> fun (V2331) -> begin (V2332 = (V2329(V2331))), begin (V2333 = (V2330(V2331))), (V2332(V2333)) end end end end end end end}, fun (V2334) -> fun (V2335) -> fun (V2336) -> fun (V2337) -> fun (V2338) -> begin (V2339 = (V2336(V2338))), ((V2337(V2339))(V2338)) end end end end end end, fun (V2340) -> fun (V2341) -> fun (V2342) -> begin (V2343 = (V2341(V2342))), (V2343(V2342)) end end end end}, fun (V2344) -> fun (V2345) -> V2345 end end}, V0))(V2318))), {'Idris.Prelude.Types.Right', V2346} end), case V2347 of {'Idris.Prelude.Types.Left', E3623} -> (fun (V2348) -> {'Idris.Prelude.Types.Left', V2348} end(E3623)); {'Idris.Prelude.Types.Right', E3624} -> (fun (V2349) -> begin (V2354 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V2350) -> fun (V2351) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V2350, V2351)) end end, fun (V2352) -> fun (V2353) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V2352, V2353)) end end}, V2314, V2318))), case V2354 of {'Idris.Prelude.Types.Left', E3625} -> (fun (V2355) -> {'Idris.Prelude.Types.Left', V2355} end(E3625)); {'Idris.Prelude.Types.Right', E3626} -> (fun (V2356) -> begin (V2357 = (('un--getNArgs'(V0, V2349, V2356, V2317))(V2318))), case V2357 of {'Idris.Prelude.Types.Left', E3627} -> (fun (V2358) -> {'Idris.Prelude.Types.Left', V2358} end(E3627)); {'Idris.Prelude.Types.Right', E3628} -> (fun (V2359) -> case V2359 of {'Idris.Compiler.CompileExpr.User', E3629, E3630} -> (fun (V2360, V2361) -> begin (V2363 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2362) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2349, V2362)) end, V2361))(V2318))), case V2363 of {'Idris.Prelude.Types.Left', E3631} -> (fun (V2364) -> {'Idris.Prelude.Types.Left', V2364} end(E3631)); {'Idris.Prelude.Types.Right', E3632} -> (fun (V2365) -> begin (V2367 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2366) -> ('un--nfToCFType'(V0, V2313, V2, V2366)) end, V2365))(V2318))), case V2367 of {'Idris.Prelude.Types.Left', E3633} -> (fun (V2368) -> {'Idris.Prelude.Types.Left', V2368} end(E3633)); {'Idris.Prelude.Types.Right', E3634} -> (fun (V2369) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V2356, V2369}} end(E3634)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3632)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3629, E3630)); {'Idris.Compiler.CompileExpr.Struct', E3635, E3636} -> (fun (V2370, V2371) -> begin (V2382 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2372) -> case V2372 of {'Idris.Builtin.MkPair', E3637, E3638} -> (fun (V2373, V2374) -> fun (V2375) -> begin (V2376 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2349, V2374))(V2375))), case V2376 of {'Idris.Prelude.Types.Left', E3639} -> (fun (V2377) -> {'Idris.Prelude.Types.Left', V2377} end(E3639)); {'Idris.Prelude.Types.Right', E3640} -> (fun (V2378) -> begin (V2379 = (('un--nfToCFType'(V0, V2313, 0, V2378))(V2375))), case V2379 of {'Idris.Prelude.Types.Left', E3641} -> (fun (V2380) -> {'Idris.Prelude.Types.Left', V2380} end(E3641)); {'Idris.Prelude.Types.Right', E3642} -> (fun (V2381) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V2373, V2381}} end(E3642)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3640)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3637, E3638)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V2371))(V2318))), case V2382 of {'Idris.Prelude.Types.Left', E3643} -> (fun (V2383) -> {'Idris.Prelude.Types.Left', V2383} end(E3643)); {'Idris.Prelude.Types.Right', E3644} -> (fun (V2384) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V2370, V2384}} end(E3644)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3635, E3636)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E3645} -> (fun (V2385) -> begin (V2386 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2349, V2385))(V2318))), case V2386 of {'Idris.Prelude.Types.Left', E3646} -> (fun (V2387) -> {'Idris.Prelude.Types.Left', V2387} end(E3646)); {'Idris.Prelude.Types.Right', E3647} -> (fun (V2388) -> begin (V2389 = (('un--nfToCFType'(V0, V2313, V2, V2388))(V2318))), case V2389 of {'Idris.Prelude.Types.Left', E3648} -> (fun (V2390) -> {'Idris.Prelude.Types.Left', V2390} end(E3648)); {'Idris.Prelude.Types.Right', E3649} -> (fun (V2391) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V2391}} end(E3649)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3647)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3645)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E3628)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3626)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3624)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3618, E3619, E3620, E3621, E3622)); {'Idris.Core.Value.NType', E3650} -> (fun (V2392) -> fun (V2393) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E3650)); {'Idris.Core.Value.NErased', E3651, E3652} -> (fun (V2394, V2395) -> fun (V2396) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E3651, E3652)); _ -> fun (V2397) -> begin (V2426 = begin (V2425 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V2398) -> fun (V2399) -> fun (V2400) -> fun (V2401) -> fun (V2402) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V2400, V2401, V2402)) end end end end end, fun (V2403) -> fun (V2404) -> fun (V2405) -> V2404 end end end, fun (V2406) -> fun (V2407) -> fun (V2408) -> fun (V2409) -> fun (V2410) -> begin (V2411 = (V2408(V2410))), begin (V2412 = (V2409(V2410))), (V2411(V2412)) end end end end end end end}, fun (V2413) -> fun (V2414) -> fun (V2415) -> fun (V2416) -> fun (V2417) -> begin (V2418 = (V2415(V2417))), ((V2416(V2418))(V2417)) end end end end end end, fun (V2419) -> fun (V2420) -> fun (V2421) -> begin (V2422 = (V2420(V2421))), (V2422(V2421)) end end end end}, fun (V2423) -> fun (V2424) -> V2424 end end}, V0))(V2397))), {'Idris.Prelude.Types.Right', V2425} end), case V2426 of {'Idris.Prelude.Types.Left', E3612} -> (fun (V2427) -> {'Idris.Prelude.Types.Left', V2427} end(E3612)); {'Idris.Prelude.Types.Right', E3613} -> (fun (V2428) -> begin (V2429 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V2428, {'Idris.Core.Env.Nil'}, V3, V2397))), case V2429 of {'Idris.Prelude.Types.Left', E3614} -> (fun (V2430) -> {'Idris.Prelude.Types.Left', V2430} end(E3614)); {'Idris.Prelude.Types.Right', E3615} -> (fun (V2431) -> begin (V2436 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V2432) -> fun (V2433) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V2432, V2433)) end end, fun (V2434) -> fun (V2435) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V2434, V2435)) end end}, V2431, V2397))), case V2436 of {'Idris.Prelude.Types.Left', E3616} -> (fun (V2437) -> {'Idris.Prelude.Types.Left', V2437} end(E3616)); {'Idris.Prelude.Types.Right', E3617} -> (fun (V2438) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V2438))))}, V2397)) end(E3617)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3615)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3613)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E3608, E3609, E3610, E3611)); _ -> case V3 of {'Idris.Core.Value.NTCon', E3573, E3574, E3575, E3576, E3577} -> (fun (V2439, V2440, V2441, V2442, V2443) -> fun (V2444) -> begin (V2473 = begin (V2472 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V2445) -> fun (V2446) -> fun (V2447) -> fun (V2448) -> fun (V2449) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V2447, V2448, V2449)) end end end end end, fun (V2450) -> fun (V2451) -> fun (V2452) -> V2451 end end end, fun (V2453) -> fun (V2454) -> fun (V2455) -> fun (V2456) -> fun (V2457) -> begin (V2458 = (V2455(V2457))), begin (V2459 = (V2456(V2457))), (V2458(V2459)) end end end end end end end}, fun (V2460) -> fun (V2461) -> fun (V2462) -> fun (V2463) -> fun (V2464) -> begin (V2465 = (V2462(V2464))), ((V2463(V2465))(V2464)) end end end end end end, fun (V2466) -> fun (V2467) -> fun (V2468) -> begin (V2469 = (V2467(V2468))), (V2469(V2468)) end end end end}, fun (V2470) -> fun (V2471) -> V2471 end end}, V0))(V2444))), {'Idris.Prelude.Types.Right', V2472} end), case V2473 of {'Idris.Prelude.Types.Left', E3578} -> (fun (V2474) -> {'Idris.Prelude.Types.Left', V2474} end(E3578)); {'Idris.Prelude.Types.Right', E3579} -> (fun (V2475) -> begin (V2480 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V2476) -> fun (V2477) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V2476, V2477)) end end, fun (V2478) -> fun (V2479) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V2478, V2479)) end end}, V2440, V2444))), case V2480 of {'Idris.Prelude.Types.Left', E3580} -> (fun (V2481) -> {'Idris.Prelude.Types.Left', V2481} end(E3580)); {'Idris.Prelude.Types.Right', E3581} -> (fun (V2482) -> begin (V2483 = (('un--getNArgs'(V0, V2475, V2482, V2443))(V2444))), case V2483 of {'Idris.Prelude.Types.Left', E3582} -> (fun (V2484) -> {'Idris.Prelude.Types.Left', V2484} end(E3582)); {'Idris.Prelude.Types.Right', E3583} -> (fun (V2485) -> case V2485 of {'Idris.Compiler.CompileExpr.User', E3584, E3585} -> (fun (V2486, V2487) -> begin (V2489 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2488) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2475, V2488)) end, V2487))(V2444))), case V2489 of {'Idris.Prelude.Types.Left', E3586} -> (fun (V2490) -> {'Idris.Prelude.Types.Left', V2490} end(E3586)); {'Idris.Prelude.Types.Right', E3587} -> (fun (V2491) -> begin (V2493 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2492) -> ('un--nfToCFType'(V0, V2439, V2, V2492)) end, V2491))(V2444))), case V2493 of {'Idris.Prelude.Types.Left', E3588} -> (fun (V2494) -> {'Idris.Prelude.Types.Left', V2494} end(E3588)); {'Idris.Prelude.Types.Right', E3589} -> (fun (V2495) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V2482, V2495}} end(E3589)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3587)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3584, E3585)); {'Idris.Compiler.CompileExpr.Struct', E3590, E3591} -> (fun (V2496, V2497) -> begin (V2508 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2498) -> case V2498 of {'Idris.Builtin.MkPair', E3592, E3593} -> (fun (V2499, V2500) -> fun (V2501) -> begin (V2502 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2475, V2500))(V2501))), case V2502 of {'Idris.Prelude.Types.Left', E3594} -> (fun (V2503) -> {'Idris.Prelude.Types.Left', V2503} end(E3594)); {'Idris.Prelude.Types.Right', E3595} -> (fun (V2504) -> begin (V2505 = (('un--nfToCFType'(V0, V2439, 0, V2504))(V2501))), case V2505 of {'Idris.Prelude.Types.Left', E3596} -> (fun (V2506) -> {'Idris.Prelude.Types.Left', V2506} end(E3596)); {'Idris.Prelude.Types.Right', E3597} -> (fun (V2507) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V2499, V2507}} end(E3597)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3595)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3592, E3593)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V2497))(V2444))), case V2508 of {'Idris.Prelude.Types.Left', E3598} -> (fun (V2509) -> {'Idris.Prelude.Types.Left', V2509} end(E3598)); {'Idris.Prelude.Types.Right', E3599} -> (fun (V2510) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V2496, V2510}} end(E3599)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3590, E3591)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E3600} -> (fun (V2511) -> begin (V2512 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2475, V2511))(V2444))), case V2512 of {'Idris.Prelude.Types.Left', E3601} -> (fun (V2513) -> {'Idris.Prelude.Types.Left', V2513} end(E3601)); {'Idris.Prelude.Types.Right', E3602} -> (fun (V2514) -> begin (V2515 = (('un--nfToCFType'(V0, V2439, V2, V2514))(V2444))), case V2515 of {'Idris.Prelude.Types.Left', E3603} -> (fun (V2516) -> {'Idris.Prelude.Types.Left', V2516} end(E3603)); {'Idris.Prelude.Types.Right', E3604} -> (fun (V2517) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V2517}} end(E3604)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3602)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3600)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E3583)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3581)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3579)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3573, E3574, E3575, E3576, E3577)); {'Idris.Core.Value.NType', E3605} -> (fun (V2518) -> fun (V2519) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E3605)); {'Idris.Core.Value.NErased', E3606, E3607} -> (fun (V2520, V2521) -> fun (V2522) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E3606, E3607)); _ -> fun (V2523) -> begin (V2552 = begin (V2551 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V2524) -> fun (V2525) -> fun (V2526) -> fun (V2527) -> fun (V2528) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V2526, V2527, V2528)) end end end end end, fun (V2529) -> fun (V2530) -> fun (V2531) -> V2530 end end end, fun (V2532) -> fun (V2533) -> fun (V2534) -> fun (V2535) -> fun (V2536) -> begin (V2537 = (V2534(V2536))), begin (V2538 = (V2535(V2536))), (V2537(V2538)) end end end end end end end}, fun (V2539) -> fun (V2540) -> fun (V2541) -> fun (V2542) -> fun (V2543) -> begin (V2544 = (V2541(V2543))), ((V2542(V2544))(V2543)) end end end end end end, fun (V2545) -> fun (V2546) -> fun (V2547) -> begin (V2548 = (V2546(V2547))), (V2548(V2547)) end end end end}, fun (V2549) -> fun (V2550) -> V2550 end end}, V0))(V2523))), {'Idris.Prelude.Types.Right', V2551} end), case V2552 of {'Idris.Prelude.Types.Left', E3567} -> (fun (V2553) -> {'Idris.Prelude.Types.Left', V2553} end(E3567)); {'Idris.Prelude.Types.Right', E3568} -> (fun (V2554) -> begin (V2555 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V2554, {'Idris.Core.Env.Nil'}, V3, V2523))), case V2555 of {'Idris.Prelude.Types.Left', E3569} -> (fun (V2556) -> {'Idris.Prelude.Types.Left', V2556} end(E3569)); {'Idris.Prelude.Types.Right', E3570} -> (fun (V2557) -> begin (V2562 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V2558) -> fun (V2559) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V2558, V2559)) end end, fun (V2560) -> fun (V2561) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V2560, V2561)) end end}, V2557, V2523))), case V2562 of {'Idris.Prelude.Types.Left', E3571} -> (fun (V2563) -> {'Idris.Prelude.Types.Left', V2563} end(E3571)); {'Idris.Prelude.Types.Right', E3572} -> (fun (V2564) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V2564))))}, V2523)) end(E3572)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3570)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3568)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E3706, E3707, E3708, E3709} -> (fun (V2565, V2566, V2567, V2568) -> fun (V2569) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V2565, <<"Function types not allowed in a foreign struct"/utf8>>}, V2569)) end end(E3706, E3707, E3708, E3709)); _ -> case V3 of {'Idris.Core.Value.NTCon', E3671, E3672, E3673, E3674, E3675} -> (fun (V2570, V2571, V2572, V2573, V2574) -> fun (V2575) -> begin (V2604 = begin (V2603 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V2576) -> fun (V2577) -> fun (V2578) -> fun (V2579) -> fun (V2580) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V2578, V2579, V2580)) end end end end end, fun (V2581) -> fun (V2582) -> fun (V2583) -> V2582 end end end, fun (V2584) -> fun (V2585) -> fun (V2586) -> fun (V2587) -> fun (V2588) -> begin (V2589 = (V2586(V2588))), begin (V2590 = (V2587(V2588))), (V2589(V2590)) end end end end end end end}, fun (V2591) -> fun (V2592) -> fun (V2593) -> fun (V2594) -> fun (V2595) -> begin (V2596 = (V2593(V2595))), ((V2594(V2596))(V2595)) end end end end end end, fun (V2597) -> fun (V2598) -> fun (V2599) -> begin (V2600 = (V2598(V2599))), (V2600(V2599)) end end end end}, fun (V2601) -> fun (V2602) -> V2602 end end}, V0))(V2575))), {'Idris.Prelude.Types.Right', V2603} end), case V2604 of {'Idris.Prelude.Types.Left', E3676} -> (fun (V2605) -> {'Idris.Prelude.Types.Left', V2605} end(E3676)); {'Idris.Prelude.Types.Right', E3677} -> (fun (V2606) -> begin (V2611 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V2607) -> fun (V2608) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V2607, V2608)) end end, fun (V2609) -> fun (V2610) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V2609, V2610)) end end}, V2571, V2575))), case V2611 of {'Idris.Prelude.Types.Left', E3678} -> (fun (V2612) -> {'Idris.Prelude.Types.Left', V2612} end(E3678)); {'Idris.Prelude.Types.Right', E3679} -> (fun (V2613) -> begin (V2614 = (('un--getNArgs'(V0, V2606, V2613, V2574))(V2575))), case V2614 of {'Idris.Prelude.Types.Left', E3680} -> (fun (V2615) -> {'Idris.Prelude.Types.Left', V2615} end(E3680)); {'Idris.Prelude.Types.Right', E3681} -> (fun (V2616) -> case V2616 of {'Idris.Compiler.CompileExpr.User', E3682, E3683} -> (fun (V2617, V2618) -> begin (V2620 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2619) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2606, V2619)) end, V2618))(V2575))), case V2620 of {'Idris.Prelude.Types.Left', E3684} -> (fun (V2621) -> {'Idris.Prelude.Types.Left', V2621} end(E3684)); {'Idris.Prelude.Types.Right', E3685} -> (fun (V2622) -> begin (V2624 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2623) -> ('un--nfToCFType'(V0, V2570, V2, V2623)) end, V2622))(V2575))), case V2624 of {'Idris.Prelude.Types.Left', E3686} -> (fun (V2625) -> {'Idris.Prelude.Types.Left', V2625} end(E3686)); {'Idris.Prelude.Types.Right', E3687} -> (fun (V2626) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V2613, V2626}} end(E3687)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3685)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3682, E3683)); {'Idris.Compiler.CompileExpr.Struct', E3688, E3689} -> (fun (V2627, V2628) -> begin (V2639 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2629) -> case V2629 of {'Idris.Builtin.MkPair', E3690, E3691} -> (fun (V2630, V2631) -> fun (V2632) -> begin (V2633 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2606, V2631))(V2632))), case V2633 of {'Idris.Prelude.Types.Left', E3692} -> (fun (V2634) -> {'Idris.Prelude.Types.Left', V2634} end(E3692)); {'Idris.Prelude.Types.Right', E3693} -> (fun (V2635) -> begin (V2636 = (('un--nfToCFType'(V0, V2570, 0, V2635))(V2632))), case V2636 of {'Idris.Prelude.Types.Left', E3694} -> (fun (V2637) -> {'Idris.Prelude.Types.Left', V2637} end(E3694)); {'Idris.Prelude.Types.Right', E3695} -> (fun (V2638) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V2630, V2638}} end(E3695)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3693)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3690, E3691)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V2628))(V2575))), case V2639 of {'Idris.Prelude.Types.Left', E3696} -> (fun (V2640) -> {'Idris.Prelude.Types.Left', V2640} end(E3696)); {'Idris.Prelude.Types.Right', E3697} -> (fun (V2641) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V2627, V2641}} end(E3697)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3688, E3689)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E3698} -> (fun (V2642) -> begin (V2643 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2606, V2642))(V2575))), case V2643 of {'Idris.Prelude.Types.Left', E3699} -> (fun (V2644) -> {'Idris.Prelude.Types.Left', V2644} end(E3699)); {'Idris.Prelude.Types.Right', E3700} -> (fun (V2645) -> begin (V2646 = (('un--nfToCFType'(V0, V2570, V2, V2645))(V2575))), case V2646 of {'Idris.Prelude.Types.Left', E3701} -> (fun (V2647) -> {'Idris.Prelude.Types.Left', V2647} end(E3701)); {'Idris.Prelude.Types.Right', E3702} -> (fun (V2648) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V2648}} end(E3702)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3700)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3698)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E3681)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3679)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3677)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3671, E3672, E3673, E3674, E3675)); {'Idris.Core.Value.NType', E3703} -> (fun (V2649) -> fun (V2650) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E3703)); {'Idris.Core.Value.NErased', E3704, E3705} -> (fun (V2651, V2652) -> fun (V2653) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E3704, E3705)); _ -> fun (V2654) -> begin (V2683 = begin (V2682 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V2655) -> fun (V2656) -> fun (V2657) -> fun (V2658) -> fun (V2659) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V2657, V2658, V2659)) end end end end end, fun (V2660) -> fun (V2661) -> fun (V2662) -> V2661 end end end, fun (V2663) -> fun (V2664) -> fun (V2665) -> fun (V2666) -> fun (V2667) -> begin (V2668 = (V2665(V2667))), begin (V2669 = (V2666(V2667))), (V2668(V2669)) end end end end end end end}, fun (V2670) -> fun (V2671) -> fun (V2672) -> fun (V2673) -> fun (V2674) -> begin (V2675 = (V2672(V2674))), ((V2673(V2675))(V2674)) end end end end end end, fun (V2676) -> fun (V2677) -> fun (V2678) -> begin (V2679 = (V2677(V2678))), (V2679(V2678)) end end end end}, fun (V2680) -> fun (V2681) -> V2681 end end}, V0))(V2654))), {'Idris.Prelude.Types.Right', V2682} end), case V2683 of {'Idris.Prelude.Types.Left', E3665} -> (fun (V2684) -> {'Idris.Prelude.Types.Left', V2684} end(E3665)); {'Idris.Prelude.Types.Right', E3666} -> (fun (V2685) -> begin (V2686 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V2685, {'Idris.Core.Env.Nil'}, V3, V2654))), case V2686 of {'Idris.Prelude.Types.Left', E3667} -> (fun (V2687) -> {'Idris.Prelude.Types.Left', V2687} end(E3667)); {'Idris.Prelude.Types.Right', E3668} -> (fun (V2688) -> begin (V2693 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V2689) -> fun (V2690) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V2689, V2690)) end end, fun (V2691) -> fun (V2692) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V2691, V2692)) end end}, V2688, V2654))), case V2693 of {'Idris.Prelude.Types.Left', E3669} -> (fun (V2694) -> {'Idris.Prelude.Types.Left', V2694} end(E3669)); {'Idris.Prelude.Types.Right', E3670} -> (fun (V2695) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V2695))))}, V2654)) end(E3670)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3668)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3666)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E3532, E3533, E3534, E3535, E3536} -> (fun (V2696, V2697, V2698, V2699, V2700) -> fun (V2701) -> begin (V2730 = begin (V2729 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V2702) -> fun (V2703) -> fun (V2704) -> fun (V2705) -> fun (V2706) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V2704, V2705, V2706)) end end end end end, fun (V2707) -> fun (V2708) -> fun (V2709) -> V2708 end end end, fun (V2710) -> fun (V2711) -> fun (V2712) -> fun (V2713) -> fun (V2714) -> begin (V2715 = (V2712(V2714))), begin (V2716 = (V2713(V2714))), (V2715(V2716)) end end end end end end end}, fun (V2717) -> fun (V2718) -> fun (V2719) -> fun (V2720) -> fun (V2721) -> begin (V2722 = (V2719(V2721))), ((V2720(V2722))(V2721)) end end end end end end, fun (V2723) -> fun (V2724) -> fun (V2725) -> begin (V2726 = (V2724(V2725))), (V2726(V2725)) end end end end}, fun (V2727) -> fun (V2728) -> V2728 end end}, V0))(V2701))), {'Idris.Prelude.Types.Right', V2729} end), case V2730 of {'Idris.Prelude.Types.Left', E3537} -> (fun (V2731) -> {'Idris.Prelude.Types.Left', V2731} end(E3537)); {'Idris.Prelude.Types.Right', E3538} -> (fun (V2732) -> begin (V2737 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V2733) -> fun (V2734) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V2733, V2734)) end end, fun (V2735) -> fun (V2736) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V2735, V2736)) end end}, V2697, V2701))), case V2737 of {'Idris.Prelude.Types.Left', E3539} -> (fun (V2738) -> {'Idris.Prelude.Types.Left', V2738} end(E3539)); {'Idris.Prelude.Types.Right', E3540} -> (fun (V2739) -> begin (V2740 = (('un--getNArgs'(V0, V2732, V2739, V2700))(V2701))), case V2740 of {'Idris.Prelude.Types.Left', E3541} -> (fun (V2741) -> {'Idris.Prelude.Types.Left', V2741} end(E3541)); {'Idris.Prelude.Types.Right', E3542} -> (fun (V2742) -> case V2742 of {'Idris.Compiler.CompileExpr.User', E3543, E3544} -> (fun (V2743, V2744) -> begin (V2746 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2745) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2732, V2745)) end, V2744))(V2701))), case V2746 of {'Idris.Prelude.Types.Left', E3545} -> (fun (V2747) -> {'Idris.Prelude.Types.Left', V2747} end(E3545)); {'Idris.Prelude.Types.Right', E3546} -> (fun (V2748) -> begin (V2750 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2749) -> ('un--nfToCFType'(V0, V2696, V2, V2749)) end, V2748))(V2701))), case V2750 of {'Idris.Prelude.Types.Left', E3547} -> (fun (V2751) -> {'Idris.Prelude.Types.Left', V2751} end(E3547)); {'Idris.Prelude.Types.Right', E3548} -> (fun (V2752) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V2739, V2752}} end(E3548)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3546)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3543, E3544)); {'Idris.Compiler.CompileExpr.Struct', E3549, E3550} -> (fun (V2753, V2754) -> begin (V2765 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2755) -> case V2755 of {'Idris.Builtin.MkPair', E3551, E3552} -> (fun (V2756, V2757) -> fun (V2758) -> begin (V2759 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2732, V2757))(V2758))), case V2759 of {'Idris.Prelude.Types.Left', E3553} -> (fun (V2760) -> {'Idris.Prelude.Types.Left', V2760} end(E3553)); {'Idris.Prelude.Types.Right', E3554} -> (fun (V2761) -> begin (V2762 = (('un--nfToCFType'(V0, V2696, 0, V2761))(V2758))), case V2762 of {'Idris.Prelude.Types.Left', E3555} -> (fun (V2763) -> {'Idris.Prelude.Types.Left', V2763} end(E3555)); {'Idris.Prelude.Types.Right', E3556} -> (fun (V2764) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V2756, V2764}} end(E3556)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3554)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3551, E3552)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V2754))(V2701))), case V2765 of {'Idris.Prelude.Types.Left', E3557} -> (fun (V2766) -> {'Idris.Prelude.Types.Left', V2766} end(E3557)); {'Idris.Prelude.Types.Right', E3558} -> (fun (V2767) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V2753, V2767}} end(E3558)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3549, E3550)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E3559} -> (fun (V2768) -> begin (V2769 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2732, V2768))(V2701))), case V2769 of {'Idris.Prelude.Types.Left', E3560} -> (fun (V2770) -> {'Idris.Prelude.Types.Left', V2770} end(E3560)); {'Idris.Prelude.Types.Right', E3561} -> (fun (V2771) -> begin (V2772 = (('un--nfToCFType'(V0, V2696, V2, V2771))(V2701))), case V2772 of {'Idris.Prelude.Types.Left', E3562} -> (fun (V2773) -> {'Idris.Prelude.Types.Left', V2773} end(E3562)); {'Idris.Prelude.Types.Right', E3563} -> (fun (V2774) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V2774}} end(E3563)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3561)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3559)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E3542)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3540)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3538)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3532, E3533, E3534, E3535, E3536)); {'Idris.Core.Value.NType', E3564} -> (fun (V2775) -> fun (V2776) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E3564)); {'Idris.Core.Value.NErased', E3565, E3566} -> (fun (V2777, V2778) -> fun (V2779) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E3565, E3566)); _ -> fun (V2780) -> begin (V2809 = begin (V2808 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V2781) -> fun (V2782) -> fun (V2783) -> fun (V2784) -> fun (V2785) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V2783, V2784, V2785)) end end end end end, fun (V2786) -> fun (V2787) -> fun (V2788) -> V2787 end end end, fun (V2789) -> fun (V2790) -> fun (V2791) -> fun (V2792) -> fun (V2793) -> begin (V2794 = (V2791(V2793))), begin (V2795 = (V2792(V2793))), (V2794(V2795)) end end end end end end end}, fun (V2796) -> fun (V2797) -> fun (V2798) -> fun (V2799) -> fun (V2800) -> begin (V2801 = (V2798(V2800))), ((V2799(V2801))(V2800)) end end end end end end, fun (V2802) -> fun (V2803) -> fun (V2804) -> begin (V2805 = (V2803(V2804))), (V2805(V2804)) end end end end}, fun (V2806) -> fun (V2807) -> V2807 end end}, V0))(V2780))), {'Idris.Prelude.Types.Right', V2808} end), case V2809 of {'Idris.Prelude.Types.Left', E3526} -> (fun (V2810) -> {'Idris.Prelude.Types.Left', V2810} end(E3526)); {'Idris.Prelude.Types.Right', E3527} -> (fun (V2811) -> begin (V2812 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V2811, {'Idris.Core.Env.Nil'}, V3, V2780))), case V2812 of {'Idris.Prelude.Types.Left', E3528} -> (fun (V2813) -> {'Idris.Prelude.Types.Left', V2813} end(E3528)); {'Idris.Prelude.Types.Right', E3529} -> (fun (V2814) -> begin (V2819 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V2815) -> fun (V2816) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V2815, V2816)) end end, fun (V2817) -> fun (V2818) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V2817, V2818)) end end}, V2814, V2780))), case V2819 of {'Idris.Prelude.Types.Left', E3530} -> (fun (V2820) -> {'Idris.Prelude.Types.Left', V2820} end(E3530)); {'Idris.Prelude.Types.Right', E3531} -> (fun (V2821) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V2821))))}, V2780)) end(E3531)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3529)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3527)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end(E3524, E3525)); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E3422, E3423, E3424, E3425} -> (fun (V2822, V2823, V2824, V2825) -> case V2824 of {'Idris.Core.TT.Pi', E3467, E3468, E3469, E3470} -> (fun (V2826, V2827, V2828, V2829) -> fun (V2830) -> begin (V2859 = begin (V2858 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V2831) -> fun (V2832) -> fun (V2833) -> fun (V2834) -> fun (V2835) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V2833, V2834, V2835)) end end end end end, fun (V2836) -> fun (V2837) -> fun (V2838) -> V2837 end end end, fun (V2839) -> fun (V2840) -> fun (V2841) -> fun (V2842) -> fun (V2843) -> begin (V2844 = (V2841(V2843))), begin (V2845 = (V2842(V2843))), (V2844(V2845)) end end end end end end end}, fun (V2846) -> fun (V2847) -> fun (V2848) -> fun (V2849) -> fun (V2850) -> begin (V2851 = (V2848(V2850))), ((V2849(V2851))(V2850)) end end end end end end, fun (V2852) -> fun (V2853) -> fun (V2854) -> begin (V2855 = (V2853(V2854))), (V2855(V2854)) end end end end}, fun (V2856) -> fun (V2857) -> V2857 end end}, V0))(V2830))), {'Idris.Prelude.Types.Right', V2858} end), case V2859 of {'Idris.Prelude.Types.Left', E3471} -> (fun (V2860) -> {'Idris.Prelude.Types.Left', V2860} end(E3471)); {'Idris.Prelude.Types.Right', E3472} -> (fun (V2861) -> begin (V2862 = (('un--nfToCFType'(V0, V2822, 1, V2829))(V2830))), case V2862 of {'Idris.Prelude.Types.Left', E3473} -> (fun (V2863) -> {'Idris.Prelude.Types.Left', V2863} end(E3473)); {'Idris.Prelude.Types.Right', E3474} -> (fun (V2864) -> begin (V2865 = (((V2825(V2861))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V2822, 1}))))(V2830))), case V2865 of {'Idris.Prelude.Types.Left', E3475} -> (fun (V2866) -> {'Idris.Prelude.Types.Left', V2866} end(E3475)); {'Idris.Prelude.Types.Right', E3476} -> (fun (V2867) -> begin (V2868 = (('un--nfToCFType'(V0, V2822, 1, V2867))(V2830))), case V2868 of {'Idris.Prelude.Types.Left', E3477} -> (fun (V2869) -> {'Idris.Prelude.Types.Left', V2869} end(E3477)); {'Idris.Prelude.Types.Right', E3478} -> (fun (V2870) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V2864, V2870}} end(E3478)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3476)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3474)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3472)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3467, E3468, E3469, E3470)); _ -> case V3 of {'Idris.Core.Value.NTCon', E3432, E3433, E3434, E3435, E3436} -> (fun (V2871, V2872, V2873, V2874, V2875) -> fun (V2876) -> begin (V2905 = begin (V2904 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V2877) -> fun (V2878) -> fun (V2879) -> fun (V2880) -> fun (V2881) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V2879, V2880, V2881)) end end end end end, fun (V2882) -> fun (V2883) -> fun (V2884) -> V2883 end end end, fun (V2885) -> fun (V2886) -> fun (V2887) -> fun (V2888) -> fun (V2889) -> begin (V2890 = (V2887(V2889))), begin (V2891 = (V2888(V2889))), (V2890(V2891)) end end end end end end end}, fun (V2892) -> fun (V2893) -> fun (V2894) -> fun (V2895) -> fun (V2896) -> begin (V2897 = (V2894(V2896))), ((V2895(V2897))(V2896)) end end end end end end, fun (V2898) -> fun (V2899) -> fun (V2900) -> begin (V2901 = (V2899(V2900))), (V2901(V2900)) end end end end}, fun (V2902) -> fun (V2903) -> V2903 end end}, V0))(V2876))), {'Idris.Prelude.Types.Right', V2904} end), case V2905 of {'Idris.Prelude.Types.Left', E3437} -> (fun (V2906) -> {'Idris.Prelude.Types.Left', V2906} end(E3437)); {'Idris.Prelude.Types.Right', E3438} -> (fun (V2907) -> begin (V2912 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V2908) -> fun (V2909) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V2908, V2909)) end end, fun (V2910) -> fun (V2911) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V2910, V2911)) end end}, V2872, V2876))), case V2912 of {'Idris.Prelude.Types.Left', E3439} -> (fun (V2913) -> {'Idris.Prelude.Types.Left', V2913} end(E3439)); {'Idris.Prelude.Types.Right', E3440} -> (fun (V2914) -> begin (V2915 = (('un--getNArgs'(V0, V2907, V2914, V2875))(V2876))), case V2915 of {'Idris.Prelude.Types.Left', E3441} -> (fun (V2916) -> {'Idris.Prelude.Types.Left', V2916} end(E3441)); {'Idris.Prelude.Types.Right', E3442} -> (fun (V2917) -> case V2917 of {'Idris.Compiler.CompileExpr.User', E3443, E3444} -> (fun (V2918, V2919) -> begin (V2921 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2920) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2907, V2920)) end, V2919))(V2876))), case V2921 of {'Idris.Prelude.Types.Left', E3445} -> (fun (V2922) -> {'Idris.Prelude.Types.Left', V2922} end(E3445)); {'Idris.Prelude.Types.Right', E3446} -> (fun (V2923) -> begin (V2925 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2924) -> ('un--nfToCFType'(V0, V2871, V2, V2924)) end, V2923))(V2876))), case V2925 of {'Idris.Prelude.Types.Left', E3447} -> (fun (V2926) -> {'Idris.Prelude.Types.Left', V2926} end(E3447)); {'Idris.Prelude.Types.Right', E3448} -> (fun (V2927) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V2914, V2927}} end(E3448)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3446)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3443, E3444)); {'Idris.Compiler.CompileExpr.Struct', E3449, E3450} -> (fun (V2928, V2929) -> begin (V2940 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V2930) -> case V2930 of {'Idris.Builtin.MkPair', E3451, E3452} -> (fun (V2931, V2932) -> fun (V2933) -> begin (V2934 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2907, V2932))(V2933))), case V2934 of {'Idris.Prelude.Types.Left', E3453} -> (fun (V2935) -> {'Idris.Prelude.Types.Left', V2935} end(E3453)); {'Idris.Prelude.Types.Right', E3454} -> (fun (V2936) -> begin (V2937 = (('un--nfToCFType'(V0, V2871, 0, V2936))(V2933))), case V2937 of {'Idris.Prelude.Types.Left', E3455} -> (fun (V2938) -> {'Idris.Prelude.Types.Left', V2938} end(E3455)); {'Idris.Prelude.Types.Right', E3456} -> (fun (V2939) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V2931, V2939}} end(E3456)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3454)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3451, E3452)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V2929))(V2876))), case V2940 of {'Idris.Prelude.Types.Left', E3457} -> (fun (V2941) -> {'Idris.Prelude.Types.Left', V2941} end(E3457)); {'Idris.Prelude.Types.Right', E3458} -> (fun (V2942) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V2928, V2942}} end(E3458)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3449, E3450)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E3459} -> (fun (V2943) -> begin (V2944 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V2907, V2943))(V2876))), case V2944 of {'Idris.Prelude.Types.Left', E3460} -> (fun (V2945) -> {'Idris.Prelude.Types.Left', V2945} end(E3460)); {'Idris.Prelude.Types.Right', E3461} -> (fun (V2946) -> begin (V2947 = (('un--nfToCFType'(V0, V2871, V2, V2946))(V2876))), case V2947 of {'Idris.Prelude.Types.Left', E3462} -> (fun (V2948) -> {'Idris.Prelude.Types.Left', V2948} end(E3462)); {'Idris.Prelude.Types.Right', E3463} -> (fun (V2949) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V2949}} end(E3463)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3461)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3459)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E3442)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3440)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3438)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3432, E3433, E3434, E3435, E3436)); {'Idris.Core.Value.NType', E3464} -> (fun (V2950) -> fun (V2951) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E3464)); {'Idris.Core.Value.NErased', E3465, E3466} -> (fun (V2952, V2953) -> fun (V2954) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E3465, E3466)); _ -> fun (V2955) -> begin (V2984 = begin (V2983 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V2956) -> fun (V2957) -> fun (V2958) -> fun (V2959) -> fun (V2960) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V2958, V2959, V2960)) end end end end end, fun (V2961) -> fun (V2962) -> fun (V2963) -> V2962 end end end, fun (V2964) -> fun (V2965) -> fun (V2966) -> fun (V2967) -> fun (V2968) -> begin (V2969 = (V2966(V2968))), begin (V2970 = (V2967(V2968))), (V2969(V2970)) end end end end end end end}, fun (V2971) -> fun (V2972) -> fun (V2973) -> fun (V2974) -> fun (V2975) -> begin (V2976 = (V2973(V2975))), ((V2974(V2976))(V2975)) end end end end end end, fun (V2977) -> fun (V2978) -> fun (V2979) -> begin (V2980 = (V2978(V2979))), (V2980(V2979)) end end end end}, fun (V2981) -> fun (V2982) -> V2982 end end}, V0))(V2955))), {'Idris.Prelude.Types.Right', V2983} end), case V2984 of {'Idris.Prelude.Types.Left', E3426} -> (fun (V2985) -> {'Idris.Prelude.Types.Left', V2985} end(E3426)); {'Idris.Prelude.Types.Right', E3427} -> (fun (V2986) -> begin (V2987 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V2986, {'Idris.Core.Env.Nil'}, V3, V2955))), case V2987 of {'Idris.Prelude.Types.Left', E3428} -> (fun (V2988) -> {'Idris.Prelude.Types.Left', V2988} end(E3428)); {'Idris.Prelude.Types.Right', E3429} -> (fun (V2989) -> begin (V2994 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V2990) -> fun (V2991) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V2990, V2991)) end end, fun (V2992) -> fun (V2993) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V2992, V2993)) end end}, V2989, V2955))), case V2994 of {'Idris.Prelude.Types.Left', E3430} -> (fun (V2995) -> {'Idris.Prelude.Types.Left', V2995} end(E3430)); {'Idris.Prelude.Types.Right', E3431} -> (fun (V2996) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V2996))))}, V2955)) end(E3431)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3429)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3427)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E3422, E3423, E3424, E3425)); _ -> case V3 of {'Idris.Core.Value.NTCon', E3387, E3388, E3389, E3390, E3391} -> (fun (V2997, V2998, V2999, V3000, V3001) -> fun (V3002) -> begin (V3031 = begin (V3030 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3003) -> fun (V3004) -> fun (V3005) -> fun (V3006) -> fun (V3007) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V3005, V3006, V3007)) end end end end end, fun (V3008) -> fun (V3009) -> fun (V3010) -> V3009 end end end, fun (V3011) -> fun (V3012) -> fun (V3013) -> fun (V3014) -> fun (V3015) -> begin (V3016 = (V3013(V3015))), begin (V3017 = (V3014(V3015))), (V3016(V3017)) end end end end end end end}, fun (V3018) -> fun (V3019) -> fun (V3020) -> fun (V3021) -> fun (V3022) -> begin (V3023 = (V3020(V3022))), ((V3021(V3023))(V3022)) end end end end end end, fun (V3024) -> fun (V3025) -> fun (V3026) -> begin (V3027 = (V3025(V3026))), (V3027(V3026)) end end end end}, fun (V3028) -> fun (V3029) -> V3029 end end}, V0))(V3002))), {'Idris.Prelude.Types.Right', V3030} end), case V3031 of {'Idris.Prelude.Types.Left', E3392} -> (fun (V3032) -> {'Idris.Prelude.Types.Left', V3032} end(E3392)); {'Idris.Prelude.Types.Right', E3393} -> (fun (V3033) -> begin (V3038 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V3034) -> fun (V3035) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V3034, V3035)) end end, fun (V3036) -> fun (V3037) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V3036, V3037)) end end}, V2998, V3002))), case V3038 of {'Idris.Prelude.Types.Left', E3394} -> (fun (V3039) -> {'Idris.Prelude.Types.Left', V3039} end(E3394)); {'Idris.Prelude.Types.Right', E3395} -> (fun (V3040) -> begin (V3041 = (('un--getNArgs'(V0, V3033, V3040, V3001))(V3002))), case V3041 of {'Idris.Prelude.Types.Left', E3396} -> (fun (V3042) -> {'Idris.Prelude.Types.Left', V3042} end(E3396)); {'Idris.Prelude.Types.Right', E3397} -> (fun (V3043) -> case V3043 of {'Idris.Compiler.CompileExpr.User', E3398, E3399} -> (fun (V3044, V3045) -> begin (V3047 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3046) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3033, V3046)) end, V3045))(V3002))), case V3047 of {'Idris.Prelude.Types.Left', E3400} -> (fun (V3048) -> {'Idris.Prelude.Types.Left', V3048} end(E3400)); {'Idris.Prelude.Types.Right', E3401} -> (fun (V3049) -> begin (V3051 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3050) -> ('un--nfToCFType'(V0, V2997, V2, V3050)) end, V3049))(V3002))), case V3051 of {'Idris.Prelude.Types.Left', E3402} -> (fun (V3052) -> {'Idris.Prelude.Types.Left', V3052} end(E3402)); {'Idris.Prelude.Types.Right', E3403} -> (fun (V3053) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V3040, V3053}} end(E3403)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3401)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3398, E3399)); {'Idris.Compiler.CompileExpr.Struct', E3404, E3405} -> (fun (V3054, V3055) -> begin (V3066 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3056) -> case V3056 of {'Idris.Builtin.MkPair', E3406, E3407} -> (fun (V3057, V3058) -> fun (V3059) -> begin (V3060 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3033, V3058))(V3059))), case V3060 of {'Idris.Prelude.Types.Left', E3408} -> (fun (V3061) -> {'Idris.Prelude.Types.Left', V3061} end(E3408)); {'Idris.Prelude.Types.Right', E3409} -> (fun (V3062) -> begin (V3063 = (('un--nfToCFType'(V0, V2997, 0, V3062))(V3059))), case V3063 of {'Idris.Prelude.Types.Left', E3410} -> (fun (V3064) -> {'Idris.Prelude.Types.Left', V3064} end(E3410)); {'Idris.Prelude.Types.Right', E3411} -> (fun (V3065) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V3057, V3065}} end(E3411)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3409)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3406, E3407)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V3055))(V3002))), case V3066 of {'Idris.Prelude.Types.Left', E3412} -> (fun (V3067) -> {'Idris.Prelude.Types.Left', V3067} end(E3412)); {'Idris.Prelude.Types.Right', E3413} -> (fun (V3068) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V3054, V3068}} end(E3413)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3404, E3405)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E3414} -> (fun (V3069) -> begin (V3070 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3033, V3069))(V3002))), case V3070 of {'Idris.Prelude.Types.Left', E3415} -> (fun (V3071) -> {'Idris.Prelude.Types.Left', V3071} end(E3415)); {'Idris.Prelude.Types.Right', E3416} -> (fun (V3072) -> begin (V3073 = (('un--nfToCFType'(V0, V2997, V2, V3072))(V3002))), case V3073 of {'Idris.Prelude.Types.Left', E3417} -> (fun (V3074) -> {'Idris.Prelude.Types.Left', V3074} end(E3417)); {'Idris.Prelude.Types.Right', E3418} -> (fun (V3075) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V3075}} end(E3418)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3416)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3414)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E3397)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3395)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3393)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3387, E3388, E3389, E3390, E3391)); {'Idris.Core.Value.NType', E3419} -> (fun (V3076) -> fun (V3077) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E3419)); {'Idris.Core.Value.NErased', E3420, E3421} -> (fun (V3078, V3079) -> fun (V3080) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E3420, E3421)); _ -> fun (V3081) -> begin (V3110 = begin (V3109 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3082) -> fun (V3083) -> fun (V3084) -> fun (V3085) -> fun (V3086) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V3084, V3085, V3086)) end end end end end, fun (V3087) -> fun (V3088) -> fun (V3089) -> V3088 end end end, fun (V3090) -> fun (V3091) -> fun (V3092) -> fun (V3093) -> fun (V3094) -> begin (V3095 = (V3092(V3094))), begin (V3096 = (V3093(V3094))), (V3095(V3096)) end end end end end end end}, fun (V3097) -> fun (V3098) -> fun (V3099) -> fun (V3100) -> fun (V3101) -> begin (V3102 = (V3099(V3101))), ((V3100(V3102))(V3101)) end end end end end end, fun (V3103) -> fun (V3104) -> fun (V3105) -> begin (V3106 = (V3104(V3105))), (V3106(V3105)) end end end end}, fun (V3107) -> fun (V3108) -> V3108 end end}, V0))(V3081))), {'Idris.Prelude.Types.Right', V3109} end), case V3110 of {'Idris.Prelude.Types.Left', E3381} -> (fun (V3111) -> {'Idris.Prelude.Types.Left', V3111} end(E3381)); {'Idris.Prelude.Types.Right', E3382} -> (fun (V3112) -> begin (V3113 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V3112, {'Idris.Core.Env.Nil'}, V3, V3081))), case V3113 of {'Idris.Prelude.Types.Left', E3383} -> (fun (V3114) -> {'Idris.Prelude.Types.Left', V3114} end(E3383)); {'Idris.Prelude.Types.Right', E3384} -> (fun (V3115) -> begin (V3120 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V3116) -> fun (V3117) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V3116, V3117)) end end, fun (V3118) -> fun (V3119) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V3118, V3119)) end end}, V3115, V3081))), case V3120 of {'Idris.Prelude.Types.Left', E3385} -> (fun (V3121) -> {'Idris.Prelude.Types.Left', V3121} end(E3385)); {'Idris.Prelude.Types.Right', E3386} -> (fun (V3122) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V3122))))}, V3081)) end(E3386)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3384)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3382)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E3520, E3521, E3522, E3523} -> (fun (V3123, V3124, V3125, V3126) -> fun (V3127) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V3123, <<"Function types not allowed in a foreign struct"/utf8>>}, V3127)) end end(E3520, E3521, E3522, E3523)); _ -> case V3 of {'Idris.Core.Value.NTCon', E3485, E3486, E3487, E3488, E3489} -> (fun (V3128, V3129, V3130, V3131, V3132) -> fun (V3133) -> begin (V3162 = begin (V3161 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3134) -> fun (V3135) -> fun (V3136) -> fun (V3137) -> fun (V3138) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V3136, V3137, V3138)) end end end end end, fun (V3139) -> fun (V3140) -> fun (V3141) -> V3140 end end end, fun (V3142) -> fun (V3143) -> fun (V3144) -> fun (V3145) -> fun (V3146) -> begin (V3147 = (V3144(V3146))), begin (V3148 = (V3145(V3146))), (V3147(V3148)) end end end end end end end}, fun (V3149) -> fun (V3150) -> fun (V3151) -> fun (V3152) -> fun (V3153) -> begin (V3154 = (V3151(V3153))), ((V3152(V3154))(V3153)) end end end end end end, fun (V3155) -> fun (V3156) -> fun (V3157) -> begin (V3158 = (V3156(V3157))), (V3158(V3157)) end end end end}, fun (V3159) -> fun (V3160) -> V3160 end end}, V0))(V3133))), {'Idris.Prelude.Types.Right', V3161} end), case V3162 of {'Idris.Prelude.Types.Left', E3490} -> (fun (V3163) -> {'Idris.Prelude.Types.Left', V3163} end(E3490)); {'Idris.Prelude.Types.Right', E3491} -> (fun (V3164) -> begin (V3169 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V3165) -> fun (V3166) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V3165, V3166)) end end, fun (V3167) -> fun (V3168) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V3167, V3168)) end end}, V3129, V3133))), case V3169 of {'Idris.Prelude.Types.Left', E3492} -> (fun (V3170) -> {'Idris.Prelude.Types.Left', V3170} end(E3492)); {'Idris.Prelude.Types.Right', E3493} -> (fun (V3171) -> begin (V3172 = (('un--getNArgs'(V0, V3164, V3171, V3132))(V3133))), case V3172 of {'Idris.Prelude.Types.Left', E3494} -> (fun (V3173) -> {'Idris.Prelude.Types.Left', V3173} end(E3494)); {'Idris.Prelude.Types.Right', E3495} -> (fun (V3174) -> case V3174 of {'Idris.Compiler.CompileExpr.User', E3496, E3497} -> (fun (V3175, V3176) -> begin (V3178 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3177) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3164, V3177)) end, V3176))(V3133))), case V3178 of {'Idris.Prelude.Types.Left', E3498} -> (fun (V3179) -> {'Idris.Prelude.Types.Left', V3179} end(E3498)); {'Idris.Prelude.Types.Right', E3499} -> (fun (V3180) -> begin (V3182 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3181) -> ('un--nfToCFType'(V0, V3128, V2, V3181)) end, V3180))(V3133))), case V3182 of {'Idris.Prelude.Types.Left', E3500} -> (fun (V3183) -> {'Idris.Prelude.Types.Left', V3183} end(E3500)); {'Idris.Prelude.Types.Right', E3501} -> (fun (V3184) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V3171, V3184}} end(E3501)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3499)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3496, E3497)); {'Idris.Compiler.CompileExpr.Struct', E3502, E3503} -> (fun (V3185, V3186) -> begin (V3197 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3187) -> case V3187 of {'Idris.Builtin.MkPair', E3504, E3505} -> (fun (V3188, V3189) -> fun (V3190) -> begin (V3191 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3164, V3189))(V3190))), case V3191 of {'Idris.Prelude.Types.Left', E3506} -> (fun (V3192) -> {'Idris.Prelude.Types.Left', V3192} end(E3506)); {'Idris.Prelude.Types.Right', E3507} -> (fun (V3193) -> begin (V3194 = (('un--nfToCFType'(V0, V3128, 0, V3193))(V3190))), case V3194 of {'Idris.Prelude.Types.Left', E3508} -> (fun (V3195) -> {'Idris.Prelude.Types.Left', V3195} end(E3508)); {'Idris.Prelude.Types.Right', E3509} -> (fun (V3196) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V3188, V3196}} end(E3509)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3507)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3504, E3505)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V3186))(V3133))), case V3197 of {'Idris.Prelude.Types.Left', E3510} -> (fun (V3198) -> {'Idris.Prelude.Types.Left', V3198} end(E3510)); {'Idris.Prelude.Types.Right', E3511} -> (fun (V3199) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V3185, V3199}} end(E3511)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3502, E3503)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E3512} -> (fun (V3200) -> begin (V3201 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3164, V3200))(V3133))), case V3201 of {'Idris.Prelude.Types.Left', E3513} -> (fun (V3202) -> {'Idris.Prelude.Types.Left', V3202} end(E3513)); {'Idris.Prelude.Types.Right', E3514} -> (fun (V3203) -> begin (V3204 = (('un--nfToCFType'(V0, V3128, V2, V3203))(V3133))), case V3204 of {'Idris.Prelude.Types.Left', E3515} -> (fun (V3205) -> {'Idris.Prelude.Types.Left', V3205} end(E3515)); {'Idris.Prelude.Types.Right', E3516} -> (fun (V3206) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V3206}} end(E3516)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3514)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3512)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E3495)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3493)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3491)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3485, E3486, E3487, E3488, E3489)); {'Idris.Core.Value.NType', E3517} -> (fun (V3207) -> fun (V3208) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E3517)); {'Idris.Core.Value.NErased', E3518, E3519} -> (fun (V3209, V3210) -> fun (V3211) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E3518, E3519)); _ -> fun (V3212) -> begin (V3241 = begin (V3240 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3213) -> fun (V3214) -> fun (V3215) -> fun (V3216) -> fun (V3217) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V3215, V3216, V3217)) end end end end end, fun (V3218) -> fun (V3219) -> fun (V3220) -> V3219 end end end, fun (V3221) -> fun (V3222) -> fun (V3223) -> fun (V3224) -> fun (V3225) -> begin (V3226 = (V3223(V3225))), begin (V3227 = (V3224(V3225))), (V3226(V3227)) end end end end end end end}, fun (V3228) -> fun (V3229) -> fun (V3230) -> fun (V3231) -> fun (V3232) -> begin (V3233 = (V3230(V3232))), ((V3231(V3233))(V3232)) end end end end end end, fun (V3234) -> fun (V3235) -> fun (V3236) -> begin (V3237 = (V3235(V3236))), (V3237(V3236)) end end end end}, fun (V3238) -> fun (V3239) -> V3239 end end}, V0))(V3212))), {'Idris.Prelude.Types.Right', V3240} end), case V3241 of {'Idris.Prelude.Types.Left', E3479} -> (fun (V3242) -> {'Idris.Prelude.Types.Left', V3242} end(E3479)); {'Idris.Prelude.Types.Right', E3480} -> (fun (V3243) -> begin (V3244 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V3243, {'Idris.Core.Env.Nil'}, V3, V3212))), case V3244 of {'Idris.Prelude.Types.Left', E3481} -> (fun (V3245) -> {'Idris.Prelude.Types.Left', V3245} end(E3481)); {'Idris.Prelude.Types.Right', E3482} -> (fun (V3246) -> begin (V3251 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V3247) -> fun (V3248) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V3247, V3248)) end end, fun (V3249) -> fun (V3250) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V3249, V3250)) end end}, V3246, V3212))), case V3251 of {'Idris.Prelude.Types.Left', E3483} -> (fun (V3252) -> {'Idris.Prelude.Types.Left', V3252} end(E3483)); {'Idris.Prelude.Types.Right', E3484} -> (fun (V3253) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V3253))))}, V3212)) end(E3484)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3482)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3480)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E3346, E3347, E3348, E3349, E3350} -> (fun (V3254, V3255, V3256, V3257, V3258) -> fun (V3259) -> begin (V3288 = begin (V3287 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3260) -> fun (V3261) -> fun (V3262) -> fun (V3263) -> fun (V3264) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V3262, V3263, V3264)) end end end end end, fun (V3265) -> fun (V3266) -> fun (V3267) -> V3266 end end end, fun (V3268) -> fun (V3269) -> fun (V3270) -> fun (V3271) -> fun (V3272) -> begin (V3273 = (V3270(V3272))), begin (V3274 = (V3271(V3272))), (V3273(V3274)) end end end end end end end}, fun (V3275) -> fun (V3276) -> fun (V3277) -> fun (V3278) -> fun (V3279) -> begin (V3280 = (V3277(V3279))), ((V3278(V3280))(V3279)) end end end end end end, fun (V3281) -> fun (V3282) -> fun (V3283) -> begin (V3284 = (V3282(V3283))), (V3284(V3283)) end end end end}, fun (V3285) -> fun (V3286) -> V3286 end end}, V0))(V3259))), {'Idris.Prelude.Types.Right', V3287} end), case V3288 of {'Idris.Prelude.Types.Left', E3351} -> (fun (V3289) -> {'Idris.Prelude.Types.Left', V3289} end(E3351)); {'Idris.Prelude.Types.Right', E3352} -> (fun (V3290) -> begin (V3295 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V3291) -> fun (V3292) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V3291, V3292)) end end, fun (V3293) -> fun (V3294) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V3293, V3294)) end end}, V3255, V3259))), case V3295 of {'Idris.Prelude.Types.Left', E3353} -> (fun (V3296) -> {'Idris.Prelude.Types.Left', V3296} end(E3353)); {'Idris.Prelude.Types.Right', E3354} -> (fun (V3297) -> begin (V3298 = (('un--getNArgs'(V0, V3290, V3297, V3258))(V3259))), case V3298 of {'Idris.Prelude.Types.Left', E3355} -> (fun (V3299) -> {'Idris.Prelude.Types.Left', V3299} end(E3355)); {'Idris.Prelude.Types.Right', E3356} -> (fun (V3300) -> case V3300 of {'Idris.Compiler.CompileExpr.User', E3357, E3358} -> (fun (V3301, V3302) -> begin (V3304 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3303) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3290, V3303)) end, V3302))(V3259))), case V3304 of {'Idris.Prelude.Types.Left', E3359} -> (fun (V3305) -> {'Idris.Prelude.Types.Left', V3305} end(E3359)); {'Idris.Prelude.Types.Right', E3360} -> (fun (V3306) -> begin (V3308 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3307) -> ('un--nfToCFType'(V0, V3254, V2, V3307)) end, V3306))(V3259))), case V3308 of {'Idris.Prelude.Types.Left', E3361} -> (fun (V3309) -> {'Idris.Prelude.Types.Left', V3309} end(E3361)); {'Idris.Prelude.Types.Right', E3362} -> (fun (V3310) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V3297, V3310}} end(E3362)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3360)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3357, E3358)); {'Idris.Compiler.CompileExpr.Struct', E3363, E3364} -> (fun (V3311, V3312) -> begin (V3323 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3313) -> case V3313 of {'Idris.Builtin.MkPair', E3365, E3366} -> (fun (V3314, V3315) -> fun (V3316) -> begin (V3317 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3290, V3315))(V3316))), case V3317 of {'Idris.Prelude.Types.Left', E3367} -> (fun (V3318) -> {'Idris.Prelude.Types.Left', V3318} end(E3367)); {'Idris.Prelude.Types.Right', E3368} -> (fun (V3319) -> begin (V3320 = (('un--nfToCFType'(V0, V3254, 0, V3319))(V3316))), case V3320 of {'Idris.Prelude.Types.Left', E3369} -> (fun (V3321) -> {'Idris.Prelude.Types.Left', V3321} end(E3369)); {'Idris.Prelude.Types.Right', E3370} -> (fun (V3322) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V3314, V3322}} end(E3370)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3368)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3365, E3366)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V3312))(V3259))), case V3323 of {'Idris.Prelude.Types.Left', E3371} -> (fun (V3324) -> {'Idris.Prelude.Types.Left', V3324} end(E3371)); {'Idris.Prelude.Types.Right', E3372} -> (fun (V3325) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V3311, V3325}} end(E3372)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3363, E3364)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E3373} -> (fun (V3326) -> begin (V3327 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3290, V3326))(V3259))), case V3327 of {'Idris.Prelude.Types.Left', E3374} -> (fun (V3328) -> {'Idris.Prelude.Types.Left', V3328} end(E3374)); {'Idris.Prelude.Types.Right', E3375} -> (fun (V3329) -> begin (V3330 = (('un--nfToCFType'(V0, V3254, V2, V3329))(V3259))), case V3330 of {'Idris.Prelude.Types.Left', E3376} -> (fun (V3331) -> {'Idris.Prelude.Types.Left', V3331} end(E3376)); {'Idris.Prelude.Types.Right', E3377} -> (fun (V3332) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V3332}} end(E3377)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3375)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3373)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E3356)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3354)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3352)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3346, E3347, E3348, E3349, E3350)); {'Idris.Core.Value.NType', E3378} -> (fun (V3333) -> fun (V3334) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E3378)); {'Idris.Core.Value.NErased', E3379, E3380} -> (fun (V3335, V3336) -> fun (V3337) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E3379, E3380)); _ -> fun (V3338) -> begin (V3367 = begin (V3366 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3339) -> fun (V3340) -> fun (V3341) -> fun (V3342) -> fun (V3343) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V3341, V3342, V3343)) end end end end end, fun (V3344) -> fun (V3345) -> fun (V3346) -> V3345 end end end, fun (V3347) -> fun (V3348) -> fun (V3349) -> fun (V3350) -> fun (V3351) -> begin (V3352 = (V3349(V3351))), begin (V3353 = (V3350(V3351))), (V3352(V3353)) end end end end end end end}, fun (V3354) -> fun (V3355) -> fun (V3356) -> fun (V3357) -> fun (V3358) -> begin (V3359 = (V3356(V3358))), ((V3357(V3359))(V3358)) end end end end end end, fun (V3360) -> fun (V3361) -> fun (V3362) -> begin (V3363 = (V3361(V3362))), (V3363(V3362)) end end end end}, fun (V3364) -> fun (V3365) -> V3365 end end}, V0))(V3338))), {'Idris.Prelude.Types.Right', V3366} end), case V3367 of {'Idris.Prelude.Types.Left', E3340} -> (fun (V3368) -> {'Idris.Prelude.Types.Left', V3368} end(E3340)); {'Idris.Prelude.Types.Right', E3341} -> (fun (V3369) -> begin (V3370 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V3369, {'Idris.Core.Env.Nil'}, V3, V3338))), case V3370 of {'Idris.Prelude.Types.Left', E3342} -> (fun (V3371) -> {'Idris.Prelude.Types.Left', V3371} end(E3342)); {'Idris.Prelude.Types.Right', E3343} -> (fun (V3372) -> begin (V3377 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V3373) -> fun (V3374) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V3373, V3374)) end end, fun (V3375) -> fun (V3376) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V3375, V3376)) end end}, V3372, V3338))), case V3377 of {'Idris.Prelude.Types.Left', E3344} -> (fun (V3378) -> {'Idris.Prelude.Types.Left', V3378} end(E3344)); {'Idris.Prelude.Types.Right', E3345} -> (fun (V3379) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V3379))))}, V3338)) end(E3345)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3343)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3341)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end end(E3338, E3339)); _ -> case V3 of {'Idris.Core.Value.NPrimVal', E3152, E3153} -> (fun (V3380, V3381) -> case V3381 of {'Idris.Core.TT.DoubleType'} -> (fun () -> fun (V3382) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFDouble'}} end end()); {'Idris.Core.TT.CharType'} -> (fun () -> fun (V3383) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFChar'}} end end()); {'Idris.Core.TT.WorldType'} -> (fun () -> fun (V3384) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFWorld'}} end end()); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E3236, E3237, E3238, E3239} -> (fun (V3385, V3386, V3387, V3388) -> case V3387 of {'Idris.Core.TT.Pi', E3281, E3282, E3283, E3284} -> (fun (V3389, V3390, V3391, V3392) -> fun (V3393) -> begin (V3422 = begin (V3421 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3394) -> fun (V3395) -> fun (V3396) -> fun (V3397) -> fun (V3398) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V3396, V3397, V3398)) end end end end end, fun (V3399) -> fun (V3400) -> fun (V3401) -> V3400 end end end, fun (V3402) -> fun (V3403) -> fun (V3404) -> fun (V3405) -> fun (V3406) -> begin (V3407 = (V3404(V3406))), begin (V3408 = (V3405(V3406))), (V3407(V3408)) end end end end end end end}, fun (V3409) -> fun (V3410) -> fun (V3411) -> fun (V3412) -> fun (V3413) -> begin (V3414 = (V3411(V3413))), ((V3412(V3414))(V3413)) end end end end end end, fun (V3415) -> fun (V3416) -> fun (V3417) -> begin (V3418 = (V3416(V3417))), (V3418(V3417)) end end end end}, fun (V3419) -> fun (V3420) -> V3420 end end}, V0))(V3393))), {'Idris.Prelude.Types.Right', V3421} end), case V3422 of {'Idris.Prelude.Types.Left', E3285} -> (fun (V3423) -> {'Idris.Prelude.Types.Left', V3423} end(E3285)); {'Idris.Prelude.Types.Right', E3286} -> (fun (V3424) -> begin (V3425 = (('un--nfToCFType'(V0, V3385, 1, V3392))(V3393))), case V3425 of {'Idris.Prelude.Types.Left', E3287} -> (fun (V3426) -> {'Idris.Prelude.Types.Left', V3426} end(E3287)); {'Idris.Prelude.Types.Right', E3288} -> (fun (V3427) -> begin (V3428 = (((V3388(V3424))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V3385, 1}))))(V3393))), case V3428 of {'Idris.Prelude.Types.Left', E3289} -> (fun (V3429) -> {'Idris.Prelude.Types.Left', V3429} end(E3289)); {'Idris.Prelude.Types.Right', E3290} -> (fun (V3430) -> begin (V3431 = (('un--nfToCFType'(V0, V3385, 1, V3430))(V3393))), case V3431 of {'Idris.Prelude.Types.Left', E3291} -> (fun (V3432) -> {'Idris.Prelude.Types.Left', V3432} end(E3291)); {'Idris.Prelude.Types.Right', E3292} -> (fun (V3433) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V3427, V3433}} end(E3292)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3290)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3288)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3286)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3281, E3282, E3283, E3284)); _ -> case V3 of {'Idris.Core.Value.NTCon', E3246, E3247, E3248, E3249, E3250} -> (fun (V3434, V3435, V3436, V3437, V3438) -> fun (V3439) -> begin (V3468 = begin (V3467 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3440) -> fun (V3441) -> fun (V3442) -> fun (V3443) -> fun (V3444) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V3442, V3443, V3444)) end end end end end, fun (V3445) -> fun (V3446) -> fun (V3447) -> V3446 end end end, fun (V3448) -> fun (V3449) -> fun (V3450) -> fun (V3451) -> fun (V3452) -> begin (V3453 = (V3450(V3452))), begin (V3454 = (V3451(V3452))), (V3453(V3454)) end end end end end end end}, fun (V3455) -> fun (V3456) -> fun (V3457) -> fun (V3458) -> fun (V3459) -> begin (V3460 = (V3457(V3459))), ((V3458(V3460))(V3459)) end end end end end end, fun (V3461) -> fun (V3462) -> fun (V3463) -> begin (V3464 = (V3462(V3463))), (V3464(V3463)) end end end end}, fun (V3465) -> fun (V3466) -> V3466 end end}, V0))(V3439))), {'Idris.Prelude.Types.Right', V3467} end), case V3468 of {'Idris.Prelude.Types.Left', E3251} -> (fun (V3469) -> {'Idris.Prelude.Types.Left', V3469} end(E3251)); {'Idris.Prelude.Types.Right', E3252} -> (fun (V3470) -> begin (V3475 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V3471) -> fun (V3472) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V3471, V3472)) end end, fun (V3473) -> fun (V3474) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V3473, V3474)) end end}, V3435, V3439))), case V3475 of {'Idris.Prelude.Types.Left', E3253} -> (fun (V3476) -> {'Idris.Prelude.Types.Left', V3476} end(E3253)); {'Idris.Prelude.Types.Right', E3254} -> (fun (V3477) -> begin (V3478 = (('un--getNArgs'(V0, V3470, V3477, V3438))(V3439))), case V3478 of {'Idris.Prelude.Types.Left', E3255} -> (fun (V3479) -> {'Idris.Prelude.Types.Left', V3479} end(E3255)); {'Idris.Prelude.Types.Right', E3256} -> (fun (V3480) -> case V3480 of {'Idris.Compiler.CompileExpr.User', E3257, E3258} -> (fun (V3481, V3482) -> begin (V3484 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3483) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3470, V3483)) end, V3482))(V3439))), case V3484 of {'Idris.Prelude.Types.Left', E3259} -> (fun (V3485) -> {'Idris.Prelude.Types.Left', V3485} end(E3259)); {'Idris.Prelude.Types.Right', E3260} -> (fun (V3486) -> begin (V3488 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3487) -> ('un--nfToCFType'(V0, V3434, V2, V3487)) end, V3486))(V3439))), case V3488 of {'Idris.Prelude.Types.Left', E3261} -> (fun (V3489) -> {'Idris.Prelude.Types.Left', V3489} end(E3261)); {'Idris.Prelude.Types.Right', E3262} -> (fun (V3490) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V3477, V3490}} end(E3262)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3260)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3257, E3258)); {'Idris.Compiler.CompileExpr.Struct', E3263, E3264} -> (fun (V3491, V3492) -> begin (V3503 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3493) -> case V3493 of {'Idris.Builtin.MkPair', E3265, E3266} -> (fun (V3494, V3495) -> fun (V3496) -> begin (V3497 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3470, V3495))(V3496))), case V3497 of {'Idris.Prelude.Types.Left', E3267} -> (fun (V3498) -> {'Idris.Prelude.Types.Left', V3498} end(E3267)); {'Idris.Prelude.Types.Right', E3268} -> (fun (V3499) -> begin (V3500 = (('un--nfToCFType'(V0, V3434, 0, V3499))(V3496))), case V3500 of {'Idris.Prelude.Types.Left', E3269} -> (fun (V3501) -> {'Idris.Prelude.Types.Left', V3501} end(E3269)); {'Idris.Prelude.Types.Right', E3270} -> (fun (V3502) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V3494, V3502}} end(E3270)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3268)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3265, E3266)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V3492))(V3439))), case V3503 of {'Idris.Prelude.Types.Left', E3271} -> (fun (V3504) -> {'Idris.Prelude.Types.Left', V3504} end(E3271)); {'Idris.Prelude.Types.Right', E3272} -> (fun (V3505) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V3491, V3505}} end(E3272)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3263, E3264)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E3273} -> (fun (V3506) -> begin (V3507 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3470, V3506))(V3439))), case V3507 of {'Idris.Prelude.Types.Left', E3274} -> (fun (V3508) -> {'Idris.Prelude.Types.Left', V3508} end(E3274)); {'Idris.Prelude.Types.Right', E3275} -> (fun (V3509) -> begin (V3510 = (('un--nfToCFType'(V0, V3434, V2, V3509))(V3439))), case V3510 of {'Idris.Prelude.Types.Left', E3276} -> (fun (V3511) -> {'Idris.Prelude.Types.Left', V3511} end(E3276)); {'Idris.Prelude.Types.Right', E3277} -> (fun (V3512) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V3512}} end(E3277)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3275)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3273)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E3256)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3254)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3252)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3246, E3247, E3248, E3249, E3250)); {'Idris.Core.Value.NType', E3278} -> (fun (V3513) -> fun (V3514) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E3278)); {'Idris.Core.Value.NErased', E3279, E3280} -> (fun (V3515, V3516) -> fun (V3517) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E3279, E3280)); _ -> fun (V3518) -> begin (V3547 = begin (V3546 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3519) -> fun (V3520) -> fun (V3521) -> fun (V3522) -> fun (V3523) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V3521, V3522, V3523)) end end end end end, fun (V3524) -> fun (V3525) -> fun (V3526) -> V3525 end end end, fun (V3527) -> fun (V3528) -> fun (V3529) -> fun (V3530) -> fun (V3531) -> begin (V3532 = (V3529(V3531))), begin (V3533 = (V3530(V3531))), (V3532(V3533)) end end end end end end end}, fun (V3534) -> fun (V3535) -> fun (V3536) -> fun (V3537) -> fun (V3538) -> begin (V3539 = (V3536(V3538))), ((V3537(V3539))(V3538)) end end end end end end, fun (V3540) -> fun (V3541) -> fun (V3542) -> begin (V3543 = (V3541(V3542))), (V3543(V3542)) end end end end}, fun (V3544) -> fun (V3545) -> V3545 end end}, V0))(V3518))), {'Idris.Prelude.Types.Right', V3546} end), case V3547 of {'Idris.Prelude.Types.Left', E3240} -> (fun (V3548) -> {'Idris.Prelude.Types.Left', V3548} end(E3240)); {'Idris.Prelude.Types.Right', E3241} -> (fun (V3549) -> begin (V3550 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V3549, {'Idris.Core.Env.Nil'}, V3, V3518))), case V3550 of {'Idris.Prelude.Types.Left', E3242} -> (fun (V3551) -> {'Idris.Prelude.Types.Left', V3551} end(E3242)); {'Idris.Prelude.Types.Right', E3243} -> (fun (V3552) -> begin (V3557 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V3553) -> fun (V3554) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V3553, V3554)) end end, fun (V3555) -> fun (V3556) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V3555, V3556)) end end}, V3552, V3518))), case V3557 of {'Idris.Prelude.Types.Left', E3244} -> (fun (V3558) -> {'Idris.Prelude.Types.Left', V3558} end(E3244)); {'Idris.Prelude.Types.Right', E3245} -> (fun (V3559) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V3559))))}, V3518)) end(E3245)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3243)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3241)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E3236, E3237, E3238, E3239)); _ -> case V3 of {'Idris.Core.Value.NTCon', E3201, E3202, E3203, E3204, E3205} -> (fun (V3560, V3561, V3562, V3563, V3564) -> fun (V3565) -> begin (V3594 = begin (V3593 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3566) -> fun (V3567) -> fun (V3568) -> fun (V3569) -> fun (V3570) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V3568, V3569, V3570)) end end end end end, fun (V3571) -> fun (V3572) -> fun (V3573) -> V3572 end end end, fun (V3574) -> fun (V3575) -> fun (V3576) -> fun (V3577) -> fun (V3578) -> begin (V3579 = (V3576(V3578))), begin (V3580 = (V3577(V3578))), (V3579(V3580)) end end end end end end end}, fun (V3581) -> fun (V3582) -> fun (V3583) -> fun (V3584) -> fun (V3585) -> begin (V3586 = (V3583(V3585))), ((V3584(V3586))(V3585)) end end end end end end, fun (V3587) -> fun (V3588) -> fun (V3589) -> begin (V3590 = (V3588(V3589))), (V3590(V3589)) end end end end}, fun (V3591) -> fun (V3592) -> V3592 end end}, V0))(V3565))), {'Idris.Prelude.Types.Right', V3593} end), case V3594 of {'Idris.Prelude.Types.Left', E3206} -> (fun (V3595) -> {'Idris.Prelude.Types.Left', V3595} end(E3206)); {'Idris.Prelude.Types.Right', E3207} -> (fun (V3596) -> begin (V3601 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V3597) -> fun (V3598) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V3597, V3598)) end end, fun (V3599) -> fun (V3600) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V3599, V3600)) end end}, V3561, V3565))), case V3601 of {'Idris.Prelude.Types.Left', E3208} -> (fun (V3602) -> {'Idris.Prelude.Types.Left', V3602} end(E3208)); {'Idris.Prelude.Types.Right', E3209} -> (fun (V3603) -> begin (V3604 = (('un--getNArgs'(V0, V3596, V3603, V3564))(V3565))), case V3604 of {'Idris.Prelude.Types.Left', E3210} -> (fun (V3605) -> {'Idris.Prelude.Types.Left', V3605} end(E3210)); {'Idris.Prelude.Types.Right', E3211} -> (fun (V3606) -> case V3606 of {'Idris.Compiler.CompileExpr.User', E3212, E3213} -> (fun (V3607, V3608) -> begin (V3610 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3609) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3596, V3609)) end, V3608))(V3565))), case V3610 of {'Idris.Prelude.Types.Left', E3214} -> (fun (V3611) -> {'Idris.Prelude.Types.Left', V3611} end(E3214)); {'Idris.Prelude.Types.Right', E3215} -> (fun (V3612) -> begin (V3614 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3613) -> ('un--nfToCFType'(V0, V3560, V2, V3613)) end, V3612))(V3565))), case V3614 of {'Idris.Prelude.Types.Left', E3216} -> (fun (V3615) -> {'Idris.Prelude.Types.Left', V3615} end(E3216)); {'Idris.Prelude.Types.Right', E3217} -> (fun (V3616) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V3603, V3616}} end(E3217)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3215)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3212, E3213)); {'Idris.Compiler.CompileExpr.Struct', E3218, E3219} -> (fun (V3617, V3618) -> begin (V3629 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3619) -> case V3619 of {'Idris.Builtin.MkPair', E3220, E3221} -> (fun (V3620, V3621) -> fun (V3622) -> begin (V3623 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3596, V3621))(V3622))), case V3623 of {'Idris.Prelude.Types.Left', E3222} -> (fun (V3624) -> {'Idris.Prelude.Types.Left', V3624} end(E3222)); {'Idris.Prelude.Types.Right', E3223} -> (fun (V3625) -> begin (V3626 = (('un--nfToCFType'(V0, V3560, 0, V3625))(V3622))), case V3626 of {'Idris.Prelude.Types.Left', E3224} -> (fun (V3627) -> {'Idris.Prelude.Types.Left', V3627} end(E3224)); {'Idris.Prelude.Types.Right', E3225} -> (fun (V3628) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V3620, V3628}} end(E3225)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3223)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3220, E3221)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V3618))(V3565))), case V3629 of {'Idris.Prelude.Types.Left', E3226} -> (fun (V3630) -> {'Idris.Prelude.Types.Left', V3630} end(E3226)); {'Idris.Prelude.Types.Right', E3227} -> (fun (V3631) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V3617, V3631}} end(E3227)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3218, E3219)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E3228} -> (fun (V3632) -> begin (V3633 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3596, V3632))(V3565))), case V3633 of {'Idris.Prelude.Types.Left', E3229} -> (fun (V3634) -> {'Idris.Prelude.Types.Left', V3634} end(E3229)); {'Idris.Prelude.Types.Right', E3230} -> (fun (V3635) -> begin (V3636 = (('un--nfToCFType'(V0, V3560, V2, V3635))(V3565))), case V3636 of {'Idris.Prelude.Types.Left', E3231} -> (fun (V3637) -> {'Idris.Prelude.Types.Left', V3637} end(E3231)); {'Idris.Prelude.Types.Right', E3232} -> (fun (V3638) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V3638}} end(E3232)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3230)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3228)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E3211)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3209)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3207)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3201, E3202, E3203, E3204, E3205)); {'Idris.Core.Value.NType', E3233} -> (fun (V3639) -> fun (V3640) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E3233)); {'Idris.Core.Value.NErased', E3234, E3235} -> (fun (V3641, V3642) -> fun (V3643) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E3234, E3235)); _ -> fun (V3644) -> begin (V3673 = begin (V3672 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3645) -> fun (V3646) -> fun (V3647) -> fun (V3648) -> fun (V3649) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V3647, V3648, V3649)) end end end end end, fun (V3650) -> fun (V3651) -> fun (V3652) -> V3651 end end end, fun (V3653) -> fun (V3654) -> fun (V3655) -> fun (V3656) -> fun (V3657) -> begin (V3658 = (V3655(V3657))), begin (V3659 = (V3656(V3657))), (V3658(V3659)) end end end end end end end}, fun (V3660) -> fun (V3661) -> fun (V3662) -> fun (V3663) -> fun (V3664) -> begin (V3665 = (V3662(V3664))), ((V3663(V3665))(V3664)) end end end end end end, fun (V3666) -> fun (V3667) -> fun (V3668) -> begin (V3669 = (V3667(V3668))), (V3669(V3668)) end end end end}, fun (V3670) -> fun (V3671) -> V3671 end end}, V0))(V3644))), {'Idris.Prelude.Types.Right', V3672} end), case V3673 of {'Idris.Prelude.Types.Left', E3195} -> (fun (V3674) -> {'Idris.Prelude.Types.Left', V3674} end(E3195)); {'Idris.Prelude.Types.Right', E3196} -> (fun (V3675) -> begin (V3676 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V3675, {'Idris.Core.Env.Nil'}, V3, V3644))), case V3676 of {'Idris.Prelude.Types.Left', E3197} -> (fun (V3677) -> {'Idris.Prelude.Types.Left', V3677} end(E3197)); {'Idris.Prelude.Types.Right', E3198} -> (fun (V3678) -> begin (V3683 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V3679) -> fun (V3680) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V3679, V3680)) end end, fun (V3681) -> fun (V3682) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V3681, V3682)) end end}, V3678, V3644))), case V3683 of {'Idris.Prelude.Types.Left', E3199} -> (fun (V3684) -> {'Idris.Prelude.Types.Left', V3684} end(E3199)); {'Idris.Prelude.Types.Right', E3200} -> (fun (V3685) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V3685))))}, V3644)) end(E3200)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3198)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3196)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E3334, E3335, E3336, E3337} -> (fun (V3686, V3687, V3688, V3689) -> fun (V3690) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V3686, <<"Function types not allowed in a foreign struct"/utf8>>}, V3690)) end end(E3334, E3335, E3336, E3337)); _ -> case V3 of {'Idris.Core.Value.NTCon', E3299, E3300, E3301, E3302, E3303} -> (fun (V3691, V3692, V3693, V3694, V3695) -> fun (V3696) -> begin (V3725 = begin (V3724 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3697) -> fun (V3698) -> fun (V3699) -> fun (V3700) -> fun (V3701) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V3699, V3700, V3701)) end end end end end, fun (V3702) -> fun (V3703) -> fun (V3704) -> V3703 end end end, fun (V3705) -> fun (V3706) -> fun (V3707) -> fun (V3708) -> fun (V3709) -> begin (V3710 = (V3707(V3709))), begin (V3711 = (V3708(V3709))), (V3710(V3711)) end end end end end end end}, fun (V3712) -> fun (V3713) -> fun (V3714) -> fun (V3715) -> fun (V3716) -> begin (V3717 = (V3714(V3716))), ((V3715(V3717))(V3716)) end end end end end end, fun (V3718) -> fun (V3719) -> fun (V3720) -> begin (V3721 = (V3719(V3720))), (V3721(V3720)) end end end end}, fun (V3722) -> fun (V3723) -> V3723 end end}, V0))(V3696))), {'Idris.Prelude.Types.Right', V3724} end), case V3725 of {'Idris.Prelude.Types.Left', E3304} -> (fun (V3726) -> {'Idris.Prelude.Types.Left', V3726} end(E3304)); {'Idris.Prelude.Types.Right', E3305} -> (fun (V3727) -> begin (V3732 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V3728) -> fun (V3729) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V3728, V3729)) end end, fun (V3730) -> fun (V3731) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V3730, V3731)) end end}, V3692, V3696))), case V3732 of {'Idris.Prelude.Types.Left', E3306} -> (fun (V3733) -> {'Idris.Prelude.Types.Left', V3733} end(E3306)); {'Idris.Prelude.Types.Right', E3307} -> (fun (V3734) -> begin (V3735 = (('un--getNArgs'(V0, V3727, V3734, V3695))(V3696))), case V3735 of {'Idris.Prelude.Types.Left', E3308} -> (fun (V3736) -> {'Idris.Prelude.Types.Left', V3736} end(E3308)); {'Idris.Prelude.Types.Right', E3309} -> (fun (V3737) -> case V3737 of {'Idris.Compiler.CompileExpr.User', E3310, E3311} -> (fun (V3738, V3739) -> begin (V3741 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3740) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3727, V3740)) end, V3739))(V3696))), case V3741 of {'Idris.Prelude.Types.Left', E3312} -> (fun (V3742) -> {'Idris.Prelude.Types.Left', V3742} end(E3312)); {'Idris.Prelude.Types.Right', E3313} -> (fun (V3743) -> begin (V3745 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3744) -> ('un--nfToCFType'(V0, V3691, V2, V3744)) end, V3743))(V3696))), case V3745 of {'Idris.Prelude.Types.Left', E3314} -> (fun (V3746) -> {'Idris.Prelude.Types.Left', V3746} end(E3314)); {'Idris.Prelude.Types.Right', E3315} -> (fun (V3747) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V3734, V3747}} end(E3315)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3313)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3310, E3311)); {'Idris.Compiler.CompileExpr.Struct', E3316, E3317} -> (fun (V3748, V3749) -> begin (V3760 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3750) -> case V3750 of {'Idris.Builtin.MkPair', E3318, E3319} -> (fun (V3751, V3752) -> fun (V3753) -> begin (V3754 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3727, V3752))(V3753))), case V3754 of {'Idris.Prelude.Types.Left', E3320} -> (fun (V3755) -> {'Idris.Prelude.Types.Left', V3755} end(E3320)); {'Idris.Prelude.Types.Right', E3321} -> (fun (V3756) -> begin (V3757 = (('un--nfToCFType'(V0, V3691, 0, V3756))(V3753))), case V3757 of {'Idris.Prelude.Types.Left', E3322} -> (fun (V3758) -> {'Idris.Prelude.Types.Left', V3758} end(E3322)); {'Idris.Prelude.Types.Right', E3323} -> (fun (V3759) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V3751, V3759}} end(E3323)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3321)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3318, E3319)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V3749))(V3696))), case V3760 of {'Idris.Prelude.Types.Left', E3324} -> (fun (V3761) -> {'Idris.Prelude.Types.Left', V3761} end(E3324)); {'Idris.Prelude.Types.Right', E3325} -> (fun (V3762) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V3748, V3762}} end(E3325)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3316, E3317)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E3326} -> (fun (V3763) -> begin (V3764 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3727, V3763))(V3696))), case V3764 of {'Idris.Prelude.Types.Left', E3327} -> (fun (V3765) -> {'Idris.Prelude.Types.Left', V3765} end(E3327)); {'Idris.Prelude.Types.Right', E3328} -> (fun (V3766) -> begin (V3767 = (('un--nfToCFType'(V0, V3691, V2, V3766))(V3696))), case V3767 of {'Idris.Prelude.Types.Left', E3329} -> (fun (V3768) -> {'Idris.Prelude.Types.Left', V3768} end(E3329)); {'Idris.Prelude.Types.Right', E3330} -> (fun (V3769) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V3769}} end(E3330)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3328)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3326)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E3309)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3307)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3305)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3299, E3300, E3301, E3302, E3303)); {'Idris.Core.Value.NType', E3331} -> (fun (V3770) -> fun (V3771) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E3331)); {'Idris.Core.Value.NErased', E3332, E3333} -> (fun (V3772, V3773) -> fun (V3774) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E3332, E3333)); _ -> fun (V3775) -> begin (V3804 = begin (V3803 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3776) -> fun (V3777) -> fun (V3778) -> fun (V3779) -> fun (V3780) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V3778, V3779, V3780)) end end end end end, fun (V3781) -> fun (V3782) -> fun (V3783) -> V3782 end end end, fun (V3784) -> fun (V3785) -> fun (V3786) -> fun (V3787) -> fun (V3788) -> begin (V3789 = (V3786(V3788))), begin (V3790 = (V3787(V3788))), (V3789(V3790)) end end end end end end end}, fun (V3791) -> fun (V3792) -> fun (V3793) -> fun (V3794) -> fun (V3795) -> begin (V3796 = (V3793(V3795))), ((V3794(V3796))(V3795)) end end end end end end, fun (V3797) -> fun (V3798) -> fun (V3799) -> begin (V3800 = (V3798(V3799))), (V3800(V3799)) end end end end}, fun (V3801) -> fun (V3802) -> V3802 end end}, V0))(V3775))), {'Idris.Prelude.Types.Right', V3803} end), case V3804 of {'Idris.Prelude.Types.Left', E3293} -> (fun (V3805) -> {'Idris.Prelude.Types.Left', V3805} end(E3293)); {'Idris.Prelude.Types.Right', E3294} -> (fun (V3806) -> begin (V3807 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V3806, {'Idris.Core.Env.Nil'}, V3, V3775))), case V3807 of {'Idris.Prelude.Types.Left', E3295} -> (fun (V3808) -> {'Idris.Prelude.Types.Left', V3808} end(E3295)); {'Idris.Prelude.Types.Right', E3296} -> (fun (V3809) -> begin (V3814 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V3810) -> fun (V3811) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V3810, V3811)) end end, fun (V3812) -> fun (V3813) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V3812, V3813)) end end}, V3809, V3775))), case V3814 of {'Idris.Prelude.Types.Left', E3297} -> (fun (V3815) -> {'Idris.Prelude.Types.Left', V3815} end(E3297)); {'Idris.Prelude.Types.Right', E3298} -> (fun (V3816) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V3816))))}, V3775)) end(E3298)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3296)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3294)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E3160, E3161, E3162, E3163, E3164} -> (fun (V3817, V3818, V3819, V3820, V3821) -> fun (V3822) -> begin (V3851 = begin (V3850 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3823) -> fun (V3824) -> fun (V3825) -> fun (V3826) -> fun (V3827) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V3825, V3826, V3827)) end end end end end, fun (V3828) -> fun (V3829) -> fun (V3830) -> V3829 end end end, fun (V3831) -> fun (V3832) -> fun (V3833) -> fun (V3834) -> fun (V3835) -> begin (V3836 = (V3833(V3835))), begin (V3837 = (V3834(V3835))), (V3836(V3837)) end end end end end end end}, fun (V3838) -> fun (V3839) -> fun (V3840) -> fun (V3841) -> fun (V3842) -> begin (V3843 = (V3840(V3842))), ((V3841(V3843))(V3842)) end end end end end end, fun (V3844) -> fun (V3845) -> fun (V3846) -> begin (V3847 = (V3845(V3846))), (V3847(V3846)) end end end end}, fun (V3848) -> fun (V3849) -> V3849 end end}, V0))(V3822))), {'Idris.Prelude.Types.Right', V3850} end), case V3851 of {'Idris.Prelude.Types.Left', E3165} -> (fun (V3852) -> {'Idris.Prelude.Types.Left', V3852} end(E3165)); {'Idris.Prelude.Types.Right', E3166} -> (fun (V3853) -> begin (V3858 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V3854) -> fun (V3855) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V3854, V3855)) end end, fun (V3856) -> fun (V3857) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V3856, V3857)) end end}, V3818, V3822))), case V3858 of {'Idris.Prelude.Types.Left', E3167} -> (fun (V3859) -> {'Idris.Prelude.Types.Left', V3859} end(E3167)); {'Idris.Prelude.Types.Right', E3168} -> (fun (V3860) -> begin (V3861 = (('un--getNArgs'(V0, V3853, V3860, V3821))(V3822))), case V3861 of {'Idris.Prelude.Types.Left', E3169} -> (fun (V3862) -> {'Idris.Prelude.Types.Left', V3862} end(E3169)); {'Idris.Prelude.Types.Right', E3170} -> (fun (V3863) -> case V3863 of {'Idris.Compiler.CompileExpr.User', E3171, E3172} -> (fun (V3864, V3865) -> begin (V3867 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3866) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3853, V3866)) end, V3865))(V3822))), case V3867 of {'Idris.Prelude.Types.Left', E3173} -> (fun (V3868) -> {'Idris.Prelude.Types.Left', V3868} end(E3173)); {'Idris.Prelude.Types.Right', E3174} -> (fun (V3869) -> begin (V3871 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3870) -> ('un--nfToCFType'(V0, V3817, V2, V3870)) end, V3869))(V3822))), case V3871 of {'Idris.Prelude.Types.Left', E3175} -> (fun (V3872) -> {'Idris.Prelude.Types.Left', V3872} end(E3175)); {'Idris.Prelude.Types.Right', E3176} -> (fun (V3873) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V3860, V3873}} end(E3176)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3174)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3171, E3172)); {'Idris.Compiler.CompileExpr.Struct', E3177, E3178} -> (fun (V3874, V3875) -> begin (V3886 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V3876) -> case V3876 of {'Idris.Builtin.MkPair', E3179, E3180} -> (fun (V3877, V3878) -> fun (V3879) -> begin (V3880 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3853, V3878))(V3879))), case V3880 of {'Idris.Prelude.Types.Left', E3181} -> (fun (V3881) -> {'Idris.Prelude.Types.Left', V3881} end(E3181)); {'Idris.Prelude.Types.Right', E3182} -> (fun (V3882) -> begin (V3883 = (('un--nfToCFType'(V0, V3817, 0, V3882))(V3879))), case V3883 of {'Idris.Prelude.Types.Left', E3183} -> (fun (V3884) -> {'Idris.Prelude.Types.Left', V3884} end(E3183)); {'Idris.Prelude.Types.Right', E3184} -> (fun (V3885) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V3877, V3885}} end(E3184)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3182)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3179, E3180)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V3875))(V3822))), case V3886 of {'Idris.Prelude.Types.Left', E3185} -> (fun (V3887) -> {'Idris.Prelude.Types.Left', V3887} end(E3185)); {'Idris.Prelude.Types.Right', E3186} -> (fun (V3888) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V3874, V3888}} end(E3186)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3177, E3178)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E3187} -> (fun (V3889) -> begin (V3890 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V3853, V3889))(V3822))), case V3890 of {'Idris.Prelude.Types.Left', E3188} -> (fun (V3891) -> {'Idris.Prelude.Types.Left', V3891} end(E3188)); {'Idris.Prelude.Types.Right', E3189} -> (fun (V3892) -> begin (V3893 = (('un--nfToCFType'(V0, V3817, V2, V3892))(V3822))), case V3893 of {'Idris.Prelude.Types.Left', E3190} -> (fun (V3894) -> {'Idris.Prelude.Types.Left', V3894} end(E3190)); {'Idris.Prelude.Types.Right', E3191} -> (fun (V3895) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V3895}} end(E3191)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3189)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3187)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E3170)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3168)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3166)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3160, E3161, E3162, E3163, E3164)); {'Idris.Core.Value.NType', E3192} -> (fun (V3896) -> fun (V3897) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E3192)); {'Idris.Core.Value.NErased', E3193, E3194} -> (fun (V3898, V3899) -> fun (V3900) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E3193, E3194)); _ -> fun (V3901) -> begin (V3930 = begin (V3929 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3902) -> fun (V3903) -> fun (V3904) -> fun (V3905) -> fun (V3906) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V3904, V3905, V3906)) end end end end end, fun (V3907) -> fun (V3908) -> fun (V3909) -> V3908 end end end, fun (V3910) -> fun (V3911) -> fun (V3912) -> fun (V3913) -> fun (V3914) -> begin (V3915 = (V3912(V3914))), begin (V3916 = (V3913(V3914))), (V3915(V3916)) end end end end end end end}, fun (V3917) -> fun (V3918) -> fun (V3919) -> fun (V3920) -> fun (V3921) -> begin (V3922 = (V3919(V3921))), ((V3920(V3922))(V3921)) end end end end end end, fun (V3923) -> fun (V3924) -> fun (V3925) -> begin (V3926 = (V3924(V3925))), (V3926(V3925)) end end end end}, fun (V3927) -> fun (V3928) -> V3928 end end}, V0))(V3901))), {'Idris.Prelude.Types.Right', V3929} end), case V3930 of {'Idris.Prelude.Types.Left', E3154} -> (fun (V3931) -> {'Idris.Prelude.Types.Left', V3931} end(E3154)); {'Idris.Prelude.Types.Right', E3155} -> (fun (V3932) -> begin (V3933 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V3932, {'Idris.Core.Env.Nil'}, V3, V3901))), case V3933 of {'Idris.Prelude.Types.Left', E3156} -> (fun (V3934) -> {'Idris.Prelude.Types.Left', V3934} end(E3156)); {'Idris.Prelude.Types.Right', E3157} -> (fun (V3935) -> begin (V3940 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V3936) -> fun (V3937) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V3936, V3937)) end end, fun (V3938) -> fun (V3939) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V3938, V3939)) end end}, V3935, V3901))), case V3940 of {'Idris.Prelude.Types.Left', E3158} -> (fun (V3941) -> {'Idris.Prelude.Types.Left', V3941} end(E3158)); {'Idris.Prelude.Types.Right', E3159} -> (fun (V3942) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V3942))))}, V3901)) end(E3159)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3157)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3155)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end(E3152, E3153)); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E3050, E3051, E3052, E3053} -> (fun (V3943, V3944, V3945, V3946) -> case V3945 of {'Idris.Core.TT.Pi', E3095, E3096, E3097, E3098} -> (fun (V3947, V3948, V3949, V3950) -> fun (V3951) -> begin (V3980 = begin (V3979 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3952) -> fun (V3953) -> fun (V3954) -> fun (V3955) -> fun (V3956) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V3954, V3955, V3956)) end end end end end, fun (V3957) -> fun (V3958) -> fun (V3959) -> V3958 end end end, fun (V3960) -> fun (V3961) -> fun (V3962) -> fun (V3963) -> fun (V3964) -> begin (V3965 = (V3962(V3964))), begin (V3966 = (V3963(V3964))), (V3965(V3966)) end end end end end end end}, fun (V3967) -> fun (V3968) -> fun (V3969) -> fun (V3970) -> fun (V3971) -> begin (V3972 = (V3969(V3971))), ((V3970(V3972))(V3971)) end end end end end end, fun (V3973) -> fun (V3974) -> fun (V3975) -> begin (V3976 = (V3974(V3975))), (V3976(V3975)) end end end end}, fun (V3977) -> fun (V3978) -> V3978 end end}, V0))(V3951))), {'Idris.Prelude.Types.Right', V3979} end), case V3980 of {'Idris.Prelude.Types.Left', E3099} -> (fun (V3981) -> {'Idris.Prelude.Types.Left', V3981} end(E3099)); {'Idris.Prelude.Types.Right', E3100} -> (fun (V3982) -> begin (V3983 = (('un--nfToCFType'(V0, V3943, 1, V3950))(V3951))), case V3983 of {'Idris.Prelude.Types.Left', E3101} -> (fun (V3984) -> {'Idris.Prelude.Types.Left', V3984} end(E3101)); {'Idris.Prelude.Types.Right', E3102} -> (fun (V3985) -> begin (V3986 = (((V3946(V3982))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V3943, 1}))))(V3951))), case V3986 of {'Idris.Prelude.Types.Left', E3103} -> (fun (V3987) -> {'Idris.Prelude.Types.Left', V3987} end(E3103)); {'Idris.Prelude.Types.Right', E3104} -> (fun (V3988) -> begin (V3989 = (('un--nfToCFType'(V0, V3943, 1, V3988))(V3951))), case V3989 of {'Idris.Prelude.Types.Left', E3105} -> (fun (V3990) -> {'Idris.Prelude.Types.Left', V3990} end(E3105)); {'Idris.Prelude.Types.Right', E3106} -> (fun (V3991) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V3985, V3991}} end(E3106)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3104)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3102)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3100)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3095, E3096, E3097, E3098)); _ -> case V3 of {'Idris.Core.Value.NTCon', E3060, E3061, E3062, E3063, E3064} -> (fun (V3992, V3993, V3994, V3995, V3996) -> fun (V3997) -> begin (V4026 = begin (V4025 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V3998) -> fun (V3999) -> fun (V4000) -> fun (V4001) -> fun (V4002) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V4000, V4001, V4002)) end end end end end, fun (V4003) -> fun (V4004) -> fun (V4005) -> V4004 end end end, fun (V4006) -> fun (V4007) -> fun (V4008) -> fun (V4009) -> fun (V4010) -> begin (V4011 = (V4008(V4010))), begin (V4012 = (V4009(V4010))), (V4011(V4012)) end end end end end end end}, fun (V4013) -> fun (V4014) -> fun (V4015) -> fun (V4016) -> fun (V4017) -> begin (V4018 = (V4015(V4017))), ((V4016(V4018))(V4017)) end end end end end end, fun (V4019) -> fun (V4020) -> fun (V4021) -> begin (V4022 = (V4020(V4021))), (V4022(V4021)) end end end end}, fun (V4023) -> fun (V4024) -> V4024 end end}, V0))(V3997))), {'Idris.Prelude.Types.Right', V4025} end), case V4026 of {'Idris.Prelude.Types.Left', E3065} -> (fun (V4027) -> {'Idris.Prelude.Types.Left', V4027} end(E3065)); {'Idris.Prelude.Types.Right', E3066} -> (fun (V4028) -> begin (V4033 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V4029) -> fun (V4030) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V4029, V4030)) end end, fun (V4031) -> fun (V4032) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V4031, V4032)) end end}, V3993, V3997))), case V4033 of {'Idris.Prelude.Types.Left', E3067} -> (fun (V4034) -> {'Idris.Prelude.Types.Left', V4034} end(E3067)); {'Idris.Prelude.Types.Right', E3068} -> (fun (V4035) -> begin (V4036 = (('un--getNArgs'(V0, V4028, V4035, V3996))(V3997))), case V4036 of {'Idris.Prelude.Types.Left', E3069} -> (fun (V4037) -> {'Idris.Prelude.Types.Left', V4037} end(E3069)); {'Idris.Prelude.Types.Right', E3070} -> (fun (V4038) -> case V4038 of {'Idris.Compiler.CompileExpr.User', E3071, E3072} -> (fun (V4039, V4040) -> begin (V4042 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4041) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4028, V4041)) end, V4040))(V3997))), case V4042 of {'Idris.Prelude.Types.Left', E3073} -> (fun (V4043) -> {'Idris.Prelude.Types.Left', V4043} end(E3073)); {'Idris.Prelude.Types.Right', E3074} -> (fun (V4044) -> begin (V4046 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4045) -> ('un--nfToCFType'(V0, V3992, V2, V4045)) end, V4044))(V3997))), case V4046 of {'Idris.Prelude.Types.Left', E3075} -> (fun (V4047) -> {'Idris.Prelude.Types.Left', V4047} end(E3075)); {'Idris.Prelude.Types.Right', E3076} -> (fun (V4048) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V4035, V4048}} end(E3076)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3074)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3071, E3072)); {'Idris.Compiler.CompileExpr.Struct', E3077, E3078} -> (fun (V4049, V4050) -> begin (V4061 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4051) -> case V4051 of {'Idris.Builtin.MkPair', E3079, E3080} -> (fun (V4052, V4053) -> fun (V4054) -> begin (V4055 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4028, V4053))(V4054))), case V4055 of {'Idris.Prelude.Types.Left', E3081} -> (fun (V4056) -> {'Idris.Prelude.Types.Left', V4056} end(E3081)); {'Idris.Prelude.Types.Right', E3082} -> (fun (V4057) -> begin (V4058 = (('un--nfToCFType'(V0, V3992, 0, V4057))(V4054))), case V4058 of {'Idris.Prelude.Types.Left', E3083} -> (fun (V4059) -> {'Idris.Prelude.Types.Left', V4059} end(E3083)); {'Idris.Prelude.Types.Right', E3084} -> (fun (V4060) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V4052, V4060}} end(E3084)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3082)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3079, E3080)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V4050))(V3997))), case V4061 of {'Idris.Prelude.Types.Left', E3085} -> (fun (V4062) -> {'Idris.Prelude.Types.Left', V4062} end(E3085)); {'Idris.Prelude.Types.Right', E3086} -> (fun (V4063) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V4049, V4063}} end(E3086)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3077, E3078)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E3087} -> (fun (V4064) -> begin (V4065 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4028, V4064))(V3997))), case V4065 of {'Idris.Prelude.Types.Left', E3088} -> (fun (V4066) -> {'Idris.Prelude.Types.Left', V4066} end(E3088)); {'Idris.Prelude.Types.Right', E3089} -> (fun (V4067) -> begin (V4068 = (('un--nfToCFType'(V0, V3992, V2, V4067))(V3997))), case V4068 of {'Idris.Prelude.Types.Left', E3090} -> (fun (V4069) -> {'Idris.Prelude.Types.Left', V4069} end(E3090)); {'Idris.Prelude.Types.Right', E3091} -> (fun (V4070) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V4070}} end(E3091)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3089)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3087)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E3070)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3068)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3066)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3060, E3061, E3062, E3063, E3064)); {'Idris.Core.Value.NType', E3092} -> (fun (V4071) -> fun (V4072) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E3092)); {'Idris.Core.Value.NErased', E3093, E3094} -> (fun (V4073, V4074) -> fun (V4075) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E3093, E3094)); _ -> fun (V4076) -> begin (V4105 = begin (V4104 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V4077) -> fun (V4078) -> fun (V4079) -> fun (V4080) -> fun (V4081) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V4079, V4080, V4081)) end end end end end, fun (V4082) -> fun (V4083) -> fun (V4084) -> V4083 end end end, fun (V4085) -> fun (V4086) -> fun (V4087) -> fun (V4088) -> fun (V4089) -> begin (V4090 = (V4087(V4089))), begin (V4091 = (V4088(V4089))), (V4090(V4091)) end end end end end end end}, fun (V4092) -> fun (V4093) -> fun (V4094) -> fun (V4095) -> fun (V4096) -> begin (V4097 = (V4094(V4096))), ((V4095(V4097))(V4096)) end end end end end end, fun (V4098) -> fun (V4099) -> fun (V4100) -> begin (V4101 = (V4099(V4100))), (V4101(V4100)) end end end end}, fun (V4102) -> fun (V4103) -> V4103 end end}, V0))(V4076))), {'Idris.Prelude.Types.Right', V4104} end), case V4105 of {'Idris.Prelude.Types.Left', E3054} -> (fun (V4106) -> {'Idris.Prelude.Types.Left', V4106} end(E3054)); {'Idris.Prelude.Types.Right', E3055} -> (fun (V4107) -> begin (V4108 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V4107, {'Idris.Core.Env.Nil'}, V3, V4076))), case V4108 of {'Idris.Prelude.Types.Left', E3056} -> (fun (V4109) -> {'Idris.Prelude.Types.Left', V4109} end(E3056)); {'Idris.Prelude.Types.Right', E3057} -> (fun (V4110) -> begin (V4115 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V4111) -> fun (V4112) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V4111, V4112)) end end, fun (V4113) -> fun (V4114) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V4113, V4114)) end end}, V4110, V4076))), case V4115 of {'Idris.Prelude.Types.Left', E3058} -> (fun (V4116) -> {'Idris.Prelude.Types.Left', V4116} end(E3058)); {'Idris.Prelude.Types.Right', E3059} -> (fun (V4117) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V4117))))}, V4076)) end(E3059)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3057)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3055)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E3050, E3051, E3052, E3053)); _ -> case V3 of {'Idris.Core.Value.NTCon', E3015, E3016, E3017, E3018, E3019} -> (fun (V4118, V4119, V4120, V4121, V4122) -> fun (V4123) -> begin (V4152 = begin (V4151 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V4124) -> fun (V4125) -> fun (V4126) -> fun (V4127) -> fun (V4128) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V4126, V4127, V4128)) end end end end end, fun (V4129) -> fun (V4130) -> fun (V4131) -> V4130 end end end, fun (V4132) -> fun (V4133) -> fun (V4134) -> fun (V4135) -> fun (V4136) -> begin (V4137 = (V4134(V4136))), begin (V4138 = (V4135(V4136))), (V4137(V4138)) end end end end end end end}, fun (V4139) -> fun (V4140) -> fun (V4141) -> fun (V4142) -> fun (V4143) -> begin (V4144 = (V4141(V4143))), ((V4142(V4144))(V4143)) end end end end end end, fun (V4145) -> fun (V4146) -> fun (V4147) -> begin (V4148 = (V4146(V4147))), (V4148(V4147)) end end end end}, fun (V4149) -> fun (V4150) -> V4150 end end}, V0))(V4123))), {'Idris.Prelude.Types.Right', V4151} end), case V4152 of {'Idris.Prelude.Types.Left', E3020} -> (fun (V4153) -> {'Idris.Prelude.Types.Left', V4153} end(E3020)); {'Idris.Prelude.Types.Right', E3021} -> (fun (V4154) -> begin (V4159 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V4155) -> fun (V4156) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V4155, V4156)) end end, fun (V4157) -> fun (V4158) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V4157, V4158)) end end}, V4119, V4123))), case V4159 of {'Idris.Prelude.Types.Left', E3022} -> (fun (V4160) -> {'Idris.Prelude.Types.Left', V4160} end(E3022)); {'Idris.Prelude.Types.Right', E3023} -> (fun (V4161) -> begin (V4162 = (('un--getNArgs'(V0, V4154, V4161, V4122))(V4123))), case V4162 of {'Idris.Prelude.Types.Left', E3024} -> (fun (V4163) -> {'Idris.Prelude.Types.Left', V4163} end(E3024)); {'Idris.Prelude.Types.Right', E3025} -> (fun (V4164) -> case V4164 of {'Idris.Compiler.CompileExpr.User', E3026, E3027} -> (fun (V4165, V4166) -> begin (V4168 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4167) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4154, V4167)) end, V4166))(V4123))), case V4168 of {'Idris.Prelude.Types.Left', E3028} -> (fun (V4169) -> {'Idris.Prelude.Types.Left', V4169} end(E3028)); {'Idris.Prelude.Types.Right', E3029} -> (fun (V4170) -> begin (V4172 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4171) -> ('un--nfToCFType'(V0, V4118, V2, V4171)) end, V4170))(V4123))), case V4172 of {'Idris.Prelude.Types.Left', E3030} -> (fun (V4173) -> {'Idris.Prelude.Types.Left', V4173} end(E3030)); {'Idris.Prelude.Types.Right', E3031} -> (fun (V4174) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V4161, V4174}} end(E3031)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3029)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3026, E3027)); {'Idris.Compiler.CompileExpr.Struct', E3032, E3033} -> (fun (V4175, V4176) -> begin (V4187 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4177) -> case V4177 of {'Idris.Builtin.MkPair', E3034, E3035} -> (fun (V4178, V4179) -> fun (V4180) -> begin (V4181 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4154, V4179))(V4180))), case V4181 of {'Idris.Prelude.Types.Left', E3036} -> (fun (V4182) -> {'Idris.Prelude.Types.Left', V4182} end(E3036)); {'Idris.Prelude.Types.Right', E3037} -> (fun (V4183) -> begin (V4184 = (('un--nfToCFType'(V0, V4118, 0, V4183))(V4180))), case V4184 of {'Idris.Prelude.Types.Left', E3038} -> (fun (V4185) -> {'Idris.Prelude.Types.Left', V4185} end(E3038)); {'Idris.Prelude.Types.Right', E3039} -> (fun (V4186) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V4178, V4186}} end(E3039)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3037)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3034, E3035)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V4176))(V4123))), case V4187 of {'Idris.Prelude.Types.Left', E3040} -> (fun (V4188) -> {'Idris.Prelude.Types.Left', V4188} end(E3040)); {'Idris.Prelude.Types.Right', E3041} -> (fun (V4189) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V4175, V4189}} end(E3041)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3032, E3033)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E3042} -> (fun (V4190) -> begin (V4191 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4154, V4190))(V4123))), case V4191 of {'Idris.Prelude.Types.Left', E3043} -> (fun (V4192) -> {'Idris.Prelude.Types.Left', V4192} end(E3043)); {'Idris.Prelude.Types.Right', E3044} -> (fun (V4193) -> begin (V4194 = (('un--nfToCFType'(V0, V4118, V2, V4193))(V4123))), case V4194 of {'Idris.Prelude.Types.Left', E3045} -> (fun (V4195) -> {'Idris.Prelude.Types.Left', V4195} end(E3045)); {'Idris.Prelude.Types.Right', E3046} -> (fun (V4196) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V4196}} end(E3046)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3044)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3042)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E3025)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3023)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3021)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3015, E3016, E3017, E3018, E3019)); {'Idris.Core.Value.NType', E3047} -> (fun (V4197) -> fun (V4198) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E3047)); {'Idris.Core.Value.NErased', E3048, E3049} -> (fun (V4199, V4200) -> fun (V4201) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E3048, E3049)); _ -> fun (V4202) -> begin (V4231 = begin (V4230 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V4203) -> fun (V4204) -> fun (V4205) -> fun (V4206) -> fun (V4207) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V4205, V4206, V4207)) end end end end end, fun (V4208) -> fun (V4209) -> fun (V4210) -> V4209 end end end, fun (V4211) -> fun (V4212) -> fun (V4213) -> fun (V4214) -> fun (V4215) -> begin (V4216 = (V4213(V4215))), begin (V4217 = (V4214(V4215))), (V4216(V4217)) end end end end end end end}, fun (V4218) -> fun (V4219) -> fun (V4220) -> fun (V4221) -> fun (V4222) -> begin (V4223 = (V4220(V4222))), ((V4221(V4223))(V4222)) end end end end end end, fun (V4224) -> fun (V4225) -> fun (V4226) -> begin (V4227 = (V4225(V4226))), (V4227(V4226)) end end end end}, fun (V4228) -> fun (V4229) -> V4229 end end}, V0))(V4202))), {'Idris.Prelude.Types.Right', V4230} end), case V4231 of {'Idris.Prelude.Types.Left', E3009} -> (fun (V4232) -> {'Idris.Prelude.Types.Left', V4232} end(E3009)); {'Idris.Prelude.Types.Right', E3010} -> (fun (V4233) -> begin (V4234 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V4233, {'Idris.Core.Env.Nil'}, V3, V4202))), case V4234 of {'Idris.Prelude.Types.Left', E3011} -> (fun (V4235) -> {'Idris.Prelude.Types.Left', V4235} end(E3011)); {'Idris.Prelude.Types.Right', E3012} -> (fun (V4236) -> begin (V4241 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V4237) -> fun (V4238) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V4237, V4238)) end end, fun (V4239) -> fun (V4240) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V4239, V4240)) end end}, V4236, V4202))), case V4241 of {'Idris.Prelude.Types.Left', E3013} -> (fun (V4242) -> {'Idris.Prelude.Types.Left', V4242} end(E3013)); {'Idris.Prelude.Types.Right', E3014} -> (fun (V4243) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V4243))))}, V4202)) end(E3014)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3012)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3010)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E3148, E3149, E3150, E3151} -> (fun (V4244, V4245, V4246, V4247) -> fun (V4248) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V4244, <<"Function types not allowed in a foreign struct"/utf8>>}, V4248)) end end(E3148, E3149, E3150, E3151)); _ -> case V3 of {'Idris.Core.Value.NTCon', E3113, E3114, E3115, E3116, E3117} -> (fun (V4249, V4250, V4251, V4252, V4253) -> fun (V4254) -> begin (V4283 = begin (V4282 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V4255) -> fun (V4256) -> fun (V4257) -> fun (V4258) -> fun (V4259) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V4257, V4258, V4259)) end end end end end, fun (V4260) -> fun (V4261) -> fun (V4262) -> V4261 end end end, fun (V4263) -> fun (V4264) -> fun (V4265) -> fun (V4266) -> fun (V4267) -> begin (V4268 = (V4265(V4267))), begin (V4269 = (V4266(V4267))), (V4268(V4269)) end end end end end end end}, fun (V4270) -> fun (V4271) -> fun (V4272) -> fun (V4273) -> fun (V4274) -> begin (V4275 = (V4272(V4274))), ((V4273(V4275))(V4274)) end end end end end end, fun (V4276) -> fun (V4277) -> fun (V4278) -> begin (V4279 = (V4277(V4278))), (V4279(V4278)) end end end end}, fun (V4280) -> fun (V4281) -> V4281 end end}, V0))(V4254))), {'Idris.Prelude.Types.Right', V4282} end), case V4283 of {'Idris.Prelude.Types.Left', E3118} -> (fun (V4284) -> {'Idris.Prelude.Types.Left', V4284} end(E3118)); {'Idris.Prelude.Types.Right', E3119} -> (fun (V4285) -> begin (V4290 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V4286) -> fun (V4287) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V4286, V4287)) end end, fun (V4288) -> fun (V4289) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V4288, V4289)) end end}, V4250, V4254))), case V4290 of {'Idris.Prelude.Types.Left', E3120} -> (fun (V4291) -> {'Idris.Prelude.Types.Left', V4291} end(E3120)); {'Idris.Prelude.Types.Right', E3121} -> (fun (V4292) -> begin (V4293 = (('un--getNArgs'(V0, V4285, V4292, V4253))(V4254))), case V4293 of {'Idris.Prelude.Types.Left', E3122} -> (fun (V4294) -> {'Idris.Prelude.Types.Left', V4294} end(E3122)); {'Idris.Prelude.Types.Right', E3123} -> (fun (V4295) -> case V4295 of {'Idris.Compiler.CompileExpr.User', E3124, E3125} -> (fun (V4296, V4297) -> begin (V4299 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4298) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4285, V4298)) end, V4297))(V4254))), case V4299 of {'Idris.Prelude.Types.Left', E3126} -> (fun (V4300) -> {'Idris.Prelude.Types.Left', V4300} end(E3126)); {'Idris.Prelude.Types.Right', E3127} -> (fun (V4301) -> begin (V4303 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4302) -> ('un--nfToCFType'(V0, V4249, V2, V4302)) end, V4301))(V4254))), case V4303 of {'Idris.Prelude.Types.Left', E3128} -> (fun (V4304) -> {'Idris.Prelude.Types.Left', V4304} end(E3128)); {'Idris.Prelude.Types.Right', E3129} -> (fun (V4305) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V4292, V4305}} end(E3129)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3127)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3124, E3125)); {'Idris.Compiler.CompileExpr.Struct', E3130, E3131} -> (fun (V4306, V4307) -> begin (V4318 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4308) -> case V4308 of {'Idris.Builtin.MkPair', E3132, E3133} -> (fun (V4309, V4310) -> fun (V4311) -> begin (V4312 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4285, V4310))(V4311))), case V4312 of {'Idris.Prelude.Types.Left', E3134} -> (fun (V4313) -> {'Idris.Prelude.Types.Left', V4313} end(E3134)); {'Idris.Prelude.Types.Right', E3135} -> (fun (V4314) -> begin (V4315 = (('un--nfToCFType'(V0, V4249, 0, V4314))(V4311))), case V4315 of {'Idris.Prelude.Types.Left', E3136} -> (fun (V4316) -> {'Idris.Prelude.Types.Left', V4316} end(E3136)); {'Idris.Prelude.Types.Right', E3137} -> (fun (V4317) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V4309, V4317}} end(E3137)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3135)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3132, E3133)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V4307))(V4254))), case V4318 of {'Idris.Prelude.Types.Left', E3138} -> (fun (V4319) -> {'Idris.Prelude.Types.Left', V4319} end(E3138)); {'Idris.Prelude.Types.Right', E3139} -> (fun (V4320) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V4306, V4320}} end(E3139)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3130, E3131)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E3140} -> (fun (V4321) -> begin (V4322 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4285, V4321))(V4254))), case V4322 of {'Idris.Prelude.Types.Left', E3141} -> (fun (V4323) -> {'Idris.Prelude.Types.Left', V4323} end(E3141)); {'Idris.Prelude.Types.Right', E3142} -> (fun (V4324) -> begin (V4325 = (('un--nfToCFType'(V0, V4249, V2, V4324))(V4254))), case V4325 of {'Idris.Prelude.Types.Left', E3143} -> (fun (V4326) -> {'Idris.Prelude.Types.Left', V4326} end(E3143)); {'Idris.Prelude.Types.Right', E3144} -> (fun (V4327) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V4327}} end(E3144)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3142)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3140)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E3123)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3121)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3119)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3113, E3114, E3115, E3116, E3117)); {'Idris.Core.Value.NType', E3145} -> (fun (V4328) -> fun (V4329) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E3145)); {'Idris.Core.Value.NErased', E3146, E3147} -> (fun (V4330, V4331) -> fun (V4332) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E3146, E3147)); _ -> fun (V4333) -> begin (V4362 = begin (V4361 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V4334) -> fun (V4335) -> fun (V4336) -> fun (V4337) -> fun (V4338) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V4336, V4337, V4338)) end end end end end, fun (V4339) -> fun (V4340) -> fun (V4341) -> V4340 end end end, fun (V4342) -> fun (V4343) -> fun (V4344) -> fun (V4345) -> fun (V4346) -> begin (V4347 = (V4344(V4346))), begin (V4348 = (V4345(V4346))), (V4347(V4348)) end end end end end end end}, fun (V4349) -> fun (V4350) -> fun (V4351) -> fun (V4352) -> fun (V4353) -> begin (V4354 = (V4351(V4353))), ((V4352(V4354))(V4353)) end end end end end end, fun (V4355) -> fun (V4356) -> fun (V4357) -> begin (V4358 = (V4356(V4357))), (V4358(V4357)) end end end end}, fun (V4359) -> fun (V4360) -> V4360 end end}, V0))(V4333))), {'Idris.Prelude.Types.Right', V4361} end), case V4362 of {'Idris.Prelude.Types.Left', E3107} -> (fun (V4363) -> {'Idris.Prelude.Types.Left', V4363} end(E3107)); {'Idris.Prelude.Types.Right', E3108} -> (fun (V4364) -> begin (V4365 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V4364, {'Idris.Core.Env.Nil'}, V3, V4333))), case V4365 of {'Idris.Prelude.Types.Left', E3109} -> (fun (V4366) -> {'Idris.Prelude.Types.Left', V4366} end(E3109)); {'Idris.Prelude.Types.Right', E3110} -> (fun (V4367) -> begin (V4372 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V4368) -> fun (V4369) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V4368, V4369)) end end, fun (V4370) -> fun (V4371) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V4370, V4371)) end end}, V4367, V4333))), case V4372 of {'Idris.Prelude.Types.Left', E3111} -> (fun (V4373) -> {'Idris.Prelude.Types.Left', V4373} end(E3111)); {'Idris.Prelude.Types.Right', E3112} -> (fun (V4374) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V4374))))}, V4333)) end(E3112)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3110)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3108)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E2974, E2975, E2976, E2977, E2978} -> (fun (V4375, V4376, V4377, V4378, V4379) -> fun (V4380) -> begin (V4409 = begin (V4408 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V4381) -> fun (V4382) -> fun (V4383) -> fun (V4384) -> fun (V4385) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V4383, V4384, V4385)) end end end end end, fun (V4386) -> fun (V4387) -> fun (V4388) -> V4387 end end end, fun (V4389) -> fun (V4390) -> fun (V4391) -> fun (V4392) -> fun (V4393) -> begin (V4394 = (V4391(V4393))), begin (V4395 = (V4392(V4393))), (V4394(V4395)) end end end end end end end}, fun (V4396) -> fun (V4397) -> fun (V4398) -> fun (V4399) -> fun (V4400) -> begin (V4401 = (V4398(V4400))), ((V4399(V4401))(V4400)) end end end end end end, fun (V4402) -> fun (V4403) -> fun (V4404) -> begin (V4405 = (V4403(V4404))), (V4405(V4404)) end end end end}, fun (V4406) -> fun (V4407) -> V4407 end end}, V0))(V4380))), {'Idris.Prelude.Types.Right', V4408} end), case V4409 of {'Idris.Prelude.Types.Left', E2979} -> (fun (V4410) -> {'Idris.Prelude.Types.Left', V4410} end(E2979)); {'Idris.Prelude.Types.Right', E2980} -> (fun (V4411) -> begin (V4416 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V4412) -> fun (V4413) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V4412, V4413)) end end, fun (V4414) -> fun (V4415) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V4414, V4415)) end end}, V4376, V4380))), case V4416 of {'Idris.Prelude.Types.Left', E2981} -> (fun (V4417) -> {'Idris.Prelude.Types.Left', V4417} end(E2981)); {'Idris.Prelude.Types.Right', E2982} -> (fun (V4418) -> begin (V4419 = (('un--getNArgs'(V0, V4411, V4418, V4379))(V4380))), case V4419 of {'Idris.Prelude.Types.Left', E2983} -> (fun (V4420) -> {'Idris.Prelude.Types.Left', V4420} end(E2983)); {'Idris.Prelude.Types.Right', E2984} -> (fun (V4421) -> case V4421 of {'Idris.Compiler.CompileExpr.User', E2985, E2986} -> (fun (V4422, V4423) -> begin (V4425 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4424) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4411, V4424)) end, V4423))(V4380))), case V4425 of {'Idris.Prelude.Types.Left', E2987} -> (fun (V4426) -> {'Idris.Prelude.Types.Left', V4426} end(E2987)); {'Idris.Prelude.Types.Right', E2988} -> (fun (V4427) -> begin (V4429 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4428) -> ('un--nfToCFType'(V0, V4375, V2, V4428)) end, V4427))(V4380))), case V4429 of {'Idris.Prelude.Types.Left', E2989} -> (fun (V4430) -> {'Idris.Prelude.Types.Left', V4430} end(E2989)); {'Idris.Prelude.Types.Right', E2990} -> (fun (V4431) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V4418, V4431}} end(E2990)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2988)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2985, E2986)); {'Idris.Compiler.CompileExpr.Struct', E2991, E2992} -> (fun (V4432, V4433) -> begin (V4444 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4434) -> case V4434 of {'Idris.Builtin.MkPair', E2993, E2994} -> (fun (V4435, V4436) -> fun (V4437) -> begin (V4438 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4411, V4436))(V4437))), case V4438 of {'Idris.Prelude.Types.Left', E2995} -> (fun (V4439) -> {'Idris.Prelude.Types.Left', V4439} end(E2995)); {'Idris.Prelude.Types.Right', E2996} -> (fun (V4440) -> begin (V4441 = (('un--nfToCFType'(V0, V4375, 0, V4440))(V4437))), case V4441 of {'Idris.Prelude.Types.Left', E2997} -> (fun (V4442) -> {'Idris.Prelude.Types.Left', V4442} end(E2997)); {'Idris.Prelude.Types.Right', E2998} -> (fun (V4443) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V4435, V4443}} end(E2998)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2996)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2993, E2994)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V4433))(V4380))), case V4444 of {'Idris.Prelude.Types.Left', E2999} -> (fun (V4445) -> {'Idris.Prelude.Types.Left', V4445} end(E2999)); {'Idris.Prelude.Types.Right', E3000} -> (fun (V4446) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V4432, V4446}} end(E3000)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2991, E2992)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E3001} -> (fun (V4447) -> begin (V4448 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4411, V4447))(V4380))), case V4448 of {'Idris.Prelude.Types.Left', E3002} -> (fun (V4449) -> {'Idris.Prelude.Types.Left', V4449} end(E3002)); {'Idris.Prelude.Types.Right', E3003} -> (fun (V4450) -> begin (V4451 = (('un--nfToCFType'(V0, V4375, V2, V4450))(V4380))), case V4451 of {'Idris.Prelude.Types.Left', E3004} -> (fun (V4452) -> {'Idris.Prelude.Types.Left', V4452} end(E3004)); {'Idris.Prelude.Types.Right', E3005} -> (fun (V4453) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V4453}} end(E3005)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3003)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E3001)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2984)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2982)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2980)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2974, E2975, E2976, E2977, E2978)); {'Idris.Core.Value.NType', E3006} -> (fun (V4454) -> fun (V4455) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E3006)); {'Idris.Core.Value.NErased', E3007, E3008} -> (fun (V4456, V4457) -> fun (V4458) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E3007, E3008)); _ -> fun (V4459) -> begin (V4488 = begin (V4487 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V4460) -> fun (V4461) -> fun (V4462) -> fun (V4463) -> fun (V4464) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V4462, V4463, V4464)) end end end end end, fun (V4465) -> fun (V4466) -> fun (V4467) -> V4466 end end end, fun (V4468) -> fun (V4469) -> fun (V4470) -> fun (V4471) -> fun (V4472) -> begin (V4473 = (V4470(V4472))), begin (V4474 = (V4471(V4472))), (V4473(V4474)) end end end end end end end}, fun (V4475) -> fun (V4476) -> fun (V4477) -> fun (V4478) -> fun (V4479) -> begin (V4480 = (V4477(V4479))), ((V4478(V4480))(V4479)) end end end end end end, fun (V4481) -> fun (V4482) -> fun (V4483) -> begin (V4484 = (V4482(V4483))), (V4484(V4483)) end end end end}, fun (V4485) -> fun (V4486) -> V4486 end end}, V0))(V4459))), {'Idris.Prelude.Types.Right', V4487} end), case V4488 of {'Idris.Prelude.Types.Left', E2968} -> (fun (V4489) -> {'Idris.Prelude.Types.Left', V4489} end(E2968)); {'Idris.Prelude.Types.Right', E2969} -> (fun (V4490) -> begin (V4491 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V4490, {'Idris.Core.Env.Nil'}, V3, V4459))), case V4491 of {'Idris.Prelude.Types.Left', E2970} -> (fun (V4492) -> {'Idris.Prelude.Types.Left', V4492} end(E2970)); {'Idris.Prelude.Types.Right', E2971} -> (fun (V4493) -> begin (V4498 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V4494) -> fun (V4495) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V4494, V4495)) end end, fun (V4496) -> fun (V4497) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V4496, V4497)) end end}, V4493, V4459))), case V4498 of {'Idris.Prelude.Types.Left', E2972} -> (fun (V4499) -> {'Idris.Prelude.Types.Left', V4499} end(E2972)); {'Idris.Prelude.Types.Right', E2973} -> (fun (V4500) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V4500))))}, V4459)) end(E2973)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2971)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2969)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end; _ -> case V3 of {'Idris.Core.Value.NPrimVal', E2040, E2041} -> (fun (V4501, V4502) -> case V4502 of {'Idris.Core.TT.DoubleType'} -> (fun () -> fun (V4503) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFDouble'}} end end()); {'Idris.Core.TT.CharType'} -> (fun () -> fun (V4504) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFChar'}} end end()); {'Idris.Core.TT.WorldType'} -> (fun () -> fun (V4505) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFWorld'}} end end()); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E2124, E2125, E2126, E2127} -> (fun (V4506, V4507, V4508, V4509) -> case V4508 of {'Idris.Core.TT.Pi', E2169, E2170, E2171, E2172} -> (fun (V4510, V4511, V4512, V4513) -> fun (V4514) -> begin (V4543 = begin (V4542 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V4515) -> fun (V4516) -> fun (V4517) -> fun (V4518) -> fun (V4519) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V4517, V4518, V4519)) end end end end end, fun (V4520) -> fun (V4521) -> fun (V4522) -> V4521 end end end, fun (V4523) -> fun (V4524) -> fun (V4525) -> fun (V4526) -> fun (V4527) -> begin (V4528 = (V4525(V4527))), begin (V4529 = (V4526(V4527))), (V4528(V4529)) end end end end end end end}, fun (V4530) -> fun (V4531) -> fun (V4532) -> fun (V4533) -> fun (V4534) -> begin (V4535 = (V4532(V4534))), ((V4533(V4535))(V4534)) end end end end end end, fun (V4536) -> fun (V4537) -> fun (V4538) -> begin (V4539 = (V4537(V4538))), (V4539(V4538)) end end end end}, fun (V4540) -> fun (V4541) -> V4541 end end}, V0))(V4514))), {'Idris.Prelude.Types.Right', V4542} end), case V4543 of {'Idris.Prelude.Types.Left', E2173} -> (fun (V4544) -> {'Idris.Prelude.Types.Left', V4544} end(E2173)); {'Idris.Prelude.Types.Right', E2174} -> (fun (V4545) -> begin (V4546 = (('un--nfToCFType'(V0, V4506, 1, V4513))(V4514))), case V4546 of {'Idris.Prelude.Types.Left', E2175} -> (fun (V4547) -> {'Idris.Prelude.Types.Left', V4547} end(E2175)); {'Idris.Prelude.Types.Right', E2176} -> (fun (V4548) -> begin (V4549 = (((V4509(V4545))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V4506, 1}))))(V4514))), case V4549 of {'Idris.Prelude.Types.Left', E2177} -> (fun (V4550) -> {'Idris.Prelude.Types.Left', V4550} end(E2177)); {'Idris.Prelude.Types.Right', E2178} -> (fun (V4551) -> begin (V4552 = (('un--nfToCFType'(V0, V4506, 1, V4551))(V4514))), case V4552 of {'Idris.Prelude.Types.Left', E2179} -> (fun (V4553) -> {'Idris.Prelude.Types.Left', V4553} end(E2179)); {'Idris.Prelude.Types.Right', E2180} -> (fun (V4554) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V4548, V4554}} end(E2180)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2178)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2176)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2174)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2169, E2170, E2171, E2172)); _ -> case V3 of {'Idris.Core.Value.NTCon', E2134, E2135, E2136, E2137, E2138} -> (fun (V4555, V4556, V4557, V4558, V4559) -> fun (V4560) -> begin (V4589 = begin (V4588 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V4561) -> fun (V4562) -> fun (V4563) -> fun (V4564) -> fun (V4565) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V4563, V4564, V4565)) end end end end end, fun (V4566) -> fun (V4567) -> fun (V4568) -> V4567 end end end, fun (V4569) -> fun (V4570) -> fun (V4571) -> fun (V4572) -> fun (V4573) -> begin (V4574 = (V4571(V4573))), begin (V4575 = (V4572(V4573))), (V4574(V4575)) end end end end end end end}, fun (V4576) -> fun (V4577) -> fun (V4578) -> fun (V4579) -> fun (V4580) -> begin (V4581 = (V4578(V4580))), ((V4579(V4581))(V4580)) end end end end end end, fun (V4582) -> fun (V4583) -> fun (V4584) -> begin (V4585 = (V4583(V4584))), (V4585(V4584)) end end end end}, fun (V4586) -> fun (V4587) -> V4587 end end}, V0))(V4560))), {'Idris.Prelude.Types.Right', V4588} end), case V4589 of {'Idris.Prelude.Types.Left', E2139} -> (fun (V4590) -> {'Idris.Prelude.Types.Left', V4590} end(E2139)); {'Idris.Prelude.Types.Right', E2140} -> (fun (V4591) -> begin (V4596 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V4592) -> fun (V4593) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V4592, V4593)) end end, fun (V4594) -> fun (V4595) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V4594, V4595)) end end}, V4556, V4560))), case V4596 of {'Idris.Prelude.Types.Left', E2141} -> (fun (V4597) -> {'Idris.Prelude.Types.Left', V4597} end(E2141)); {'Idris.Prelude.Types.Right', E2142} -> (fun (V4598) -> begin (V4599 = (('un--getNArgs'(V0, V4591, V4598, V4559))(V4560))), case V4599 of {'Idris.Prelude.Types.Left', E2143} -> (fun (V4600) -> {'Idris.Prelude.Types.Left', V4600} end(E2143)); {'Idris.Prelude.Types.Right', E2144} -> (fun (V4601) -> case V4601 of {'Idris.Compiler.CompileExpr.User', E2145, E2146} -> (fun (V4602, V4603) -> begin (V4605 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4604) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4591, V4604)) end, V4603))(V4560))), case V4605 of {'Idris.Prelude.Types.Left', E2147} -> (fun (V4606) -> {'Idris.Prelude.Types.Left', V4606} end(E2147)); {'Idris.Prelude.Types.Right', E2148} -> (fun (V4607) -> begin (V4609 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4608) -> ('un--nfToCFType'(V0, V4555, V2, V4608)) end, V4607))(V4560))), case V4609 of {'Idris.Prelude.Types.Left', E2149} -> (fun (V4610) -> {'Idris.Prelude.Types.Left', V4610} end(E2149)); {'Idris.Prelude.Types.Right', E2150} -> (fun (V4611) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V4598, V4611}} end(E2150)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2148)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2145, E2146)); {'Idris.Compiler.CompileExpr.Struct', E2151, E2152} -> (fun (V4612, V4613) -> begin (V4624 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4614) -> case V4614 of {'Idris.Builtin.MkPair', E2153, E2154} -> (fun (V4615, V4616) -> fun (V4617) -> begin (V4618 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4591, V4616))(V4617))), case V4618 of {'Idris.Prelude.Types.Left', E2155} -> (fun (V4619) -> {'Idris.Prelude.Types.Left', V4619} end(E2155)); {'Idris.Prelude.Types.Right', E2156} -> (fun (V4620) -> begin (V4621 = (('un--nfToCFType'(V0, V4555, 0, V4620))(V4617))), case V4621 of {'Idris.Prelude.Types.Left', E2157} -> (fun (V4622) -> {'Idris.Prelude.Types.Left', V4622} end(E2157)); {'Idris.Prelude.Types.Right', E2158} -> (fun (V4623) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V4615, V4623}} end(E2158)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2156)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2153, E2154)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V4613))(V4560))), case V4624 of {'Idris.Prelude.Types.Left', E2159} -> (fun (V4625) -> {'Idris.Prelude.Types.Left', V4625} end(E2159)); {'Idris.Prelude.Types.Right', E2160} -> (fun (V4626) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V4612, V4626}} end(E2160)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2151, E2152)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2161} -> (fun (V4627) -> begin (V4628 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4591, V4627))(V4560))), case V4628 of {'Idris.Prelude.Types.Left', E2162} -> (fun (V4629) -> {'Idris.Prelude.Types.Left', V4629} end(E2162)); {'Idris.Prelude.Types.Right', E2163} -> (fun (V4630) -> begin (V4631 = (('un--nfToCFType'(V0, V4555, V2, V4630))(V4560))), case V4631 of {'Idris.Prelude.Types.Left', E2164} -> (fun (V4632) -> {'Idris.Prelude.Types.Left', V4632} end(E2164)); {'Idris.Prelude.Types.Right', E2165} -> (fun (V4633) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V4633}} end(E2165)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2163)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2161)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2144)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2142)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2140)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2134, E2135, E2136, E2137, E2138)); {'Idris.Core.Value.NType', E2166} -> (fun (V4634) -> fun (V4635) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2166)); {'Idris.Core.Value.NErased', E2167, E2168} -> (fun (V4636, V4637) -> fun (V4638) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2167, E2168)); _ -> fun (V4639) -> begin (V4668 = begin (V4667 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V4640) -> fun (V4641) -> fun (V4642) -> fun (V4643) -> fun (V4644) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V4642, V4643, V4644)) end end end end end, fun (V4645) -> fun (V4646) -> fun (V4647) -> V4646 end end end, fun (V4648) -> fun (V4649) -> fun (V4650) -> fun (V4651) -> fun (V4652) -> begin (V4653 = (V4650(V4652))), begin (V4654 = (V4651(V4652))), (V4653(V4654)) end end end end end end end}, fun (V4655) -> fun (V4656) -> fun (V4657) -> fun (V4658) -> fun (V4659) -> begin (V4660 = (V4657(V4659))), ((V4658(V4660))(V4659)) end end end end end end, fun (V4661) -> fun (V4662) -> fun (V4663) -> begin (V4664 = (V4662(V4663))), (V4664(V4663)) end end end end}, fun (V4665) -> fun (V4666) -> V4666 end end}, V0))(V4639))), {'Idris.Prelude.Types.Right', V4667} end), case V4668 of {'Idris.Prelude.Types.Left', E2128} -> (fun (V4669) -> {'Idris.Prelude.Types.Left', V4669} end(E2128)); {'Idris.Prelude.Types.Right', E2129} -> (fun (V4670) -> begin (V4671 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V4670, {'Idris.Core.Env.Nil'}, V3, V4639))), case V4671 of {'Idris.Prelude.Types.Left', E2130} -> (fun (V4672) -> {'Idris.Prelude.Types.Left', V4672} end(E2130)); {'Idris.Prelude.Types.Right', E2131} -> (fun (V4673) -> begin (V4678 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V4674) -> fun (V4675) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V4674, V4675)) end end, fun (V4676) -> fun (V4677) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V4676, V4677)) end end}, V4673, V4639))), case V4678 of {'Idris.Prelude.Types.Left', E2132} -> (fun (V4679) -> {'Idris.Prelude.Types.Left', V4679} end(E2132)); {'Idris.Prelude.Types.Right', E2133} -> (fun (V4680) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V4680))))}, V4639)) end(E2133)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2131)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2129)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E2124, E2125, E2126, E2127)); _ -> case V3 of {'Idris.Core.Value.NTCon', E2089, E2090, E2091, E2092, E2093} -> (fun (V4681, V4682, V4683, V4684, V4685) -> fun (V4686) -> begin (V4715 = begin (V4714 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V4687) -> fun (V4688) -> fun (V4689) -> fun (V4690) -> fun (V4691) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V4689, V4690, V4691)) end end end end end, fun (V4692) -> fun (V4693) -> fun (V4694) -> V4693 end end end, fun (V4695) -> fun (V4696) -> fun (V4697) -> fun (V4698) -> fun (V4699) -> begin (V4700 = (V4697(V4699))), begin (V4701 = (V4698(V4699))), (V4700(V4701)) end end end end end end end}, fun (V4702) -> fun (V4703) -> fun (V4704) -> fun (V4705) -> fun (V4706) -> begin (V4707 = (V4704(V4706))), ((V4705(V4707))(V4706)) end end end end end end, fun (V4708) -> fun (V4709) -> fun (V4710) -> begin (V4711 = (V4709(V4710))), (V4711(V4710)) end end end end}, fun (V4712) -> fun (V4713) -> V4713 end end}, V0))(V4686))), {'Idris.Prelude.Types.Right', V4714} end), case V4715 of {'Idris.Prelude.Types.Left', E2094} -> (fun (V4716) -> {'Idris.Prelude.Types.Left', V4716} end(E2094)); {'Idris.Prelude.Types.Right', E2095} -> (fun (V4717) -> begin (V4722 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V4718) -> fun (V4719) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V4718, V4719)) end end, fun (V4720) -> fun (V4721) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V4720, V4721)) end end}, V4682, V4686))), case V4722 of {'Idris.Prelude.Types.Left', E2096} -> (fun (V4723) -> {'Idris.Prelude.Types.Left', V4723} end(E2096)); {'Idris.Prelude.Types.Right', E2097} -> (fun (V4724) -> begin (V4725 = (('un--getNArgs'(V0, V4717, V4724, V4685))(V4686))), case V4725 of {'Idris.Prelude.Types.Left', E2098} -> (fun (V4726) -> {'Idris.Prelude.Types.Left', V4726} end(E2098)); {'Idris.Prelude.Types.Right', E2099} -> (fun (V4727) -> case V4727 of {'Idris.Compiler.CompileExpr.User', E2100, E2101} -> (fun (V4728, V4729) -> begin (V4731 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4730) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4717, V4730)) end, V4729))(V4686))), case V4731 of {'Idris.Prelude.Types.Left', E2102} -> (fun (V4732) -> {'Idris.Prelude.Types.Left', V4732} end(E2102)); {'Idris.Prelude.Types.Right', E2103} -> (fun (V4733) -> begin (V4735 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4734) -> ('un--nfToCFType'(V0, V4681, V2, V4734)) end, V4733))(V4686))), case V4735 of {'Idris.Prelude.Types.Left', E2104} -> (fun (V4736) -> {'Idris.Prelude.Types.Left', V4736} end(E2104)); {'Idris.Prelude.Types.Right', E2105} -> (fun (V4737) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V4724, V4737}} end(E2105)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2103)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2100, E2101)); {'Idris.Compiler.CompileExpr.Struct', E2106, E2107} -> (fun (V4738, V4739) -> begin (V4750 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4740) -> case V4740 of {'Idris.Builtin.MkPair', E2108, E2109} -> (fun (V4741, V4742) -> fun (V4743) -> begin (V4744 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4717, V4742))(V4743))), case V4744 of {'Idris.Prelude.Types.Left', E2110} -> (fun (V4745) -> {'Idris.Prelude.Types.Left', V4745} end(E2110)); {'Idris.Prelude.Types.Right', E2111} -> (fun (V4746) -> begin (V4747 = (('un--nfToCFType'(V0, V4681, 0, V4746))(V4743))), case V4747 of {'Idris.Prelude.Types.Left', E2112} -> (fun (V4748) -> {'Idris.Prelude.Types.Left', V4748} end(E2112)); {'Idris.Prelude.Types.Right', E2113} -> (fun (V4749) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V4741, V4749}} end(E2113)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2111)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2108, E2109)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V4739))(V4686))), case V4750 of {'Idris.Prelude.Types.Left', E2114} -> (fun (V4751) -> {'Idris.Prelude.Types.Left', V4751} end(E2114)); {'Idris.Prelude.Types.Right', E2115} -> (fun (V4752) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V4738, V4752}} end(E2115)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2106, E2107)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2116} -> (fun (V4753) -> begin (V4754 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4717, V4753))(V4686))), case V4754 of {'Idris.Prelude.Types.Left', E2117} -> (fun (V4755) -> {'Idris.Prelude.Types.Left', V4755} end(E2117)); {'Idris.Prelude.Types.Right', E2118} -> (fun (V4756) -> begin (V4757 = (('un--nfToCFType'(V0, V4681, V2, V4756))(V4686))), case V4757 of {'Idris.Prelude.Types.Left', E2119} -> (fun (V4758) -> {'Idris.Prelude.Types.Left', V4758} end(E2119)); {'Idris.Prelude.Types.Right', E2120} -> (fun (V4759) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V4759}} end(E2120)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2118)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2116)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2099)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2097)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2095)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2089, E2090, E2091, E2092, E2093)); {'Idris.Core.Value.NType', E2121} -> (fun (V4760) -> fun (V4761) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2121)); {'Idris.Core.Value.NErased', E2122, E2123} -> (fun (V4762, V4763) -> fun (V4764) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2122, E2123)); _ -> fun (V4765) -> begin (V4794 = begin (V4793 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V4766) -> fun (V4767) -> fun (V4768) -> fun (V4769) -> fun (V4770) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V4768, V4769, V4770)) end end end end end, fun (V4771) -> fun (V4772) -> fun (V4773) -> V4772 end end end, fun (V4774) -> fun (V4775) -> fun (V4776) -> fun (V4777) -> fun (V4778) -> begin (V4779 = (V4776(V4778))), begin (V4780 = (V4777(V4778))), (V4779(V4780)) end end end end end end end}, fun (V4781) -> fun (V4782) -> fun (V4783) -> fun (V4784) -> fun (V4785) -> begin (V4786 = (V4783(V4785))), ((V4784(V4786))(V4785)) end end end end end end, fun (V4787) -> fun (V4788) -> fun (V4789) -> begin (V4790 = (V4788(V4789))), (V4790(V4789)) end end end end}, fun (V4791) -> fun (V4792) -> V4792 end end}, V0))(V4765))), {'Idris.Prelude.Types.Right', V4793} end), case V4794 of {'Idris.Prelude.Types.Left', E2083} -> (fun (V4795) -> {'Idris.Prelude.Types.Left', V4795} end(E2083)); {'Idris.Prelude.Types.Right', E2084} -> (fun (V4796) -> begin (V4797 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V4796, {'Idris.Core.Env.Nil'}, V3, V4765))), case V4797 of {'Idris.Prelude.Types.Left', E2085} -> (fun (V4798) -> {'Idris.Prelude.Types.Left', V4798} end(E2085)); {'Idris.Prelude.Types.Right', E2086} -> (fun (V4799) -> begin (V4804 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V4800) -> fun (V4801) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V4800, V4801)) end end, fun (V4802) -> fun (V4803) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V4802, V4803)) end end}, V4799, V4765))), case V4804 of {'Idris.Prelude.Types.Left', E2087} -> (fun (V4805) -> {'Idris.Prelude.Types.Left', V4805} end(E2087)); {'Idris.Prelude.Types.Right', E2088} -> (fun (V4806) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V4806))))}, V4765)) end(E2088)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2086)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2084)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E2222, E2223, E2224, E2225} -> (fun (V4807, V4808, V4809, V4810) -> fun (V4811) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V4807, <<"Function types not allowed in a foreign struct"/utf8>>}, V4811)) end end(E2222, E2223, E2224, E2225)); _ -> case V3 of {'Idris.Core.Value.NTCon', E2187, E2188, E2189, E2190, E2191} -> (fun (V4812, V4813, V4814, V4815, V4816) -> fun (V4817) -> begin (V4846 = begin (V4845 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V4818) -> fun (V4819) -> fun (V4820) -> fun (V4821) -> fun (V4822) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V4820, V4821, V4822)) end end end end end, fun (V4823) -> fun (V4824) -> fun (V4825) -> V4824 end end end, fun (V4826) -> fun (V4827) -> fun (V4828) -> fun (V4829) -> fun (V4830) -> begin (V4831 = (V4828(V4830))), begin (V4832 = (V4829(V4830))), (V4831(V4832)) end end end end end end end}, fun (V4833) -> fun (V4834) -> fun (V4835) -> fun (V4836) -> fun (V4837) -> begin (V4838 = (V4835(V4837))), ((V4836(V4838))(V4837)) end end end end end end, fun (V4839) -> fun (V4840) -> fun (V4841) -> begin (V4842 = (V4840(V4841))), (V4842(V4841)) end end end end}, fun (V4843) -> fun (V4844) -> V4844 end end}, V0))(V4817))), {'Idris.Prelude.Types.Right', V4845} end), case V4846 of {'Idris.Prelude.Types.Left', E2192} -> (fun (V4847) -> {'Idris.Prelude.Types.Left', V4847} end(E2192)); {'Idris.Prelude.Types.Right', E2193} -> (fun (V4848) -> begin (V4853 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V4849) -> fun (V4850) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V4849, V4850)) end end, fun (V4851) -> fun (V4852) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V4851, V4852)) end end}, V4813, V4817))), case V4853 of {'Idris.Prelude.Types.Left', E2194} -> (fun (V4854) -> {'Idris.Prelude.Types.Left', V4854} end(E2194)); {'Idris.Prelude.Types.Right', E2195} -> (fun (V4855) -> begin (V4856 = (('un--getNArgs'(V0, V4848, V4855, V4816))(V4817))), case V4856 of {'Idris.Prelude.Types.Left', E2196} -> (fun (V4857) -> {'Idris.Prelude.Types.Left', V4857} end(E2196)); {'Idris.Prelude.Types.Right', E2197} -> (fun (V4858) -> case V4858 of {'Idris.Compiler.CompileExpr.User', E2198, E2199} -> (fun (V4859, V4860) -> begin (V4862 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4861) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4848, V4861)) end, V4860))(V4817))), case V4862 of {'Idris.Prelude.Types.Left', E2200} -> (fun (V4863) -> {'Idris.Prelude.Types.Left', V4863} end(E2200)); {'Idris.Prelude.Types.Right', E2201} -> (fun (V4864) -> begin (V4866 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4865) -> ('un--nfToCFType'(V0, V4812, V2, V4865)) end, V4864))(V4817))), case V4866 of {'Idris.Prelude.Types.Left', E2202} -> (fun (V4867) -> {'Idris.Prelude.Types.Left', V4867} end(E2202)); {'Idris.Prelude.Types.Right', E2203} -> (fun (V4868) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V4855, V4868}} end(E2203)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2201)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2198, E2199)); {'Idris.Compiler.CompileExpr.Struct', E2204, E2205} -> (fun (V4869, V4870) -> begin (V4881 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4871) -> case V4871 of {'Idris.Builtin.MkPair', E2206, E2207} -> (fun (V4872, V4873) -> fun (V4874) -> begin (V4875 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4848, V4873))(V4874))), case V4875 of {'Idris.Prelude.Types.Left', E2208} -> (fun (V4876) -> {'Idris.Prelude.Types.Left', V4876} end(E2208)); {'Idris.Prelude.Types.Right', E2209} -> (fun (V4877) -> begin (V4878 = (('un--nfToCFType'(V0, V4812, 0, V4877))(V4874))), case V4878 of {'Idris.Prelude.Types.Left', E2210} -> (fun (V4879) -> {'Idris.Prelude.Types.Left', V4879} end(E2210)); {'Idris.Prelude.Types.Right', E2211} -> (fun (V4880) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V4872, V4880}} end(E2211)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2209)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2206, E2207)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V4870))(V4817))), case V4881 of {'Idris.Prelude.Types.Left', E2212} -> (fun (V4882) -> {'Idris.Prelude.Types.Left', V4882} end(E2212)); {'Idris.Prelude.Types.Right', E2213} -> (fun (V4883) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V4869, V4883}} end(E2213)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2204, E2205)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2214} -> (fun (V4884) -> begin (V4885 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4848, V4884))(V4817))), case V4885 of {'Idris.Prelude.Types.Left', E2215} -> (fun (V4886) -> {'Idris.Prelude.Types.Left', V4886} end(E2215)); {'Idris.Prelude.Types.Right', E2216} -> (fun (V4887) -> begin (V4888 = (('un--nfToCFType'(V0, V4812, V2, V4887))(V4817))), case V4888 of {'Idris.Prelude.Types.Left', E2217} -> (fun (V4889) -> {'Idris.Prelude.Types.Left', V4889} end(E2217)); {'Idris.Prelude.Types.Right', E2218} -> (fun (V4890) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V4890}} end(E2218)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2216)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2214)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2197)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2195)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2193)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2187, E2188, E2189, E2190, E2191)); {'Idris.Core.Value.NType', E2219} -> (fun (V4891) -> fun (V4892) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2219)); {'Idris.Core.Value.NErased', E2220, E2221} -> (fun (V4893, V4894) -> fun (V4895) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2220, E2221)); _ -> fun (V4896) -> begin (V4925 = begin (V4924 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V4897) -> fun (V4898) -> fun (V4899) -> fun (V4900) -> fun (V4901) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V4899, V4900, V4901)) end end end end end, fun (V4902) -> fun (V4903) -> fun (V4904) -> V4903 end end end, fun (V4905) -> fun (V4906) -> fun (V4907) -> fun (V4908) -> fun (V4909) -> begin (V4910 = (V4907(V4909))), begin (V4911 = (V4908(V4909))), (V4910(V4911)) end end end end end end end}, fun (V4912) -> fun (V4913) -> fun (V4914) -> fun (V4915) -> fun (V4916) -> begin (V4917 = (V4914(V4916))), ((V4915(V4917))(V4916)) end end end end end end, fun (V4918) -> fun (V4919) -> fun (V4920) -> begin (V4921 = (V4919(V4920))), (V4921(V4920)) end end end end}, fun (V4922) -> fun (V4923) -> V4923 end end}, V0))(V4896))), {'Idris.Prelude.Types.Right', V4924} end), case V4925 of {'Idris.Prelude.Types.Left', E2181} -> (fun (V4926) -> {'Idris.Prelude.Types.Left', V4926} end(E2181)); {'Idris.Prelude.Types.Right', E2182} -> (fun (V4927) -> begin (V4928 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V4927, {'Idris.Core.Env.Nil'}, V3, V4896))), case V4928 of {'Idris.Prelude.Types.Left', E2183} -> (fun (V4929) -> {'Idris.Prelude.Types.Left', V4929} end(E2183)); {'Idris.Prelude.Types.Right', E2184} -> (fun (V4930) -> begin (V4935 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V4931) -> fun (V4932) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V4931, V4932)) end end, fun (V4933) -> fun (V4934) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V4933, V4934)) end end}, V4930, V4896))), case V4935 of {'Idris.Prelude.Types.Left', E2185} -> (fun (V4936) -> {'Idris.Prelude.Types.Left', V4936} end(E2185)); {'Idris.Prelude.Types.Right', E2186} -> (fun (V4937) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V4937))))}, V4896)) end(E2186)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2184)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2182)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E2048, E2049, E2050, E2051, E2052} -> (fun (V4938, V4939, V4940, V4941, V4942) -> fun (V4943) -> begin (V4972 = begin (V4971 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V4944) -> fun (V4945) -> fun (V4946) -> fun (V4947) -> fun (V4948) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V4946, V4947, V4948)) end end end end end, fun (V4949) -> fun (V4950) -> fun (V4951) -> V4950 end end end, fun (V4952) -> fun (V4953) -> fun (V4954) -> fun (V4955) -> fun (V4956) -> begin (V4957 = (V4954(V4956))), begin (V4958 = (V4955(V4956))), (V4957(V4958)) end end end end end end end}, fun (V4959) -> fun (V4960) -> fun (V4961) -> fun (V4962) -> fun (V4963) -> begin (V4964 = (V4961(V4963))), ((V4962(V4964))(V4963)) end end end end end end, fun (V4965) -> fun (V4966) -> fun (V4967) -> begin (V4968 = (V4966(V4967))), (V4968(V4967)) end end end end}, fun (V4969) -> fun (V4970) -> V4970 end end}, V0))(V4943))), {'Idris.Prelude.Types.Right', V4971} end), case V4972 of {'Idris.Prelude.Types.Left', E2053} -> (fun (V4973) -> {'Idris.Prelude.Types.Left', V4973} end(E2053)); {'Idris.Prelude.Types.Right', E2054} -> (fun (V4974) -> begin (V4979 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V4975) -> fun (V4976) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V4975, V4976)) end end, fun (V4977) -> fun (V4978) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V4977, V4978)) end end}, V4939, V4943))), case V4979 of {'Idris.Prelude.Types.Left', E2055} -> (fun (V4980) -> {'Idris.Prelude.Types.Left', V4980} end(E2055)); {'Idris.Prelude.Types.Right', E2056} -> (fun (V4981) -> begin (V4982 = (('un--getNArgs'(V0, V4974, V4981, V4942))(V4943))), case V4982 of {'Idris.Prelude.Types.Left', E2057} -> (fun (V4983) -> {'Idris.Prelude.Types.Left', V4983} end(E2057)); {'Idris.Prelude.Types.Right', E2058} -> (fun (V4984) -> case V4984 of {'Idris.Compiler.CompileExpr.User', E2059, E2060} -> (fun (V4985, V4986) -> begin (V4988 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4987) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4974, V4987)) end, V4986))(V4943))), case V4988 of {'Idris.Prelude.Types.Left', E2061} -> (fun (V4989) -> {'Idris.Prelude.Types.Left', V4989} end(E2061)); {'Idris.Prelude.Types.Right', E2062} -> (fun (V4990) -> begin (V4992 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4991) -> ('un--nfToCFType'(V0, V4938, V2, V4991)) end, V4990))(V4943))), case V4992 of {'Idris.Prelude.Types.Left', E2063} -> (fun (V4993) -> {'Idris.Prelude.Types.Left', V4993} end(E2063)); {'Idris.Prelude.Types.Right', E2064} -> (fun (V4994) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V4981, V4994}} end(E2064)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2062)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2059, E2060)); {'Idris.Compiler.CompileExpr.Struct', E2065, E2066} -> (fun (V4995, V4996) -> begin (V5007 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V4997) -> case V4997 of {'Idris.Builtin.MkPair', E2067, E2068} -> (fun (V4998, V4999) -> fun (V5000) -> begin (V5001 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4974, V4999))(V5000))), case V5001 of {'Idris.Prelude.Types.Left', E2069} -> (fun (V5002) -> {'Idris.Prelude.Types.Left', V5002} end(E2069)); {'Idris.Prelude.Types.Right', E2070} -> (fun (V5003) -> begin (V5004 = (('un--nfToCFType'(V0, V4938, 0, V5003))(V5000))), case V5004 of {'Idris.Prelude.Types.Left', E2071} -> (fun (V5005) -> {'Idris.Prelude.Types.Left', V5005} end(E2071)); {'Idris.Prelude.Types.Right', E2072} -> (fun (V5006) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V4998, V5006}} end(E2072)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2070)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2067, E2068)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V4996))(V4943))), case V5007 of {'Idris.Prelude.Types.Left', E2073} -> (fun (V5008) -> {'Idris.Prelude.Types.Left', V5008} end(E2073)); {'Idris.Prelude.Types.Right', E2074} -> (fun (V5009) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V4995, V5009}} end(E2074)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2065, E2066)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2075} -> (fun (V5010) -> begin (V5011 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V4974, V5010))(V4943))), case V5011 of {'Idris.Prelude.Types.Left', E2076} -> (fun (V5012) -> {'Idris.Prelude.Types.Left', V5012} end(E2076)); {'Idris.Prelude.Types.Right', E2077} -> (fun (V5013) -> begin (V5014 = (('un--nfToCFType'(V0, V4938, V2, V5013))(V4943))), case V5014 of {'Idris.Prelude.Types.Left', E2078} -> (fun (V5015) -> {'Idris.Prelude.Types.Left', V5015} end(E2078)); {'Idris.Prelude.Types.Right', E2079} -> (fun (V5016) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V5016}} end(E2079)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2077)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2075)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2058)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2056)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2054)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2048, E2049, E2050, E2051, E2052)); {'Idris.Core.Value.NType', E2080} -> (fun (V5017) -> fun (V5018) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2080)); {'Idris.Core.Value.NErased', E2081, E2082} -> (fun (V5019, V5020) -> fun (V5021) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2081, E2082)); _ -> fun (V5022) -> begin (V5051 = begin (V5050 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5023) -> fun (V5024) -> fun (V5025) -> fun (V5026) -> fun (V5027) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V5025, V5026, V5027)) end end end end end, fun (V5028) -> fun (V5029) -> fun (V5030) -> V5029 end end end, fun (V5031) -> fun (V5032) -> fun (V5033) -> fun (V5034) -> fun (V5035) -> begin (V5036 = (V5033(V5035))), begin (V5037 = (V5034(V5035))), (V5036(V5037)) end end end end end end end}, fun (V5038) -> fun (V5039) -> fun (V5040) -> fun (V5041) -> fun (V5042) -> begin (V5043 = (V5040(V5042))), ((V5041(V5043))(V5042)) end end end end end end, fun (V5044) -> fun (V5045) -> fun (V5046) -> begin (V5047 = (V5045(V5046))), (V5047(V5046)) end end end end}, fun (V5048) -> fun (V5049) -> V5049 end end}, V0))(V5022))), {'Idris.Prelude.Types.Right', V5050} end), case V5051 of {'Idris.Prelude.Types.Left', E2042} -> (fun (V5052) -> {'Idris.Prelude.Types.Left', V5052} end(E2042)); {'Idris.Prelude.Types.Right', E2043} -> (fun (V5053) -> begin (V5054 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V5053, {'Idris.Core.Env.Nil'}, V3, V5022))), case V5054 of {'Idris.Prelude.Types.Left', E2044} -> (fun (V5055) -> {'Idris.Prelude.Types.Left', V5055} end(E2044)); {'Idris.Prelude.Types.Right', E2045} -> (fun (V5056) -> begin (V5061 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V5057) -> fun (V5058) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V5057, V5058)) end end, fun (V5059) -> fun (V5060) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V5059, V5060)) end end}, V5056, V5022))), case V5061 of {'Idris.Prelude.Types.Left', E2046} -> (fun (V5062) -> {'Idris.Prelude.Types.Left', V5062} end(E2046)); {'Idris.Prelude.Types.Right', E2047} -> (fun (V5063) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V5063))))}, V5022)) end(E2047)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2045)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2043)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end(E2040, E2041)); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E1938, E1939, E1940, E1941} -> (fun (V5064, V5065, V5066, V5067) -> case V5066 of {'Idris.Core.TT.Pi', E1983, E1984, E1985, E1986} -> (fun (V5068, V5069, V5070, V5071) -> fun (V5072) -> begin (V5101 = begin (V5100 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5073) -> fun (V5074) -> fun (V5075) -> fun (V5076) -> fun (V5077) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V5075, V5076, V5077)) end end end end end, fun (V5078) -> fun (V5079) -> fun (V5080) -> V5079 end end end, fun (V5081) -> fun (V5082) -> fun (V5083) -> fun (V5084) -> fun (V5085) -> begin (V5086 = (V5083(V5085))), begin (V5087 = (V5084(V5085))), (V5086(V5087)) end end end end end end end}, fun (V5088) -> fun (V5089) -> fun (V5090) -> fun (V5091) -> fun (V5092) -> begin (V5093 = (V5090(V5092))), ((V5091(V5093))(V5092)) end end end end end end, fun (V5094) -> fun (V5095) -> fun (V5096) -> begin (V5097 = (V5095(V5096))), (V5097(V5096)) end end end end}, fun (V5098) -> fun (V5099) -> V5099 end end}, V0))(V5072))), {'Idris.Prelude.Types.Right', V5100} end), case V5101 of {'Idris.Prelude.Types.Left', E1987} -> (fun (V5102) -> {'Idris.Prelude.Types.Left', V5102} end(E1987)); {'Idris.Prelude.Types.Right', E1988} -> (fun (V5103) -> begin (V5104 = (('un--nfToCFType'(V0, V5064, 1, V5071))(V5072))), case V5104 of {'Idris.Prelude.Types.Left', E1989} -> (fun (V5105) -> {'Idris.Prelude.Types.Left', V5105} end(E1989)); {'Idris.Prelude.Types.Right', E1990} -> (fun (V5106) -> begin (V5107 = (((V5067(V5103))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V5064, 1}))))(V5072))), case V5107 of {'Idris.Prelude.Types.Left', E1991} -> (fun (V5108) -> {'Idris.Prelude.Types.Left', V5108} end(E1991)); {'Idris.Prelude.Types.Right', E1992} -> (fun (V5109) -> begin (V5110 = (('un--nfToCFType'(V0, V5064, 1, V5109))(V5072))), case V5110 of {'Idris.Prelude.Types.Left', E1993} -> (fun (V5111) -> {'Idris.Prelude.Types.Left', V5111} end(E1993)); {'Idris.Prelude.Types.Right', E1994} -> (fun (V5112) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V5106, V5112}} end(E1994)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1992)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1990)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1988)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1983, E1984, E1985, E1986)); _ -> case V3 of {'Idris.Core.Value.NTCon', E1948, E1949, E1950, E1951, E1952} -> (fun (V5113, V5114, V5115, V5116, V5117) -> fun (V5118) -> begin (V5147 = begin (V5146 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5119) -> fun (V5120) -> fun (V5121) -> fun (V5122) -> fun (V5123) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V5121, V5122, V5123)) end end end end end, fun (V5124) -> fun (V5125) -> fun (V5126) -> V5125 end end end, fun (V5127) -> fun (V5128) -> fun (V5129) -> fun (V5130) -> fun (V5131) -> begin (V5132 = (V5129(V5131))), begin (V5133 = (V5130(V5131))), (V5132(V5133)) end end end end end end end}, fun (V5134) -> fun (V5135) -> fun (V5136) -> fun (V5137) -> fun (V5138) -> begin (V5139 = (V5136(V5138))), ((V5137(V5139))(V5138)) end end end end end end, fun (V5140) -> fun (V5141) -> fun (V5142) -> begin (V5143 = (V5141(V5142))), (V5143(V5142)) end end end end}, fun (V5144) -> fun (V5145) -> V5145 end end}, V0))(V5118))), {'Idris.Prelude.Types.Right', V5146} end), case V5147 of {'Idris.Prelude.Types.Left', E1953} -> (fun (V5148) -> {'Idris.Prelude.Types.Left', V5148} end(E1953)); {'Idris.Prelude.Types.Right', E1954} -> (fun (V5149) -> begin (V5154 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V5150) -> fun (V5151) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V5150, V5151)) end end, fun (V5152) -> fun (V5153) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V5152, V5153)) end end}, V5114, V5118))), case V5154 of {'Idris.Prelude.Types.Left', E1955} -> (fun (V5155) -> {'Idris.Prelude.Types.Left', V5155} end(E1955)); {'Idris.Prelude.Types.Right', E1956} -> (fun (V5156) -> begin (V5157 = (('un--getNArgs'(V0, V5149, V5156, V5117))(V5118))), case V5157 of {'Idris.Prelude.Types.Left', E1957} -> (fun (V5158) -> {'Idris.Prelude.Types.Left', V5158} end(E1957)); {'Idris.Prelude.Types.Right', E1958} -> (fun (V5159) -> case V5159 of {'Idris.Compiler.CompileExpr.User', E1959, E1960} -> (fun (V5160, V5161) -> begin (V5163 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5162) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5149, V5162)) end, V5161))(V5118))), case V5163 of {'Idris.Prelude.Types.Left', E1961} -> (fun (V5164) -> {'Idris.Prelude.Types.Left', V5164} end(E1961)); {'Idris.Prelude.Types.Right', E1962} -> (fun (V5165) -> begin (V5167 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5166) -> ('un--nfToCFType'(V0, V5113, V2, V5166)) end, V5165))(V5118))), case V5167 of {'Idris.Prelude.Types.Left', E1963} -> (fun (V5168) -> {'Idris.Prelude.Types.Left', V5168} end(E1963)); {'Idris.Prelude.Types.Right', E1964} -> (fun (V5169) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V5156, V5169}} end(E1964)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1962)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1959, E1960)); {'Idris.Compiler.CompileExpr.Struct', E1965, E1966} -> (fun (V5170, V5171) -> begin (V5182 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5172) -> case V5172 of {'Idris.Builtin.MkPair', E1967, E1968} -> (fun (V5173, V5174) -> fun (V5175) -> begin (V5176 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5149, V5174))(V5175))), case V5176 of {'Idris.Prelude.Types.Left', E1969} -> (fun (V5177) -> {'Idris.Prelude.Types.Left', V5177} end(E1969)); {'Idris.Prelude.Types.Right', E1970} -> (fun (V5178) -> begin (V5179 = (('un--nfToCFType'(V0, V5113, 0, V5178))(V5175))), case V5179 of {'Idris.Prelude.Types.Left', E1971} -> (fun (V5180) -> {'Idris.Prelude.Types.Left', V5180} end(E1971)); {'Idris.Prelude.Types.Right', E1972} -> (fun (V5181) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V5173, V5181}} end(E1972)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1970)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1967, E1968)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V5171))(V5118))), case V5182 of {'Idris.Prelude.Types.Left', E1973} -> (fun (V5183) -> {'Idris.Prelude.Types.Left', V5183} end(E1973)); {'Idris.Prelude.Types.Right', E1974} -> (fun (V5184) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V5170, V5184}} end(E1974)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1965, E1966)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1975} -> (fun (V5185) -> begin (V5186 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5149, V5185))(V5118))), case V5186 of {'Idris.Prelude.Types.Left', E1976} -> (fun (V5187) -> {'Idris.Prelude.Types.Left', V5187} end(E1976)); {'Idris.Prelude.Types.Right', E1977} -> (fun (V5188) -> begin (V5189 = (('un--nfToCFType'(V0, V5113, V2, V5188))(V5118))), case V5189 of {'Idris.Prelude.Types.Left', E1978} -> (fun (V5190) -> {'Idris.Prelude.Types.Left', V5190} end(E1978)); {'Idris.Prelude.Types.Right', E1979} -> (fun (V5191) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V5191}} end(E1979)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1977)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1975)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1958)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1956)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1954)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1948, E1949, E1950, E1951, E1952)); {'Idris.Core.Value.NType', E1980} -> (fun (V5192) -> fun (V5193) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1980)); {'Idris.Core.Value.NErased', E1981, E1982} -> (fun (V5194, V5195) -> fun (V5196) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1981, E1982)); _ -> fun (V5197) -> begin (V5226 = begin (V5225 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5198) -> fun (V5199) -> fun (V5200) -> fun (V5201) -> fun (V5202) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V5200, V5201, V5202)) end end end end end, fun (V5203) -> fun (V5204) -> fun (V5205) -> V5204 end end end, fun (V5206) -> fun (V5207) -> fun (V5208) -> fun (V5209) -> fun (V5210) -> begin (V5211 = (V5208(V5210))), begin (V5212 = (V5209(V5210))), (V5211(V5212)) end end end end end end end}, fun (V5213) -> fun (V5214) -> fun (V5215) -> fun (V5216) -> fun (V5217) -> begin (V5218 = (V5215(V5217))), ((V5216(V5218))(V5217)) end end end end end end, fun (V5219) -> fun (V5220) -> fun (V5221) -> begin (V5222 = (V5220(V5221))), (V5222(V5221)) end end end end}, fun (V5223) -> fun (V5224) -> V5224 end end}, V0))(V5197))), {'Idris.Prelude.Types.Right', V5225} end), case V5226 of {'Idris.Prelude.Types.Left', E1942} -> (fun (V5227) -> {'Idris.Prelude.Types.Left', V5227} end(E1942)); {'Idris.Prelude.Types.Right', E1943} -> (fun (V5228) -> begin (V5229 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V5228, {'Idris.Core.Env.Nil'}, V3, V5197))), case V5229 of {'Idris.Prelude.Types.Left', E1944} -> (fun (V5230) -> {'Idris.Prelude.Types.Left', V5230} end(E1944)); {'Idris.Prelude.Types.Right', E1945} -> (fun (V5231) -> begin (V5236 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V5232) -> fun (V5233) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V5232, V5233)) end end, fun (V5234) -> fun (V5235) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V5234, V5235)) end end}, V5231, V5197))), case V5236 of {'Idris.Prelude.Types.Left', E1946} -> (fun (V5237) -> {'Idris.Prelude.Types.Left', V5237} end(E1946)); {'Idris.Prelude.Types.Right', E1947} -> (fun (V5238) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V5238))))}, V5197)) end(E1947)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1945)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1943)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E1938, E1939, E1940, E1941)); _ -> case V3 of {'Idris.Core.Value.NTCon', E1903, E1904, E1905, E1906, E1907} -> (fun (V5239, V5240, V5241, V5242, V5243) -> fun (V5244) -> begin (V5273 = begin (V5272 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5245) -> fun (V5246) -> fun (V5247) -> fun (V5248) -> fun (V5249) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V5247, V5248, V5249)) end end end end end, fun (V5250) -> fun (V5251) -> fun (V5252) -> V5251 end end end, fun (V5253) -> fun (V5254) -> fun (V5255) -> fun (V5256) -> fun (V5257) -> begin (V5258 = (V5255(V5257))), begin (V5259 = (V5256(V5257))), (V5258(V5259)) end end end end end end end}, fun (V5260) -> fun (V5261) -> fun (V5262) -> fun (V5263) -> fun (V5264) -> begin (V5265 = (V5262(V5264))), ((V5263(V5265))(V5264)) end end end end end end, fun (V5266) -> fun (V5267) -> fun (V5268) -> begin (V5269 = (V5267(V5268))), (V5269(V5268)) end end end end}, fun (V5270) -> fun (V5271) -> V5271 end end}, V0))(V5244))), {'Idris.Prelude.Types.Right', V5272} end), case V5273 of {'Idris.Prelude.Types.Left', E1908} -> (fun (V5274) -> {'Idris.Prelude.Types.Left', V5274} end(E1908)); {'Idris.Prelude.Types.Right', E1909} -> (fun (V5275) -> begin (V5280 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V5276) -> fun (V5277) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V5276, V5277)) end end, fun (V5278) -> fun (V5279) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V5278, V5279)) end end}, V5240, V5244))), case V5280 of {'Idris.Prelude.Types.Left', E1910} -> (fun (V5281) -> {'Idris.Prelude.Types.Left', V5281} end(E1910)); {'Idris.Prelude.Types.Right', E1911} -> (fun (V5282) -> begin (V5283 = (('un--getNArgs'(V0, V5275, V5282, V5243))(V5244))), case V5283 of {'Idris.Prelude.Types.Left', E1912} -> (fun (V5284) -> {'Idris.Prelude.Types.Left', V5284} end(E1912)); {'Idris.Prelude.Types.Right', E1913} -> (fun (V5285) -> case V5285 of {'Idris.Compiler.CompileExpr.User', E1914, E1915} -> (fun (V5286, V5287) -> begin (V5289 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5288) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5275, V5288)) end, V5287))(V5244))), case V5289 of {'Idris.Prelude.Types.Left', E1916} -> (fun (V5290) -> {'Idris.Prelude.Types.Left', V5290} end(E1916)); {'Idris.Prelude.Types.Right', E1917} -> (fun (V5291) -> begin (V5293 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5292) -> ('un--nfToCFType'(V0, V5239, V2, V5292)) end, V5291))(V5244))), case V5293 of {'Idris.Prelude.Types.Left', E1918} -> (fun (V5294) -> {'Idris.Prelude.Types.Left', V5294} end(E1918)); {'Idris.Prelude.Types.Right', E1919} -> (fun (V5295) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V5282, V5295}} end(E1919)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1917)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1914, E1915)); {'Idris.Compiler.CompileExpr.Struct', E1920, E1921} -> (fun (V5296, V5297) -> begin (V5308 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5298) -> case V5298 of {'Idris.Builtin.MkPair', E1922, E1923} -> (fun (V5299, V5300) -> fun (V5301) -> begin (V5302 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5275, V5300))(V5301))), case V5302 of {'Idris.Prelude.Types.Left', E1924} -> (fun (V5303) -> {'Idris.Prelude.Types.Left', V5303} end(E1924)); {'Idris.Prelude.Types.Right', E1925} -> (fun (V5304) -> begin (V5305 = (('un--nfToCFType'(V0, V5239, 0, V5304))(V5301))), case V5305 of {'Idris.Prelude.Types.Left', E1926} -> (fun (V5306) -> {'Idris.Prelude.Types.Left', V5306} end(E1926)); {'Idris.Prelude.Types.Right', E1927} -> (fun (V5307) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V5299, V5307}} end(E1927)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1925)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1922, E1923)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V5297))(V5244))), case V5308 of {'Idris.Prelude.Types.Left', E1928} -> (fun (V5309) -> {'Idris.Prelude.Types.Left', V5309} end(E1928)); {'Idris.Prelude.Types.Right', E1929} -> (fun (V5310) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V5296, V5310}} end(E1929)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1920, E1921)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1930} -> (fun (V5311) -> begin (V5312 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5275, V5311))(V5244))), case V5312 of {'Idris.Prelude.Types.Left', E1931} -> (fun (V5313) -> {'Idris.Prelude.Types.Left', V5313} end(E1931)); {'Idris.Prelude.Types.Right', E1932} -> (fun (V5314) -> begin (V5315 = (('un--nfToCFType'(V0, V5239, V2, V5314))(V5244))), case V5315 of {'Idris.Prelude.Types.Left', E1933} -> (fun (V5316) -> {'Idris.Prelude.Types.Left', V5316} end(E1933)); {'Idris.Prelude.Types.Right', E1934} -> (fun (V5317) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V5317}} end(E1934)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1932)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1930)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1913)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1911)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1909)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1903, E1904, E1905, E1906, E1907)); {'Idris.Core.Value.NType', E1935} -> (fun (V5318) -> fun (V5319) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1935)); {'Idris.Core.Value.NErased', E1936, E1937} -> (fun (V5320, V5321) -> fun (V5322) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1936, E1937)); _ -> fun (V5323) -> begin (V5352 = begin (V5351 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5324) -> fun (V5325) -> fun (V5326) -> fun (V5327) -> fun (V5328) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V5326, V5327, V5328)) end end end end end, fun (V5329) -> fun (V5330) -> fun (V5331) -> V5330 end end end, fun (V5332) -> fun (V5333) -> fun (V5334) -> fun (V5335) -> fun (V5336) -> begin (V5337 = (V5334(V5336))), begin (V5338 = (V5335(V5336))), (V5337(V5338)) end end end end end end end}, fun (V5339) -> fun (V5340) -> fun (V5341) -> fun (V5342) -> fun (V5343) -> begin (V5344 = (V5341(V5343))), ((V5342(V5344))(V5343)) end end end end end end, fun (V5345) -> fun (V5346) -> fun (V5347) -> begin (V5348 = (V5346(V5347))), (V5348(V5347)) end end end end}, fun (V5349) -> fun (V5350) -> V5350 end end}, V0))(V5323))), {'Idris.Prelude.Types.Right', V5351} end), case V5352 of {'Idris.Prelude.Types.Left', E1897} -> (fun (V5353) -> {'Idris.Prelude.Types.Left', V5353} end(E1897)); {'Idris.Prelude.Types.Right', E1898} -> (fun (V5354) -> begin (V5355 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V5354, {'Idris.Core.Env.Nil'}, V3, V5323))), case V5355 of {'Idris.Prelude.Types.Left', E1899} -> (fun (V5356) -> {'Idris.Prelude.Types.Left', V5356} end(E1899)); {'Idris.Prelude.Types.Right', E1900} -> (fun (V5357) -> begin (V5362 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V5358) -> fun (V5359) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V5358, V5359)) end end, fun (V5360) -> fun (V5361) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V5360, V5361)) end end}, V5357, V5323))), case V5362 of {'Idris.Prelude.Types.Left', E1901} -> (fun (V5363) -> {'Idris.Prelude.Types.Left', V5363} end(E1901)); {'Idris.Prelude.Types.Right', E1902} -> (fun (V5364) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V5364))))}, V5323)) end(E1902)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1900)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1898)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E2036, E2037, E2038, E2039} -> (fun (V5365, V5366, V5367, V5368) -> fun (V5369) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V5365, <<"Function types not allowed in a foreign struct"/utf8>>}, V5369)) end end(E2036, E2037, E2038, E2039)); _ -> case V3 of {'Idris.Core.Value.NTCon', E2001, E2002, E2003, E2004, E2005} -> (fun (V5370, V5371, V5372, V5373, V5374) -> fun (V5375) -> begin (V5404 = begin (V5403 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5376) -> fun (V5377) -> fun (V5378) -> fun (V5379) -> fun (V5380) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V5378, V5379, V5380)) end end end end end, fun (V5381) -> fun (V5382) -> fun (V5383) -> V5382 end end end, fun (V5384) -> fun (V5385) -> fun (V5386) -> fun (V5387) -> fun (V5388) -> begin (V5389 = (V5386(V5388))), begin (V5390 = (V5387(V5388))), (V5389(V5390)) end end end end end end end}, fun (V5391) -> fun (V5392) -> fun (V5393) -> fun (V5394) -> fun (V5395) -> begin (V5396 = (V5393(V5395))), ((V5394(V5396))(V5395)) end end end end end end, fun (V5397) -> fun (V5398) -> fun (V5399) -> begin (V5400 = (V5398(V5399))), (V5400(V5399)) end end end end}, fun (V5401) -> fun (V5402) -> V5402 end end}, V0))(V5375))), {'Idris.Prelude.Types.Right', V5403} end), case V5404 of {'Idris.Prelude.Types.Left', E2006} -> (fun (V5405) -> {'Idris.Prelude.Types.Left', V5405} end(E2006)); {'Idris.Prelude.Types.Right', E2007} -> (fun (V5406) -> begin (V5411 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V5407) -> fun (V5408) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V5407, V5408)) end end, fun (V5409) -> fun (V5410) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V5409, V5410)) end end}, V5371, V5375))), case V5411 of {'Idris.Prelude.Types.Left', E2008} -> (fun (V5412) -> {'Idris.Prelude.Types.Left', V5412} end(E2008)); {'Idris.Prelude.Types.Right', E2009} -> (fun (V5413) -> begin (V5414 = (('un--getNArgs'(V0, V5406, V5413, V5374))(V5375))), case V5414 of {'Idris.Prelude.Types.Left', E2010} -> (fun (V5415) -> {'Idris.Prelude.Types.Left', V5415} end(E2010)); {'Idris.Prelude.Types.Right', E2011} -> (fun (V5416) -> case V5416 of {'Idris.Compiler.CompileExpr.User', E2012, E2013} -> (fun (V5417, V5418) -> begin (V5420 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5419) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5406, V5419)) end, V5418))(V5375))), case V5420 of {'Idris.Prelude.Types.Left', E2014} -> (fun (V5421) -> {'Idris.Prelude.Types.Left', V5421} end(E2014)); {'Idris.Prelude.Types.Right', E2015} -> (fun (V5422) -> begin (V5424 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5423) -> ('un--nfToCFType'(V0, V5370, V2, V5423)) end, V5422))(V5375))), case V5424 of {'Idris.Prelude.Types.Left', E2016} -> (fun (V5425) -> {'Idris.Prelude.Types.Left', V5425} end(E2016)); {'Idris.Prelude.Types.Right', E2017} -> (fun (V5426) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V5413, V5426}} end(E2017)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2015)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2012, E2013)); {'Idris.Compiler.CompileExpr.Struct', E2018, E2019} -> (fun (V5427, V5428) -> begin (V5439 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5429) -> case V5429 of {'Idris.Builtin.MkPair', E2020, E2021} -> (fun (V5430, V5431) -> fun (V5432) -> begin (V5433 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5406, V5431))(V5432))), case V5433 of {'Idris.Prelude.Types.Left', E2022} -> (fun (V5434) -> {'Idris.Prelude.Types.Left', V5434} end(E2022)); {'Idris.Prelude.Types.Right', E2023} -> (fun (V5435) -> begin (V5436 = (('un--nfToCFType'(V0, V5370, 0, V5435))(V5432))), case V5436 of {'Idris.Prelude.Types.Left', E2024} -> (fun (V5437) -> {'Idris.Prelude.Types.Left', V5437} end(E2024)); {'Idris.Prelude.Types.Right', E2025} -> (fun (V5438) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V5430, V5438}} end(E2025)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2023)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2020, E2021)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V5428))(V5375))), case V5439 of {'Idris.Prelude.Types.Left', E2026} -> (fun (V5440) -> {'Idris.Prelude.Types.Left', V5440} end(E2026)); {'Idris.Prelude.Types.Right', E2027} -> (fun (V5441) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V5427, V5441}} end(E2027)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2018, E2019)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E2028} -> (fun (V5442) -> begin (V5443 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5406, V5442))(V5375))), case V5443 of {'Idris.Prelude.Types.Left', E2029} -> (fun (V5444) -> {'Idris.Prelude.Types.Left', V5444} end(E2029)); {'Idris.Prelude.Types.Right', E2030} -> (fun (V5445) -> begin (V5446 = (('un--nfToCFType'(V0, V5370, V2, V5445))(V5375))), case V5446 of {'Idris.Prelude.Types.Left', E2031} -> (fun (V5447) -> {'Idris.Prelude.Types.Left', V5447} end(E2031)); {'Idris.Prelude.Types.Right', E2032} -> (fun (V5448) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V5448}} end(E2032)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2030)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2028)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2011)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2009)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E2007)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2001, E2002, E2003, E2004, E2005)); {'Idris.Core.Value.NType', E2033} -> (fun (V5449) -> fun (V5450) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E2033)); {'Idris.Core.Value.NErased', E2034, E2035} -> (fun (V5451, V5452) -> fun (V5453) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E2034, E2035)); _ -> fun (V5454) -> begin (V5483 = begin (V5482 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5455) -> fun (V5456) -> fun (V5457) -> fun (V5458) -> fun (V5459) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V5457, V5458, V5459)) end end end end end, fun (V5460) -> fun (V5461) -> fun (V5462) -> V5461 end end end, fun (V5463) -> fun (V5464) -> fun (V5465) -> fun (V5466) -> fun (V5467) -> begin (V5468 = (V5465(V5467))), begin (V5469 = (V5466(V5467))), (V5468(V5469)) end end end end end end end}, fun (V5470) -> fun (V5471) -> fun (V5472) -> fun (V5473) -> fun (V5474) -> begin (V5475 = (V5472(V5474))), ((V5473(V5475))(V5474)) end end end end end end, fun (V5476) -> fun (V5477) -> fun (V5478) -> begin (V5479 = (V5477(V5478))), (V5479(V5478)) end end end end}, fun (V5480) -> fun (V5481) -> V5481 end end}, V0))(V5454))), {'Idris.Prelude.Types.Right', V5482} end), case V5483 of {'Idris.Prelude.Types.Left', E1995} -> (fun (V5484) -> {'Idris.Prelude.Types.Left', V5484} end(E1995)); {'Idris.Prelude.Types.Right', E1996} -> (fun (V5485) -> begin (V5486 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V5485, {'Idris.Core.Env.Nil'}, V3, V5454))), case V5486 of {'Idris.Prelude.Types.Left', E1997} -> (fun (V5487) -> {'Idris.Prelude.Types.Left', V5487} end(E1997)); {'Idris.Prelude.Types.Right', E1998} -> (fun (V5488) -> begin (V5493 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V5489) -> fun (V5490) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V5489, V5490)) end end, fun (V5491) -> fun (V5492) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V5491, V5492)) end end}, V5488, V5454))), case V5493 of {'Idris.Prelude.Types.Left', E1999} -> (fun (V5494) -> {'Idris.Prelude.Types.Left', V5494} end(E1999)); {'Idris.Prelude.Types.Right', E2000} -> (fun (V5495) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V5495))))}, V5454)) end(E2000)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1998)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1996)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E1862, E1863, E1864, E1865, E1866} -> (fun (V5496, V5497, V5498, V5499, V5500) -> fun (V5501) -> begin (V5530 = begin (V5529 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5502) -> fun (V5503) -> fun (V5504) -> fun (V5505) -> fun (V5506) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V5504, V5505, V5506)) end end end end end, fun (V5507) -> fun (V5508) -> fun (V5509) -> V5508 end end end, fun (V5510) -> fun (V5511) -> fun (V5512) -> fun (V5513) -> fun (V5514) -> begin (V5515 = (V5512(V5514))), begin (V5516 = (V5513(V5514))), (V5515(V5516)) end end end end end end end}, fun (V5517) -> fun (V5518) -> fun (V5519) -> fun (V5520) -> fun (V5521) -> begin (V5522 = (V5519(V5521))), ((V5520(V5522))(V5521)) end end end end end end, fun (V5523) -> fun (V5524) -> fun (V5525) -> begin (V5526 = (V5524(V5525))), (V5526(V5525)) end end end end}, fun (V5527) -> fun (V5528) -> V5528 end end}, V0))(V5501))), {'Idris.Prelude.Types.Right', V5529} end), case V5530 of {'Idris.Prelude.Types.Left', E1867} -> (fun (V5531) -> {'Idris.Prelude.Types.Left', V5531} end(E1867)); {'Idris.Prelude.Types.Right', E1868} -> (fun (V5532) -> begin (V5537 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V5533) -> fun (V5534) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V5533, V5534)) end end, fun (V5535) -> fun (V5536) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V5535, V5536)) end end}, V5497, V5501))), case V5537 of {'Idris.Prelude.Types.Left', E1869} -> (fun (V5538) -> {'Idris.Prelude.Types.Left', V5538} end(E1869)); {'Idris.Prelude.Types.Right', E1870} -> (fun (V5539) -> begin (V5540 = (('un--getNArgs'(V0, V5532, V5539, V5500))(V5501))), case V5540 of {'Idris.Prelude.Types.Left', E1871} -> (fun (V5541) -> {'Idris.Prelude.Types.Left', V5541} end(E1871)); {'Idris.Prelude.Types.Right', E1872} -> (fun (V5542) -> case V5542 of {'Idris.Compiler.CompileExpr.User', E1873, E1874} -> (fun (V5543, V5544) -> begin (V5546 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5545) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5532, V5545)) end, V5544))(V5501))), case V5546 of {'Idris.Prelude.Types.Left', E1875} -> (fun (V5547) -> {'Idris.Prelude.Types.Left', V5547} end(E1875)); {'Idris.Prelude.Types.Right', E1876} -> (fun (V5548) -> begin (V5550 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5549) -> ('un--nfToCFType'(V0, V5496, V2, V5549)) end, V5548))(V5501))), case V5550 of {'Idris.Prelude.Types.Left', E1877} -> (fun (V5551) -> {'Idris.Prelude.Types.Left', V5551} end(E1877)); {'Idris.Prelude.Types.Right', E1878} -> (fun (V5552) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V5539, V5552}} end(E1878)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1876)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1873, E1874)); {'Idris.Compiler.CompileExpr.Struct', E1879, E1880} -> (fun (V5553, V5554) -> begin (V5565 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5555) -> case V5555 of {'Idris.Builtin.MkPair', E1881, E1882} -> (fun (V5556, V5557) -> fun (V5558) -> begin (V5559 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5532, V5557))(V5558))), case V5559 of {'Idris.Prelude.Types.Left', E1883} -> (fun (V5560) -> {'Idris.Prelude.Types.Left', V5560} end(E1883)); {'Idris.Prelude.Types.Right', E1884} -> (fun (V5561) -> begin (V5562 = (('un--nfToCFType'(V0, V5496, 0, V5561))(V5558))), case V5562 of {'Idris.Prelude.Types.Left', E1885} -> (fun (V5563) -> {'Idris.Prelude.Types.Left', V5563} end(E1885)); {'Idris.Prelude.Types.Right', E1886} -> (fun (V5564) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V5556, V5564}} end(E1886)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1884)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1881, E1882)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V5554))(V5501))), case V5565 of {'Idris.Prelude.Types.Left', E1887} -> (fun (V5566) -> {'Idris.Prelude.Types.Left', V5566} end(E1887)); {'Idris.Prelude.Types.Right', E1888} -> (fun (V5567) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V5553, V5567}} end(E1888)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1879, E1880)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1889} -> (fun (V5568) -> begin (V5569 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5532, V5568))(V5501))), case V5569 of {'Idris.Prelude.Types.Left', E1890} -> (fun (V5570) -> {'Idris.Prelude.Types.Left', V5570} end(E1890)); {'Idris.Prelude.Types.Right', E1891} -> (fun (V5571) -> begin (V5572 = (('un--nfToCFType'(V0, V5496, V2, V5571))(V5501))), case V5572 of {'Idris.Prelude.Types.Left', E1892} -> (fun (V5573) -> {'Idris.Prelude.Types.Left', V5573} end(E1892)); {'Idris.Prelude.Types.Right', E1893} -> (fun (V5574) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V5574}} end(E1893)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1891)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1889)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1872)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1870)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1868)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1862, E1863, E1864, E1865, E1866)); {'Idris.Core.Value.NType', E1894} -> (fun (V5575) -> fun (V5576) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1894)); {'Idris.Core.Value.NErased', E1895, E1896} -> (fun (V5577, V5578) -> fun (V5579) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1895, E1896)); _ -> fun (V5580) -> begin (V5609 = begin (V5608 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5581) -> fun (V5582) -> fun (V5583) -> fun (V5584) -> fun (V5585) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V5583, V5584, V5585)) end end end end end, fun (V5586) -> fun (V5587) -> fun (V5588) -> V5587 end end end, fun (V5589) -> fun (V5590) -> fun (V5591) -> fun (V5592) -> fun (V5593) -> begin (V5594 = (V5591(V5593))), begin (V5595 = (V5592(V5593))), (V5594(V5595)) end end end end end end end}, fun (V5596) -> fun (V5597) -> fun (V5598) -> fun (V5599) -> fun (V5600) -> begin (V5601 = (V5598(V5600))), ((V5599(V5601))(V5600)) end end end end end end, fun (V5602) -> fun (V5603) -> fun (V5604) -> begin (V5605 = (V5603(V5604))), (V5605(V5604)) end end end end}, fun (V5606) -> fun (V5607) -> V5607 end end}, V0))(V5580))), {'Idris.Prelude.Types.Right', V5608} end), case V5609 of {'Idris.Prelude.Types.Left', E1856} -> (fun (V5610) -> {'Idris.Prelude.Types.Left', V5610} end(E1856)); {'Idris.Prelude.Types.Right', E1857} -> (fun (V5611) -> begin (V5612 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V5611, {'Idris.Core.Env.Nil'}, V3, V5580))), case V5612 of {'Idris.Prelude.Types.Left', E1858} -> (fun (V5613) -> {'Idris.Prelude.Types.Left', V5613} end(E1858)); {'Idris.Prelude.Types.Right', E1859} -> (fun (V5614) -> begin (V5619 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V5615) -> fun (V5616) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V5615, V5616)) end end, fun (V5617) -> fun (V5618) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V5617, V5618)) end end}, V5614, V5580))), case V5619 of {'Idris.Prelude.Types.Left', E1860} -> (fun (V5620) -> {'Idris.Prelude.Types.Left', V5620} end(E1860)); {'Idris.Prelude.Types.Right', E1861} -> (fun (V5621) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V5621))))}, V5580)) end(E1861)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1859)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1857)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end end end(E1854, E1855)); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NPrimVal', E740, E741} -> (fun (V5622, V5623) -> case V5623 of {'Idris.Core.TT.StringType'} -> (fun () -> fun (V5624) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFString'}} end end()); _ -> case V3 of {'Idris.Core.Value.NPrimVal', E926, E927} -> (fun (V5625, V5626) -> case V5626 of {'Idris.Core.TT.DoubleType'} -> (fun () -> fun (V5627) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFDouble'}} end end()); {'Idris.Core.TT.CharType'} -> (fun () -> fun (V5628) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFChar'}} end end()); {'Idris.Core.TT.WorldType'} -> (fun () -> fun (V5629) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFWorld'}} end end()); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E1010, E1011, E1012, E1013} -> (fun (V5630, V5631, V5632, V5633) -> case V5632 of {'Idris.Core.TT.Pi', E1055, E1056, E1057, E1058} -> (fun (V5634, V5635, V5636, V5637) -> fun (V5638) -> begin (V5667 = begin (V5666 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5639) -> fun (V5640) -> fun (V5641) -> fun (V5642) -> fun (V5643) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V5641, V5642, V5643)) end end end end end, fun (V5644) -> fun (V5645) -> fun (V5646) -> V5645 end end end, fun (V5647) -> fun (V5648) -> fun (V5649) -> fun (V5650) -> fun (V5651) -> begin (V5652 = (V5649(V5651))), begin (V5653 = (V5650(V5651))), (V5652(V5653)) end end end end end end end}, fun (V5654) -> fun (V5655) -> fun (V5656) -> fun (V5657) -> fun (V5658) -> begin (V5659 = (V5656(V5658))), ((V5657(V5659))(V5658)) end end end end end end, fun (V5660) -> fun (V5661) -> fun (V5662) -> begin (V5663 = (V5661(V5662))), (V5663(V5662)) end end end end}, fun (V5664) -> fun (V5665) -> V5665 end end}, V0))(V5638))), {'Idris.Prelude.Types.Right', V5666} end), case V5667 of {'Idris.Prelude.Types.Left', E1059} -> (fun (V5668) -> {'Idris.Prelude.Types.Left', V5668} end(E1059)); {'Idris.Prelude.Types.Right', E1060} -> (fun (V5669) -> begin (V5670 = (('un--nfToCFType'(V0, V5630, 1, V5637))(V5638))), case V5670 of {'Idris.Prelude.Types.Left', E1061} -> (fun (V5671) -> {'Idris.Prelude.Types.Left', V5671} end(E1061)); {'Idris.Prelude.Types.Right', E1062} -> (fun (V5672) -> begin (V5673 = (((V5633(V5669))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V5630, 1}))))(V5638))), case V5673 of {'Idris.Prelude.Types.Left', E1063} -> (fun (V5674) -> {'Idris.Prelude.Types.Left', V5674} end(E1063)); {'Idris.Prelude.Types.Right', E1064} -> (fun (V5675) -> begin (V5676 = (('un--nfToCFType'(V0, V5630, 1, V5675))(V5638))), case V5676 of {'Idris.Prelude.Types.Left', E1065} -> (fun (V5677) -> {'Idris.Prelude.Types.Left', V5677} end(E1065)); {'Idris.Prelude.Types.Right', E1066} -> (fun (V5678) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V5672, V5678}} end(E1066)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1064)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1062)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1060)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1055, E1056, E1057, E1058)); _ -> case V3 of {'Idris.Core.Value.NTCon', E1020, E1021, E1022, E1023, E1024} -> (fun (V5679, V5680, V5681, V5682, V5683) -> fun (V5684) -> begin (V5713 = begin (V5712 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5685) -> fun (V5686) -> fun (V5687) -> fun (V5688) -> fun (V5689) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V5687, V5688, V5689)) end end end end end, fun (V5690) -> fun (V5691) -> fun (V5692) -> V5691 end end end, fun (V5693) -> fun (V5694) -> fun (V5695) -> fun (V5696) -> fun (V5697) -> begin (V5698 = (V5695(V5697))), begin (V5699 = (V5696(V5697))), (V5698(V5699)) end end end end end end end}, fun (V5700) -> fun (V5701) -> fun (V5702) -> fun (V5703) -> fun (V5704) -> begin (V5705 = (V5702(V5704))), ((V5703(V5705))(V5704)) end end end end end end, fun (V5706) -> fun (V5707) -> fun (V5708) -> begin (V5709 = (V5707(V5708))), (V5709(V5708)) end end end end}, fun (V5710) -> fun (V5711) -> V5711 end end}, V0))(V5684))), {'Idris.Prelude.Types.Right', V5712} end), case V5713 of {'Idris.Prelude.Types.Left', E1025} -> (fun (V5714) -> {'Idris.Prelude.Types.Left', V5714} end(E1025)); {'Idris.Prelude.Types.Right', E1026} -> (fun (V5715) -> begin (V5720 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V5716) -> fun (V5717) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V5716, V5717)) end end, fun (V5718) -> fun (V5719) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V5718, V5719)) end end}, V5680, V5684))), case V5720 of {'Idris.Prelude.Types.Left', E1027} -> (fun (V5721) -> {'Idris.Prelude.Types.Left', V5721} end(E1027)); {'Idris.Prelude.Types.Right', E1028} -> (fun (V5722) -> begin (V5723 = (('un--getNArgs'(V0, V5715, V5722, V5683))(V5684))), case V5723 of {'Idris.Prelude.Types.Left', E1029} -> (fun (V5724) -> {'Idris.Prelude.Types.Left', V5724} end(E1029)); {'Idris.Prelude.Types.Right', E1030} -> (fun (V5725) -> case V5725 of {'Idris.Compiler.CompileExpr.User', E1031, E1032} -> (fun (V5726, V5727) -> begin (V5729 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5728) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5715, V5728)) end, V5727))(V5684))), case V5729 of {'Idris.Prelude.Types.Left', E1033} -> (fun (V5730) -> {'Idris.Prelude.Types.Left', V5730} end(E1033)); {'Idris.Prelude.Types.Right', E1034} -> (fun (V5731) -> begin (V5733 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5732) -> ('un--nfToCFType'(V0, V5679, V2, V5732)) end, V5731))(V5684))), case V5733 of {'Idris.Prelude.Types.Left', E1035} -> (fun (V5734) -> {'Idris.Prelude.Types.Left', V5734} end(E1035)); {'Idris.Prelude.Types.Right', E1036} -> (fun (V5735) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V5722, V5735}} end(E1036)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1034)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1031, E1032)); {'Idris.Compiler.CompileExpr.Struct', E1037, E1038} -> (fun (V5736, V5737) -> begin (V5748 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5738) -> case V5738 of {'Idris.Builtin.MkPair', E1039, E1040} -> (fun (V5739, V5740) -> fun (V5741) -> begin (V5742 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5715, V5740))(V5741))), case V5742 of {'Idris.Prelude.Types.Left', E1041} -> (fun (V5743) -> {'Idris.Prelude.Types.Left', V5743} end(E1041)); {'Idris.Prelude.Types.Right', E1042} -> (fun (V5744) -> begin (V5745 = (('un--nfToCFType'(V0, V5679, 0, V5744))(V5741))), case V5745 of {'Idris.Prelude.Types.Left', E1043} -> (fun (V5746) -> {'Idris.Prelude.Types.Left', V5746} end(E1043)); {'Idris.Prelude.Types.Right', E1044} -> (fun (V5747) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V5739, V5747}} end(E1044)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1042)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1039, E1040)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V5737))(V5684))), case V5748 of {'Idris.Prelude.Types.Left', E1045} -> (fun (V5749) -> {'Idris.Prelude.Types.Left', V5749} end(E1045)); {'Idris.Prelude.Types.Right', E1046} -> (fun (V5750) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V5736, V5750}} end(E1046)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1037, E1038)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1047} -> (fun (V5751) -> begin (V5752 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5715, V5751))(V5684))), case V5752 of {'Idris.Prelude.Types.Left', E1048} -> (fun (V5753) -> {'Idris.Prelude.Types.Left', V5753} end(E1048)); {'Idris.Prelude.Types.Right', E1049} -> (fun (V5754) -> begin (V5755 = (('un--nfToCFType'(V0, V5679, V2, V5754))(V5684))), case V5755 of {'Idris.Prelude.Types.Left', E1050} -> (fun (V5756) -> {'Idris.Prelude.Types.Left', V5756} end(E1050)); {'Idris.Prelude.Types.Right', E1051} -> (fun (V5757) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V5757}} end(E1051)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1049)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1047)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1030)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1028)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1026)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1020, E1021, E1022, E1023, E1024)); {'Idris.Core.Value.NType', E1052} -> (fun (V5758) -> fun (V5759) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1052)); {'Idris.Core.Value.NErased', E1053, E1054} -> (fun (V5760, V5761) -> fun (V5762) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1053, E1054)); _ -> fun (V5763) -> begin (V5792 = begin (V5791 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5764) -> fun (V5765) -> fun (V5766) -> fun (V5767) -> fun (V5768) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V5766, V5767, V5768)) end end end end end, fun (V5769) -> fun (V5770) -> fun (V5771) -> V5770 end end end, fun (V5772) -> fun (V5773) -> fun (V5774) -> fun (V5775) -> fun (V5776) -> begin (V5777 = (V5774(V5776))), begin (V5778 = (V5775(V5776))), (V5777(V5778)) end end end end end end end}, fun (V5779) -> fun (V5780) -> fun (V5781) -> fun (V5782) -> fun (V5783) -> begin (V5784 = (V5781(V5783))), ((V5782(V5784))(V5783)) end end end end end end, fun (V5785) -> fun (V5786) -> fun (V5787) -> begin (V5788 = (V5786(V5787))), (V5788(V5787)) end end end end}, fun (V5789) -> fun (V5790) -> V5790 end end}, V0))(V5763))), {'Idris.Prelude.Types.Right', V5791} end), case V5792 of {'Idris.Prelude.Types.Left', E1014} -> (fun (V5793) -> {'Idris.Prelude.Types.Left', V5793} end(E1014)); {'Idris.Prelude.Types.Right', E1015} -> (fun (V5794) -> begin (V5795 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V5794, {'Idris.Core.Env.Nil'}, V3, V5763))), case V5795 of {'Idris.Prelude.Types.Left', E1016} -> (fun (V5796) -> {'Idris.Prelude.Types.Left', V5796} end(E1016)); {'Idris.Prelude.Types.Right', E1017} -> (fun (V5797) -> begin (V5802 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V5798) -> fun (V5799) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V5798, V5799)) end end, fun (V5800) -> fun (V5801) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V5800, V5801)) end end}, V5797, V5763))), case V5802 of {'Idris.Prelude.Types.Left', E1018} -> (fun (V5803) -> {'Idris.Prelude.Types.Left', V5803} end(E1018)); {'Idris.Prelude.Types.Right', E1019} -> (fun (V5804) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V5804))))}, V5763)) end(E1019)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1017)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1015)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E1010, E1011, E1012, E1013)); _ -> case V3 of {'Idris.Core.Value.NTCon', E975, E976, E977, E978, E979} -> (fun (V5805, V5806, V5807, V5808, V5809) -> fun (V5810) -> begin (V5839 = begin (V5838 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5811) -> fun (V5812) -> fun (V5813) -> fun (V5814) -> fun (V5815) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V5813, V5814, V5815)) end end end end end, fun (V5816) -> fun (V5817) -> fun (V5818) -> V5817 end end end, fun (V5819) -> fun (V5820) -> fun (V5821) -> fun (V5822) -> fun (V5823) -> begin (V5824 = (V5821(V5823))), begin (V5825 = (V5822(V5823))), (V5824(V5825)) end end end end end end end}, fun (V5826) -> fun (V5827) -> fun (V5828) -> fun (V5829) -> fun (V5830) -> begin (V5831 = (V5828(V5830))), ((V5829(V5831))(V5830)) end end end end end end, fun (V5832) -> fun (V5833) -> fun (V5834) -> begin (V5835 = (V5833(V5834))), (V5835(V5834)) end end end end}, fun (V5836) -> fun (V5837) -> V5837 end end}, V0))(V5810))), {'Idris.Prelude.Types.Right', V5838} end), case V5839 of {'Idris.Prelude.Types.Left', E980} -> (fun (V5840) -> {'Idris.Prelude.Types.Left', V5840} end(E980)); {'Idris.Prelude.Types.Right', E981} -> (fun (V5841) -> begin (V5846 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V5842) -> fun (V5843) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V5842, V5843)) end end, fun (V5844) -> fun (V5845) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V5844, V5845)) end end}, V5806, V5810))), case V5846 of {'Idris.Prelude.Types.Left', E982} -> (fun (V5847) -> {'Idris.Prelude.Types.Left', V5847} end(E982)); {'Idris.Prelude.Types.Right', E983} -> (fun (V5848) -> begin (V5849 = (('un--getNArgs'(V0, V5841, V5848, V5809))(V5810))), case V5849 of {'Idris.Prelude.Types.Left', E984} -> (fun (V5850) -> {'Idris.Prelude.Types.Left', V5850} end(E984)); {'Idris.Prelude.Types.Right', E985} -> (fun (V5851) -> case V5851 of {'Idris.Compiler.CompileExpr.User', E986, E987} -> (fun (V5852, V5853) -> begin (V5855 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5854) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5841, V5854)) end, V5853))(V5810))), case V5855 of {'Idris.Prelude.Types.Left', E988} -> (fun (V5856) -> {'Idris.Prelude.Types.Left', V5856} end(E988)); {'Idris.Prelude.Types.Right', E989} -> (fun (V5857) -> begin (V5859 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5858) -> ('un--nfToCFType'(V0, V5805, V2, V5858)) end, V5857))(V5810))), case V5859 of {'Idris.Prelude.Types.Left', E990} -> (fun (V5860) -> {'Idris.Prelude.Types.Left', V5860} end(E990)); {'Idris.Prelude.Types.Right', E991} -> (fun (V5861) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V5848, V5861}} end(E991)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E989)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E986, E987)); {'Idris.Compiler.CompileExpr.Struct', E992, E993} -> (fun (V5862, V5863) -> begin (V5874 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5864) -> case V5864 of {'Idris.Builtin.MkPair', E994, E995} -> (fun (V5865, V5866) -> fun (V5867) -> begin (V5868 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5841, V5866))(V5867))), case V5868 of {'Idris.Prelude.Types.Left', E996} -> (fun (V5869) -> {'Idris.Prelude.Types.Left', V5869} end(E996)); {'Idris.Prelude.Types.Right', E997} -> (fun (V5870) -> begin (V5871 = (('un--nfToCFType'(V0, V5805, 0, V5870))(V5867))), case V5871 of {'Idris.Prelude.Types.Left', E998} -> (fun (V5872) -> {'Idris.Prelude.Types.Left', V5872} end(E998)); {'Idris.Prelude.Types.Right', E999} -> (fun (V5873) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V5865, V5873}} end(E999)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E997)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E994, E995)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V5863))(V5810))), case V5874 of {'Idris.Prelude.Types.Left', E1000} -> (fun (V5875) -> {'Idris.Prelude.Types.Left', V5875} end(E1000)); {'Idris.Prelude.Types.Right', E1001} -> (fun (V5876) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V5862, V5876}} end(E1001)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E992, E993)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1002} -> (fun (V5877) -> begin (V5878 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5841, V5877))(V5810))), case V5878 of {'Idris.Prelude.Types.Left', E1003} -> (fun (V5879) -> {'Idris.Prelude.Types.Left', V5879} end(E1003)); {'Idris.Prelude.Types.Right', E1004} -> (fun (V5880) -> begin (V5881 = (('un--nfToCFType'(V0, V5805, V2, V5880))(V5810))), case V5881 of {'Idris.Prelude.Types.Left', E1005} -> (fun (V5882) -> {'Idris.Prelude.Types.Left', V5882} end(E1005)); {'Idris.Prelude.Types.Right', E1006} -> (fun (V5883) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V5883}} end(E1006)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1004)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1002)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E985)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E983)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E981)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E975, E976, E977, E978, E979)); {'Idris.Core.Value.NType', E1007} -> (fun (V5884) -> fun (V5885) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1007)); {'Idris.Core.Value.NErased', E1008, E1009} -> (fun (V5886, V5887) -> fun (V5888) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1008, E1009)); _ -> fun (V5889) -> begin (V5918 = begin (V5917 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5890) -> fun (V5891) -> fun (V5892) -> fun (V5893) -> fun (V5894) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V5892, V5893, V5894)) end end end end end, fun (V5895) -> fun (V5896) -> fun (V5897) -> V5896 end end end, fun (V5898) -> fun (V5899) -> fun (V5900) -> fun (V5901) -> fun (V5902) -> begin (V5903 = (V5900(V5902))), begin (V5904 = (V5901(V5902))), (V5903(V5904)) end end end end end end end}, fun (V5905) -> fun (V5906) -> fun (V5907) -> fun (V5908) -> fun (V5909) -> begin (V5910 = (V5907(V5909))), ((V5908(V5910))(V5909)) end end end end end end, fun (V5911) -> fun (V5912) -> fun (V5913) -> begin (V5914 = (V5912(V5913))), (V5914(V5913)) end end end end}, fun (V5915) -> fun (V5916) -> V5916 end end}, V0))(V5889))), {'Idris.Prelude.Types.Right', V5917} end), case V5918 of {'Idris.Prelude.Types.Left', E969} -> (fun (V5919) -> {'Idris.Prelude.Types.Left', V5919} end(E969)); {'Idris.Prelude.Types.Right', E970} -> (fun (V5920) -> begin (V5921 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V5920, {'Idris.Core.Env.Nil'}, V3, V5889))), case V5921 of {'Idris.Prelude.Types.Left', E971} -> (fun (V5922) -> {'Idris.Prelude.Types.Left', V5922} end(E971)); {'Idris.Prelude.Types.Right', E972} -> (fun (V5923) -> begin (V5928 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V5924) -> fun (V5925) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V5924, V5925)) end end, fun (V5926) -> fun (V5927) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V5926, V5927)) end end}, V5923, V5889))), case V5928 of {'Idris.Prelude.Types.Left', E973} -> (fun (V5929) -> {'Idris.Prelude.Types.Left', V5929} end(E973)); {'Idris.Prelude.Types.Right', E974} -> (fun (V5930) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V5930))))}, V5889)) end(E974)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E972)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E970)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E1108, E1109, E1110, E1111} -> (fun (V5931, V5932, V5933, V5934) -> fun (V5935) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V5931, <<"Function types not allowed in a foreign struct"/utf8>>}, V5935)) end end(E1108, E1109, E1110, E1111)); _ -> case V3 of {'Idris.Core.Value.NTCon', E1073, E1074, E1075, E1076, E1077} -> (fun (V5936, V5937, V5938, V5939, V5940) -> fun (V5941) -> begin (V5970 = begin (V5969 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V5942) -> fun (V5943) -> fun (V5944) -> fun (V5945) -> fun (V5946) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V5944, V5945, V5946)) end end end end end, fun (V5947) -> fun (V5948) -> fun (V5949) -> V5948 end end end, fun (V5950) -> fun (V5951) -> fun (V5952) -> fun (V5953) -> fun (V5954) -> begin (V5955 = (V5952(V5954))), begin (V5956 = (V5953(V5954))), (V5955(V5956)) end end end end end end end}, fun (V5957) -> fun (V5958) -> fun (V5959) -> fun (V5960) -> fun (V5961) -> begin (V5962 = (V5959(V5961))), ((V5960(V5962))(V5961)) end end end end end end, fun (V5963) -> fun (V5964) -> fun (V5965) -> begin (V5966 = (V5964(V5965))), (V5966(V5965)) end end end end}, fun (V5967) -> fun (V5968) -> V5968 end end}, V0))(V5941))), {'Idris.Prelude.Types.Right', V5969} end), case V5970 of {'Idris.Prelude.Types.Left', E1078} -> (fun (V5971) -> {'Idris.Prelude.Types.Left', V5971} end(E1078)); {'Idris.Prelude.Types.Right', E1079} -> (fun (V5972) -> begin (V5977 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V5973) -> fun (V5974) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V5973, V5974)) end end, fun (V5975) -> fun (V5976) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V5975, V5976)) end end}, V5937, V5941))), case V5977 of {'Idris.Prelude.Types.Left', E1080} -> (fun (V5978) -> {'Idris.Prelude.Types.Left', V5978} end(E1080)); {'Idris.Prelude.Types.Right', E1081} -> (fun (V5979) -> begin (V5980 = (('un--getNArgs'(V0, V5972, V5979, V5940))(V5941))), case V5980 of {'Idris.Prelude.Types.Left', E1082} -> (fun (V5981) -> {'Idris.Prelude.Types.Left', V5981} end(E1082)); {'Idris.Prelude.Types.Right', E1083} -> (fun (V5982) -> case V5982 of {'Idris.Compiler.CompileExpr.User', E1084, E1085} -> (fun (V5983, V5984) -> begin (V5986 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5985) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5972, V5985)) end, V5984))(V5941))), case V5986 of {'Idris.Prelude.Types.Left', E1086} -> (fun (V5987) -> {'Idris.Prelude.Types.Left', V5987} end(E1086)); {'Idris.Prelude.Types.Right', E1087} -> (fun (V5988) -> begin (V5990 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5989) -> ('un--nfToCFType'(V0, V5936, V2, V5989)) end, V5988))(V5941))), case V5990 of {'Idris.Prelude.Types.Left', E1088} -> (fun (V5991) -> {'Idris.Prelude.Types.Left', V5991} end(E1088)); {'Idris.Prelude.Types.Right', E1089} -> (fun (V5992) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V5979, V5992}} end(E1089)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1087)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1084, E1085)); {'Idris.Compiler.CompileExpr.Struct', E1090, E1091} -> (fun (V5993, V5994) -> begin (V6005 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V5995) -> case V5995 of {'Idris.Builtin.MkPair', E1092, E1093} -> (fun (V5996, V5997) -> fun (V5998) -> begin (V5999 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5972, V5997))(V5998))), case V5999 of {'Idris.Prelude.Types.Left', E1094} -> (fun (V6000) -> {'Idris.Prelude.Types.Left', V6000} end(E1094)); {'Idris.Prelude.Types.Right', E1095} -> (fun (V6001) -> begin (V6002 = (('un--nfToCFType'(V0, V5936, 0, V6001))(V5998))), case V6002 of {'Idris.Prelude.Types.Left', E1096} -> (fun (V6003) -> {'Idris.Prelude.Types.Left', V6003} end(E1096)); {'Idris.Prelude.Types.Right', E1097} -> (fun (V6004) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V5996, V6004}} end(E1097)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1095)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1092, E1093)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V5994))(V5941))), case V6005 of {'Idris.Prelude.Types.Left', E1098} -> (fun (V6006) -> {'Idris.Prelude.Types.Left', V6006} end(E1098)); {'Idris.Prelude.Types.Right', E1099} -> (fun (V6007) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V5993, V6007}} end(E1099)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1090, E1091)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1100} -> (fun (V6008) -> begin (V6009 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V5972, V6008))(V5941))), case V6009 of {'Idris.Prelude.Types.Left', E1101} -> (fun (V6010) -> {'Idris.Prelude.Types.Left', V6010} end(E1101)); {'Idris.Prelude.Types.Right', E1102} -> (fun (V6011) -> begin (V6012 = (('un--nfToCFType'(V0, V5936, V2, V6011))(V5941))), case V6012 of {'Idris.Prelude.Types.Left', E1103} -> (fun (V6013) -> {'Idris.Prelude.Types.Left', V6013} end(E1103)); {'Idris.Prelude.Types.Right', E1104} -> (fun (V6014) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V6014}} end(E1104)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1102)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1100)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1083)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1081)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1079)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1073, E1074, E1075, E1076, E1077)); {'Idris.Core.Value.NType', E1105} -> (fun (V6015) -> fun (V6016) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1105)); {'Idris.Core.Value.NErased', E1106, E1107} -> (fun (V6017, V6018) -> fun (V6019) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1106, E1107)); _ -> fun (V6020) -> begin (V6049 = begin (V6048 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6021) -> fun (V6022) -> fun (V6023) -> fun (V6024) -> fun (V6025) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6023, V6024, V6025)) end end end end end, fun (V6026) -> fun (V6027) -> fun (V6028) -> V6027 end end end, fun (V6029) -> fun (V6030) -> fun (V6031) -> fun (V6032) -> fun (V6033) -> begin (V6034 = (V6031(V6033))), begin (V6035 = (V6032(V6033))), (V6034(V6035)) end end end end end end end}, fun (V6036) -> fun (V6037) -> fun (V6038) -> fun (V6039) -> fun (V6040) -> begin (V6041 = (V6038(V6040))), ((V6039(V6041))(V6040)) end end end end end end, fun (V6042) -> fun (V6043) -> fun (V6044) -> begin (V6045 = (V6043(V6044))), (V6045(V6044)) end end end end}, fun (V6046) -> fun (V6047) -> V6047 end end}, V0))(V6020))), {'Idris.Prelude.Types.Right', V6048} end), case V6049 of {'Idris.Prelude.Types.Left', E1067} -> (fun (V6050) -> {'Idris.Prelude.Types.Left', V6050} end(E1067)); {'Idris.Prelude.Types.Right', E1068} -> (fun (V6051) -> begin (V6052 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V6051, {'Idris.Core.Env.Nil'}, V3, V6020))), case V6052 of {'Idris.Prelude.Types.Left', E1069} -> (fun (V6053) -> {'Idris.Prelude.Types.Left', V6053} end(E1069)); {'Idris.Prelude.Types.Right', E1070} -> (fun (V6054) -> begin (V6059 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V6055) -> fun (V6056) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V6055, V6056)) end end, fun (V6057) -> fun (V6058) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V6057, V6058)) end end}, V6054, V6020))), case V6059 of {'Idris.Prelude.Types.Left', E1071} -> (fun (V6060) -> {'Idris.Prelude.Types.Left', V6060} end(E1071)); {'Idris.Prelude.Types.Right', E1072} -> (fun (V6061) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V6061))))}, V6020)) end(E1072)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1070)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1068)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E934, E935, E936, E937, E938} -> (fun (V6062, V6063, V6064, V6065, V6066) -> fun (V6067) -> begin (V6096 = begin (V6095 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6068) -> fun (V6069) -> fun (V6070) -> fun (V6071) -> fun (V6072) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6070, V6071, V6072)) end end end end end, fun (V6073) -> fun (V6074) -> fun (V6075) -> V6074 end end end, fun (V6076) -> fun (V6077) -> fun (V6078) -> fun (V6079) -> fun (V6080) -> begin (V6081 = (V6078(V6080))), begin (V6082 = (V6079(V6080))), (V6081(V6082)) end end end end end end end}, fun (V6083) -> fun (V6084) -> fun (V6085) -> fun (V6086) -> fun (V6087) -> begin (V6088 = (V6085(V6087))), ((V6086(V6088))(V6087)) end end end end end end, fun (V6089) -> fun (V6090) -> fun (V6091) -> begin (V6092 = (V6090(V6091))), (V6092(V6091)) end end end end}, fun (V6093) -> fun (V6094) -> V6094 end end}, V0))(V6067))), {'Idris.Prelude.Types.Right', V6095} end), case V6096 of {'Idris.Prelude.Types.Left', E939} -> (fun (V6097) -> {'Idris.Prelude.Types.Left', V6097} end(E939)); {'Idris.Prelude.Types.Right', E940} -> (fun (V6098) -> begin (V6103 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V6099) -> fun (V6100) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V6099, V6100)) end end, fun (V6101) -> fun (V6102) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V6101, V6102)) end end}, V6063, V6067))), case V6103 of {'Idris.Prelude.Types.Left', E941} -> (fun (V6104) -> {'Idris.Prelude.Types.Left', V6104} end(E941)); {'Idris.Prelude.Types.Right', E942} -> (fun (V6105) -> begin (V6106 = (('un--getNArgs'(V0, V6098, V6105, V6066))(V6067))), case V6106 of {'Idris.Prelude.Types.Left', E943} -> (fun (V6107) -> {'Idris.Prelude.Types.Left', V6107} end(E943)); {'Idris.Prelude.Types.Right', E944} -> (fun (V6108) -> case V6108 of {'Idris.Compiler.CompileExpr.User', E945, E946} -> (fun (V6109, V6110) -> begin (V6112 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6111) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6098, V6111)) end, V6110))(V6067))), case V6112 of {'Idris.Prelude.Types.Left', E947} -> (fun (V6113) -> {'Idris.Prelude.Types.Left', V6113} end(E947)); {'Idris.Prelude.Types.Right', E948} -> (fun (V6114) -> begin (V6116 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6115) -> ('un--nfToCFType'(V0, V6062, V2, V6115)) end, V6114))(V6067))), case V6116 of {'Idris.Prelude.Types.Left', E949} -> (fun (V6117) -> {'Idris.Prelude.Types.Left', V6117} end(E949)); {'Idris.Prelude.Types.Right', E950} -> (fun (V6118) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V6105, V6118}} end(E950)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E948)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E945, E946)); {'Idris.Compiler.CompileExpr.Struct', E951, E952} -> (fun (V6119, V6120) -> begin (V6131 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6121) -> case V6121 of {'Idris.Builtin.MkPair', E953, E954} -> (fun (V6122, V6123) -> fun (V6124) -> begin (V6125 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6098, V6123))(V6124))), case V6125 of {'Idris.Prelude.Types.Left', E955} -> (fun (V6126) -> {'Idris.Prelude.Types.Left', V6126} end(E955)); {'Idris.Prelude.Types.Right', E956} -> (fun (V6127) -> begin (V6128 = (('un--nfToCFType'(V0, V6062, 0, V6127))(V6124))), case V6128 of {'Idris.Prelude.Types.Left', E957} -> (fun (V6129) -> {'Idris.Prelude.Types.Left', V6129} end(E957)); {'Idris.Prelude.Types.Right', E958} -> (fun (V6130) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V6122, V6130}} end(E958)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E956)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E953, E954)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V6120))(V6067))), case V6131 of {'Idris.Prelude.Types.Left', E959} -> (fun (V6132) -> {'Idris.Prelude.Types.Left', V6132} end(E959)); {'Idris.Prelude.Types.Right', E960} -> (fun (V6133) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V6119, V6133}} end(E960)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E951, E952)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E961} -> (fun (V6134) -> begin (V6135 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6098, V6134))(V6067))), case V6135 of {'Idris.Prelude.Types.Left', E962} -> (fun (V6136) -> {'Idris.Prelude.Types.Left', V6136} end(E962)); {'Idris.Prelude.Types.Right', E963} -> (fun (V6137) -> begin (V6138 = (('un--nfToCFType'(V0, V6062, V2, V6137))(V6067))), case V6138 of {'Idris.Prelude.Types.Left', E964} -> (fun (V6139) -> {'Idris.Prelude.Types.Left', V6139} end(E964)); {'Idris.Prelude.Types.Right', E965} -> (fun (V6140) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V6140}} end(E965)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E963)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E961)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E944)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E942)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E940)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E934, E935, E936, E937, E938)); {'Idris.Core.Value.NType', E966} -> (fun (V6141) -> fun (V6142) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E966)); {'Idris.Core.Value.NErased', E967, E968} -> (fun (V6143, V6144) -> fun (V6145) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E967, E968)); _ -> fun (V6146) -> begin (V6175 = begin (V6174 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6147) -> fun (V6148) -> fun (V6149) -> fun (V6150) -> fun (V6151) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6149, V6150, V6151)) end end end end end, fun (V6152) -> fun (V6153) -> fun (V6154) -> V6153 end end end, fun (V6155) -> fun (V6156) -> fun (V6157) -> fun (V6158) -> fun (V6159) -> begin (V6160 = (V6157(V6159))), begin (V6161 = (V6158(V6159))), (V6160(V6161)) end end end end end end end}, fun (V6162) -> fun (V6163) -> fun (V6164) -> fun (V6165) -> fun (V6166) -> begin (V6167 = (V6164(V6166))), ((V6165(V6167))(V6166)) end end end end end end, fun (V6168) -> fun (V6169) -> fun (V6170) -> begin (V6171 = (V6169(V6170))), (V6171(V6170)) end end end end}, fun (V6172) -> fun (V6173) -> V6173 end end}, V0))(V6146))), {'Idris.Prelude.Types.Right', V6174} end), case V6175 of {'Idris.Prelude.Types.Left', E928} -> (fun (V6176) -> {'Idris.Prelude.Types.Left', V6176} end(E928)); {'Idris.Prelude.Types.Right', E929} -> (fun (V6177) -> begin (V6178 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V6177, {'Idris.Core.Env.Nil'}, V3, V6146))), case V6178 of {'Idris.Prelude.Types.Left', E930} -> (fun (V6179) -> {'Idris.Prelude.Types.Left', V6179} end(E930)); {'Idris.Prelude.Types.Right', E931} -> (fun (V6180) -> begin (V6185 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V6181) -> fun (V6182) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V6181, V6182)) end end, fun (V6183) -> fun (V6184) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V6183, V6184)) end end}, V6180, V6146))), case V6185 of {'Idris.Prelude.Types.Left', E932} -> (fun (V6186) -> {'Idris.Prelude.Types.Left', V6186} end(E932)); {'Idris.Prelude.Types.Right', E933} -> (fun (V6187) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V6187))))}, V6146)) end(E933)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E931)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E929)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end(E926, E927)); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E824, E825, E826, E827} -> (fun (V6188, V6189, V6190, V6191) -> case V6190 of {'Idris.Core.TT.Pi', E869, E870, E871, E872} -> (fun (V6192, V6193, V6194, V6195) -> fun (V6196) -> begin (V6225 = begin (V6224 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6197) -> fun (V6198) -> fun (V6199) -> fun (V6200) -> fun (V6201) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6199, V6200, V6201)) end end end end end, fun (V6202) -> fun (V6203) -> fun (V6204) -> V6203 end end end, fun (V6205) -> fun (V6206) -> fun (V6207) -> fun (V6208) -> fun (V6209) -> begin (V6210 = (V6207(V6209))), begin (V6211 = (V6208(V6209))), (V6210(V6211)) end end end end end end end}, fun (V6212) -> fun (V6213) -> fun (V6214) -> fun (V6215) -> fun (V6216) -> begin (V6217 = (V6214(V6216))), ((V6215(V6217))(V6216)) end end end end end end, fun (V6218) -> fun (V6219) -> fun (V6220) -> begin (V6221 = (V6219(V6220))), (V6221(V6220)) end end end end}, fun (V6222) -> fun (V6223) -> V6223 end end}, V0))(V6196))), {'Idris.Prelude.Types.Right', V6224} end), case V6225 of {'Idris.Prelude.Types.Left', E873} -> (fun (V6226) -> {'Idris.Prelude.Types.Left', V6226} end(E873)); {'Idris.Prelude.Types.Right', E874} -> (fun (V6227) -> begin (V6228 = (('un--nfToCFType'(V0, V6188, 1, V6195))(V6196))), case V6228 of {'Idris.Prelude.Types.Left', E875} -> (fun (V6229) -> {'Idris.Prelude.Types.Left', V6229} end(E875)); {'Idris.Prelude.Types.Right', E876} -> (fun (V6230) -> begin (V6231 = (((V6191(V6227))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V6188, 1}))))(V6196))), case V6231 of {'Idris.Prelude.Types.Left', E877} -> (fun (V6232) -> {'Idris.Prelude.Types.Left', V6232} end(E877)); {'Idris.Prelude.Types.Right', E878} -> (fun (V6233) -> begin (V6234 = (('un--nfToCFType'(V0, V6188, 1, V6233))(V6196))), case V6234 of {'Idris.Prelude.Types.Left', E879} -> (fun (V6235) -> {'Idris.Prelude.Types.Left', V6235} end(E879)); {'Idris.Prelude.Types.Right', E880} -> (fun (V6236) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V6230, V6236}} end(E880)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E878)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E876)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E874)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E869, E870, E871, E872)); _ -> case V3 of {'Idris.Core.Value.NTCon', E834, E835, E836, E837, E838} -> (fun (V6237, V6238, V6239, V6240, V6241) -> fun (V6242) -> begin (V6271 = begin (V6270 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6243) -> fun (V6244) -> fun (V6245) -> fun (V6246) -> fun (V6247) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6245, V6246, V6247)) end end end end end, fun (V6248) -> fun (V6249) -> fun (V6250) -> V6249 end end end, fun (V6251) -> fun (V6252) -> fun (V6253) -> fun (V6254) -> fun (V6255) -> begin (V6256 = (V6253(V6255))), begin (V6257 = (V6254(V6255))), (V6256(V6257)) end end end end end end end}, fun (V6258) -> fun (V6259) -> fun (V6260) -> fun (V6261) -> fun (V6262) -> begin (V6263 = (V6260(V6262))), ((V6261(V6263))(V6262)) end end end end end end, fun (V6264) -> fun (V6265) -> fun (V6266) -> begin (V6267 = (V6265(V6266))), (V6267(V6266)) end end end end}, fun (V6268) -> fun (V6269) -> V6269 end end}, V0))(V6242))), {'Idris.Prelude.Types.Right', V6270} end), case V6271 of {'Idris.Prelude.Types.Left', E839} -> (fun (V6272) -> {'Idris.Prelude.Types.Left', V6272} end(E839)); {'Idris.Prelude.Types.Right', E840} -> (fun (V6273) -> begin (V6278 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V6274) -> fun (V6275) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V6274, V6275)) end end, fun (V6276) -> fun (V6277) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V6276, V6277)) end end}, V6238, V6242))), case V6278 of {'Idris.Prelude.Types.Left', E841} -> (fun (V6279) -> {'Idris.Prelude.Types.Left', V6279} end(E841)); {'Idris.Prelude.Types.Right', E842} -> (fun (V6280) -> begin (V6281 = (('un--getNArgs'(V0, V6273, V6280, V6241))(V6242))), case V6281 of {'Idris.Prelude.Types.Left', E843} -> (fun (V6282) -> {'Idris.Prelude.Types.Left', V6282} end(E843)); {'Idris.Prelude.Types.Right', E844} -> (fun (V6283) -> case V6283 of {'Idris.Compiler.CompileExpr.User', E845, E846} -> (fun (V6284, V6285) -> begin (V6287 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6286) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6273, V6286)) end, V6285))(V6242))), case V6287 of {'Idris.Prelude.Types.Left', E847} -> (fun (V6288) -> {'Idris.Prelude.Types.Left', V6288} end(E847)); {'Idris.Prelude.Types.Right', E848} -> (fun (V6289) -> begin (V6291 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6290) -> ('un--nfToCFType'(V0, V6237, V2, V6290)) end, V6289))(V6242))), case V6291 of {'Idris.Prelude.Types.Left', E849} -> (fun (V6292) -> {'Idris.Prelude.Types.Left', V6292} end(E849)); {'Idris.Prelude.Types.Right', E850} -> (fun (V6293) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V6280, V6293}} end(E850)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E848)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E845, E846)); {'Idris.Compiler.CompileExpr.Struct', E851, E852} -> (fun (V6294, V6295) -> begin (V6306 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6296) -> case V6296 of {'Idris.Builtin.MkPair', E853, E854} -> (fun (V6297, V6298) -> fun (V6299) -> begin (V6300 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6273, V6298))(V6299))), case V6300 of {'Idris.Prelude.Types.Left', E855} -> (fun (V6301) -> {'Idris.Prelude.Types.Left', V6301} end(E855)); {'Idris.Prelude.Types.Right', E856} -> (fun (V6302) -> begin (V6303 = (('un--nfToCFType'(V0, V6237, 0, V6302))(V6299))), case V6303 of {'Idris.Prelude.Types.Left', E857} -> (fun (V6304) -> {'Idris.Prelude.Types.Left', V6304} end(E857)); {'Idris.Prelude.Types.Right', E858} -> (fun (V6305) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V6297, V6305}} end(E858)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E856)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E853, E854)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V6295))(V6242))), case V6306 of {'Idris.Prelude.Types.Left', E859} -> (fun (V6307) -> {'Idris.Prelude.Types.Left', V6307} end(E859)); {'Idris.Prelude.Types.Right', E860} -> (fun (V6308) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V6294, V6308}} end(E860)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E851, E852)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E861} -> (fun (V6309) -> begin (V6310 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6273, V6309))(V6242))), case V6310 of {'Idris.Prelude.Types.Left', E862} -> (fun (V6311) -> {'Idris.Prelude.Types.Left', V6311} end(E862)); {'Idris.Prelude.Types.Right', E863} -> (fun (V6312) -> begin (V6313 = (('un--nfToCFType'(V0, V6237, V2, V6312))(V6242))), case V6313 of {'Idris.Prelude.Types.Left', E864} -> (fun (V6314) -> {'Idris.Prelude.Types.Left', V6314} end(E864)); {'Idris.Prelude.Types.Right', E865} -> (fun (V6315) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V6315}} end(E865)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E863)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E861)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E844)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E842)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E840)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E834, E835, E836, E837, E838)); {'Idris.Core.Value.NType', E866} -> (fun (V6316) -> fun (V6317) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E866)); {'Idris.Core.Value.NErased', E867, E868} -> (fun (V6318, V6319) -> fun (V6320) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E867, E868)); _ -> fun (V6321) -> begin (V6350 = begin (V6349 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6322) -> fun (V6323) -> fun (V6324) -> fun (V6325) -> fun (V6326) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6324, V6325, V6326)) end end end end end, fun (V6327) -> fun (V6328) -> fun (V6329) -> V6328 end end end, fun (V6330) -> fun (V6331) -> fun (V6332) -> fun (V6333) -> fun (V6334) -> begin (V6335 = (V6332(V6334))), begin (V6336 = (V6333(V6334))), (V6335(V6336)) end end end end end end end}, fun (V6337) -> fun (V6338) -> fun (V6339) -> fun (V6340) -> fun (V6341) -> begin (V6342 = (V6339(V6341))), ((V6340(V6342))(V6341)) end end end end end end, fun (V6343) -> fun (V6344) -> fun (V6345) -> begin (V6346 = (V6344(V6345))), (V6346(V6345)) end end end end}, fun (V6347) -> fun (V6348) -> V6348 end end}, V0))(V6321))), {'Idris.Prelude.Types.Right', V6349} end), case V6350 of {'Idris.Prelude.Types.Left', E828} -> (fun (V6351) -> {'Idris.Prelude.Types.Left', V6351} end(E828)); {'Idris.Prelude.Types.Right', E829} -> (fun (V6352) -> begin (V6353 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V6352, {'Idris.Core.Env.Nil'}, V3, V6321))), case V6353 of {'Idris.Prelude.Types.Left', E830} -> (fun (V6354) -> {'Idris.Prelude.Types.Left', V6354} end(E830)); {'Idris.Prelude.Types.Right', E831} -> (fun (V6355) -> begin (V6360 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V6356) -> fun (V6357) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V6356, V6357)) end end, fun (V6358) -> fun (V6359) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V6358, V6359)) end end}, V6355, V6321))), case V6360 of {'Idris.Prelude.Types.Left', E832} -> (fun (V6361) -> {'Idris.Prelude.Types.Left', V6361} end(E832)); {'Idris.Prelude.Types.Right', E833} -> (fun (V6362) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V6362))))}, V6321)) end(E833)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E831)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E829)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E824, E825, E826, E827)); _ -> case V3 of {'Idris.Core.Value.NTCon', E789, E790, E791, E792, E793} -> (fun (V6363, V6364, V6365, V6366, V6367) -> fun (V6368) -> begin (V6397 = begin (V6396 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6369) -> fun (V6370) -> fun (V6371) -> fun (V6372) -> fun (V6373) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6371, V6372, V6373)) end end end end end, fun (V6374) -> fun (V6375) -> fun (V6376) -> V6375 end end end, fun (V6377) -> fun (V6378) -> fun (V6379) -> fun (V6380) -> fun (V6381) -> begin (V6382 = (V6379(V6381))), begin (V6383 = (V6380(V6381))), (V6382(V6383)) end end end end end end end}, fun (V6384) -> fun (V6385) -> fun (V6386) -> fun (V6387) -> fun (V6388) -> begin (V6389 = (V6386(V6388))), ((V6387(V6389))(V6388)) end end end end end end, fun (V6390) -> fun (V6391) -> fun (V6392) -> begin (V6393 = (V6391(V6392))), (V6393(V6392)) end end end end}, fun (V6394) -> fun (V6395) -> V6395 end end}, V0))(V6368))), {'Idris.Prelude.Types.Right', V6396} end), case V6397 of {'Idris.Prelude.Types.Left', E794} -> (fun (V6398) -> {'Idris.Prelude.Types.Left', V6398} end(E794)); {'Idris.Prelude.Types.Right', E795} -> (fun (V6399) -> begin (V6404 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V6400) -> fun (V6401) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V6400, V6401)) end end, fun (V6402) -> fun (V6403) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V6402, V6403)) end end}, V6364, V6368))), case V6404 of {'Idris.Prelude.Types.Left', E796} -> (fun (V6405) -> {'Idris.Prelude.Types.Left', V6405} end(E796)); {'Idris.Prelude.Types.Right', E797} -> (fun (V6406) -> begin (V6407 = (('un--getNArgs'(V0, V6399, V6406, V6367))(V6368))), case V6407 of {'Idris.Prelude.Types.Left', E798} -> (fun (V6408) -> {'Idris.Prelude.Types.Left', V6408} end(E798)); {'Idris.Prelude.Types.Right', E799} -> (fun (V6409) -> case V6409 of {'Idris.Compiler.CompileExpr.User', E800, E801} -> (fun (V6410, V6411) -> begin (V6413 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6412) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6399, V6412)) end, V6411))(V6368))), case V6413 of {'Idris.Prelude.Types.Left', E802} -> (fun (V6414) -> {'Idris.Prelude.Types.Left', V6414} end(E802)); {'Idris.Prelude.Types.Right', E803} -> (fun (V6415) -> begin (V6417 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6416) -> ('un--nfToCFType'(V0, V6363, V2, V6416)) end, V6415))(V6368))), case V6417 of {'Idris.Prelude.Types.Left', E804} -> (fun (V6418) -> {'Idris.Prelude.Types.Left', V6418} end(E804)); {'Idris.Prelude.Types.Right', E805} -> (fun (V6419) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V6406, V6419}} end(E805)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E803)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E800, E801)); {'Idris.Compiler.CompileExpr.Struct', E806, E807} -> (fun (V6420, V6421) -> begin (V6432 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6422) -> case V6422 of {'Idris.Builtin.MkPair', E808, E809} -> (fun (V6423, V6424) -> fun (V6425) -> begin (V6426 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6399, V6424))(V6425))), case V6426 of {'Idris.Prelude.Types.Left', E810} -> (fun (V6427) -> {'Idris.Prelude.Types.Left', V6427} end(E810)); {'Idris.Prelude.Types.Right', E811} -> (fun (V6428) -> begin (V6429 = (('un--nfToCFType'(V0, V6363, 0, V6428))(V6425))), case V6429 of {'Idris.Prelude.Types.Left', E812} -> (fun (V6430) -> {'Idris.Prelude.Types.Left', V6430} end(E812)); {'Idris.Prelude.Types.Right', E813} -> (fun (V6431) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V6423, V6431}} end(E813)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E811)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E808, E809)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V6421))(V6368))), case V6432 of {'Idris.Prelude.Types.Left', E814} -> (fun (V6433) -> {'Idris.Prelude.Types.Left', V6433} end(E814)); {'Idris.Prelude.Types.Right', E815} -> (fun (V6434) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V6420, V6434}} end(E815)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E806, E807)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E816} -> (fun (V6435) -> begin (V6436 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6399, V6435))(V6368))), case V6436 of {'Idris.Prelude.Types.Left', E817} -> (fun (V6437) -> {'Idris.Prelude.Types.Left', V6437} end(E817)); {'Idris.Prelude.Types.Right', E818} -> (fun (V6438) -> begin (V6439 = (('un--nfToCFType'(V0, V6363, V2, V6438))(V6368))), case V6439 of {'Idris.Prelude.Types.Left', E819} -> (fun (V6440) -> {'Idris.Prelude.Types.Left', V6440} end(E819)); {'Idris.Prelude.Types.Right', E820} -> (fun (V6441) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V6441}} end(E820)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E818)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E816)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E799)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E797)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E795)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E789, E790, E791, E792, E793)); {'Idris.Core.Value.NType', E821} -> (fun (V6442) -> fun (V6443) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E821)); {'Idris.Core.Value.NErased', E822, E823} -> (fun (V6444, V6445) -> fun (V6446) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E822, E823)); _ -> fun (V6447) -> begin (V6476 = begin (V6475 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6448) -> fun (V6449) -> fun (V6450) -> fun (V6451) -> fun (V6452) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6450, V6451, V6452)) end end end end end, fun (V6453) -> fun (V6454) -> fun (V6455) -> V6454 end end end, fun (V6456) -> fun (V6457) -> fun (V6458) -> fun (V6459) -> fun (V6460) -> begin (V6461 = (V6458(V6460))), begin (V6462 = (V6459(V6460))), (V6461(V6462)) end end end end end end end}, fun (V6463) -> fun (V6464) -> fun (V6465) -> fun (V6466) -> fun (V6467) -> begin (V6468 = (V6465(V6467))), ((V6466(V6468))(V6467)) end end end end end end, fun (V6469) -> fun (V6470) -> fun (V6471) -> begin (V6472 = (V6470(V6471))), (V6472(V6471)) end end end end}, fun (V6473) -> fun (V6474) -> V6474 end end}, V0))(V6447))), {'Idris.Prelude.Types.Right', V6475} end), case V6476 of {'Idris.Prelude.Types.Left', E783} -> (fun (V6477) -> {'Idris.Prelude.Types.Left', V6477} end(E783)); {'Idris.Prelude.Types.Right', E784} -> (fun (V6478) -> begin (V6479 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V6478, {'Idris.Core.Env.Nil'}, V3, V6447))), case V6479 of {'Idris.Prelude.Types.Left', E785} -> (fun (V6480) -> {'Idris.Prelude.Types.Left', V6480} end(E785)); {'Idris.Prelude.Types.Right', E786} -> (fun (V6481) -> begin (V6486 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V6482) -> fun (V6483) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V6482, V6483)) end end, fun (V6484) -> fun (V6485) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V6484, V6485)) end end}, V6481, V6447))), case V6486 of {'Idris.Prelude.Types.Left', E787} -> (fun (V6487) -> {'Idris.Prelude.Types.Left', V6487} end(E787)); {'Idris.Prelude.Types.Right', E788} -> (fun (V6488) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V6488))))}, V6447)) end(E788)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E786)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E784)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E922, E923, E924, E925} -> (fun (V6489, V6490, V6491, V6492) -> fun (V6493) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V6489, <<"Function types not allowed in a foreign struct"/utf8>>}, V6493)) end end(E922, E923, E924, E925)); _ -> case V3 of {'Idris.Core.Value.NTCon', E887, E888, E889, E890, E891} -> (fun (V6494, V6495, V6496, V6497, V6498) -> fun (V6499) -> begin (V6528 = begin (V6527 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6500) -> fun (V6501) -> fun (V6502) -> fun (V6503) -> fun (V6504) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6502, V6503, V6504)) end end end end end, fun (V6505) -> fun (V6506) -> fun (V6507) -> V6506 end end end, fun (V6508) -> fun (V6509) -> fun (V6510) -> fun (V6511) -> fun (V6512) -> begin (V6513 = (V6510(V6512))), begin (V6514 = (V6511(V6512))), (V6513(V6514)) end end end end end end end}, fun (V6515) -> fun (V6516) -> fun (V6517) -> fun (V6518) -> fun (V6519) -> begin (V6520 = (V6517(V6519))), ((V6518(V6520))(V6519)) end end end end end end, fun (V6521) -> fun (V6522) -> fun (V6523) -> begin (V6524 = (V6522(V6523))), (V6524(V6523)) end end end end}, fun (V6525) -> fun (V6526) -> V6526 end end}, V0))(V6499))), {'Idris.Prelude.Types.Right', V6527} end), case V6528 of {'Idris.Prelude.Types.Left', E892} -> (fun (V6529) -> {'Idris.Prelude.Types.Left', V6529} end(E892)); {'Idris.Prelude.Types.Right', E893} -> (fun (V6530) -> begin (V6535 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V6531) -> fun (V6532) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V6531, V6532)) end end, fun (V6533) -> fun (V6534) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V6533, V6534)) end end}, V6495, V6499))), case V6535 of {'Idris.Prelude.Types.Left', E894} -> (fun (V6536) -> {'Idris.Prelude.Types.Left', V6536} end(E894)); {'Idris.Prelude.Types.Right', E895} -> (fun (V6537) -> begin (V6538 = (('un--getNArgs'(V0, V6530, V6537, V6498))(V6499))), case V6538 of {'Idris.Prelude.Types.Left', E896} -> (fun (V6539) -> {'Idris.Prelude.Types.Left', V6539} end(E896)); {'Idris.Prelude.Types.Right', E897} -> (fun (V6540) -> case V6540 of {'Idris.Compiler.CompileExpr.User', E898, E899} -> (fun (V6541, V6542) -> begin (V6544 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6543) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6530, V6543)) end, V6542))(V6499))), case V6544 of {'Idris.Prelude.Types.Left', E900} -> (fun (V6545) -> {'Idris.Prelude.Types.Left', V6545} end(E900)); {'Idris.Prelude.Types.Right', E901} -> (fun (V6546) -> begin (V6548 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6547) -> ('un--nfToCFType'(V0, V6494, V2, V6547)) end, V6546))(V6499))), case V6548 of {'Idris.Prelude.Types.Left', E902} -> (fun (V6549) -> {'Idris.Prelude.Types.Left', V6549} end(E902)); {'Idris.Prelude.Types.Right', E903} -> (fun (V6550) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V6537, V6550}} end(E903)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E901)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E898, E899)); {'Idris.Compiler.CompileExpr.Struct', E904, E905} -> (fun (V6551, V6552) -> begin (V6563 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6553) -> case V6553 of {'Idris.Builtin.MkPair', E906, E907} -> (fun (V6554, V6555) -> fun (V6556) -> begin (V6557 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6530, V6555))(V6556))), case V6557 of {'Idris.Prelude.Types.Left', E908} -> (fun (V6558) -> {'Idris.Prelude.Types.Left', V6558} end(E908)); {'Idris.Prelude.Types.Right', E909} -> (fun (V6559) -> begin (V6560 = (('un--nfToCFType'(V0, V6494, 0, V6559))(V6556))), case V6560 of {'Idris.Prelude.Types.Left', E910} -> (fun (V6561) -> {'Idris.Prelude.Types.Left', V6561} end(E910)); {'Idris.Prelude.Types.Right', E911} -> (fun (V6562) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V6554, V6562}} end(E911)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E909)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E906, E907)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V6552))(V6499))), case V6563 of {'Idris.Prelude.Types.Left', E912} -> (fun (V6564) -> {'Idris.Prelude.Types.Left', V6564} end(E912)); {'Idris.Prelude.Types.Right', E913} -> (fun (V6565) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V6551, V6565}} end(E913)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E904, E905)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E914} -> (fun (V6566) -> begin (V6567 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6530, V6566))(V6499))), case V6567 of {'Idris.Prelude.Types.Left', E915} -> (fun (V6568) -> {'Idris.Prelude.Types.Left', V6568} end(E915)); {'Idris.Prelude.Types.Right', E916} -> (fun (V6569) -> begin (V6570 = (('un--nfToCFType'(V0, V6494, V2, V6569))(V6499))), case V6570 of {'Idris.Prelude.Types.Left', E917} -> (fun (V6571) -> {'Idris.Prelude.Types.Left', V6571} end(E917)); {'Idris.Prelude.Types.Right', E918} -> (fun (V6572) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V6572}} end(E918)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E916)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E914)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E897)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E895)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E893)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E887, E888, E889, E890, E891)); {'Idris.Core.Value.NType', E919} -> (fun (V6573) -> fun (V6574) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E919)); {'Idris.Core.Value.NErased', E920, E921} -> (fun (V6575, V6576) -> fun (V6577) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E920, E921)); _ -> fun (V6578) -> begin (V6607 = begin (V6606 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6579) -> fun (V6580) -> fun (V6581) -> fun (V6582) -> fun (V6583) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6581, V6582, V6583)) end end end end end, fun (V6584) -> fun (V6585) -> fun (V6586) -> V6585 end end end, fun (V6587) -> fun (V6588) -> fun (V6589) -> fun (V6590) -> fun (V6591) -> begin (V6592 = (V6589(V6591))), begin (V6593 = (V6590(V6591))), (V6592(V6593)) end end end end end end end}, fun (V6594) -> fun (V6595) -> fun (V6596) -> fun (V6597) -> fun (V6598) -> begin (V6599 = (V6596(V6598))), ((V6597(V6599))(V6598)) end end end end end end, fun (V6600) -> fun (V6601) -> fun (V6602) -> begin (V6603 = (V6601(V6602))), (V6603(V6602)) end end end end}, fun (V6604) -> fun (V6605) -> V6605 end end}, V0))(V6578))), {'Idris.Prelude.Types.Right', V6606} end), case V6607 of {'Idris.Prelude.Types.Left', E881} -> (fun (V6608) -> {'Idris.Prelude.Types.Left', V6608} end(E881)); {'Idris.Prelude.Types.Right', E882} -> (fun (V6609) -> begin (V6610 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V6609, {'Idris.Core.Env.Nil'}, V3, V6578))), case V6610 of {'Idris.Prelude.Types.Left', E883} -> (fun (V6611) -> {'Idris.Prelude.Types.Left', V6611} end(E883)); {'Idris.Prelude.Types.Right', E884} -> (fun (V6612) -> begin (V6617 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V6613) -> fun (V6614) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V6613, V6614)) end end, fun (V6615) -> fun (V6616) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V6615, V6616)) end end}, V6612, V6578))), case V6617 of {'Idris.Prelude.Types.Left', E885} -> (fun (V6618) -> {'Idris.Prelude.Types.Left', V6618} end(E885)); {'Idris.Prelude.Types.Right', E886} -> (fun (V6619) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V6619))))}, V6578)) end(E886)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E884)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E882)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E748, E749, E750, E751, E752} -> (fun (V6620, V6621, V6622, V6623, V6624) -> fun (V6625) -> begin (V6654 = begin (V6653 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6626) -> fun (V6627) -> fun (V6628) -> fun (V6629) -> fun (V6630) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6628, V6629, V6630)) end end end end end, fun (V6631) -> fun (V6632) -> fun (V6633) -> V6632 end end end, fun (V6634) -> fun (V6635) -> fun (V6636) -> fun (V6637) -> fun (V6638) -> begin (V6639 = (V6636(V6638))), begin (V6640 = (V6637(V6638))), (V6639(V6640)) end end end end end end end}, fun (V6641) -> fun (V6642) -> fun (V6643) -> fun (V6644) -> fun (V6645) -> begin (V6646 = (V6643(V6645))), ((V6644(V6646))(V6645)) end end end end end end, fun (V6647) -> fun (V6648) -> fun (V6649) -> begin (V6650 = (V6648(V6649))), (V6650(V6649)) end end end end}, fun (V6651) -> fun (V6652) -> V6652 end end}, V0))(V6625))), {'Idris.Prelude.Types.Right', V6653} end), case V6654 of {'Idris.Prelude.Types.Left', E753} -> (fun (V6655) -> {'Idris.Prelude.Types.Left', V6655} end(E753)); {'Idris.Prelude.Types.Right', E754} -> (fun (V6656) -> begin (V6661 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V6657) -> fun (V6658) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V6657, V6658)) end end, fun (V6659) -> fun (V6660) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V6659, V6660)) end end}, V6621, V6625))), case V6661 of {'Idris.Prelude.Types.Left', E755} -> (fun (V6662) -> {'Idris.Prelude.Types.Left', V6662} end(E755)); {'Idris.Prelude.Types.Right', E756} -> (fun (V6663) -> begin (V6664 = (('un--getNArgs'(V0, V6656, V6663, V6624))(V6625))), case V6664 of {'Idris.Prelude.Types.Left', E757} -> (fun (V6665) -> {'Idris.Prelude.Types.Left', V6665} end(E757)); {'Idris.Prelude.Types.Right', E758} -> (fun (V6666) -> case V6666 of {'Idris.Compiler.CompileExpr.User', E759, E760} -> (fun (V6667, V6668) -> begin (V6670 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6669) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6656, V6669)) end, V6668))(V6625))), case V6670 of {'Idris.Prelude.Types.Left', E761} -> (fun (V6671) -> {'Idris.Prelude.Types.Left', V6671} end(E761)); {'Idris.Prelude.Types.Right', E762} -> (fun (V6672) -> begin (V6674 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6673) -> ('un--nfToCFType'(V0, V6620, V2, V6673)) end, V6672))(V6625))), case V6674 of {'Idris.Prelude.Types.Left', E763} -> (fun (V6675) -> {'Idris.Prelude.Types.Left', V6675} end(E763)); {'Idris.Prelude.Types.Right', E764} -> (fun (V6676) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V6663, V6676}} end(E764)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E762)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E759, E760)); {'Idris.Compiler.CompileExpr.Struct', E765, E766} -> (fun (V6677, V6678) -> begin (V6689 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6679) -> case V6679 of {'Idris.Builtin.MkPair', E767, E768} -> (fun (V6680, V6681) -> fun (V6682) -> begin (V6683 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6656, V6681))(V6682))), case V6683 of {'Idris.Prelude.Types.Left', E769} -> (fun (V6684) -> {'Idris.Prelude.Types.Left', V6684} end(E769)); {'Idris.Prelude.Types.Right', E770} -> (fun (V6685) -> begin (V6686 = (('un--nfToCFType'(V0, V6620, 0, V6685))(V6682))), case V6686 of {'Idris.Prelude.Types.Left', E771} -> (fun (V6687) -> {'Idris.Prelude.Types.Left', V6687} end(E771)); {'Idris.Prelude.Types.Right', E772} -> (fun (V6688) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V6680, V6688}} end(E772)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E770)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E767, E768)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V6678))(V6625))), case V6689 of {'Idris.Prelude.Types.Left', E773} -> (fun (V6690) -> {'Idris.Prelude.Types.Left', V6690} end(E773)); {'Idris.Prelude.Types.Right', E774} -> (fun (V6691) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V6677, V6691}} end(E774)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E765, E766)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E775} -> (fun (V6692) -> begin (V6693 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6656, V6692))(V6625))), case V6693 of {'Idris.Prelude.Types.Left', E776} -> (fun (V6694) -> {'Idris.Prelude.Types.Left', V6694} end(E776)); {'Idris.Prelude.Types.Right', E777} -> (fun (V6695) -> begin (V6696 = (('un--nfToCFType'(V0, V6620, V2, V6695))(V6625))), case V6696 of {'Idris.Prelude.Types.Left', E778} -> (fun (V6697) -> {'Idris.Prelude.Types.Left', V6697} end(E778)); {'Idris.Prelude.Types.Right', E779} -> (fun (V6698) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V6698}} end(E779)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E777)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E775)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E758)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E756)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E754)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E748, E749, E750, E751, E752)); {'Idris.Core.Value.NType', E780} -> (fun (V6699) -> fun (V6700) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E780)); {'Idris.Core.Value.NErased', E781, E782} -> (fun (V6701, V6702) -> fun (V6703) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E781, E782)); _ -> fun (V6704) -> begin (V6733 = begin (V6732 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6705) -> fun (V6706) -> fun (V6707) -> fun (V6708) -> fun (V6709) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6707, V6708, V6709)) end end end end end, fun (V6710) -> fun (V6711) -> fun (V6712) -> V6711 end end end, fun (V6713) -> fun (V6714) -> fun (V6715) -> fun (V6716) -> fun (V6717) -> begin (V6718 = (V6715(V6717))), begin (V6719 = (V6716(V6717))), (V6718(V6719)) end end end end end end end}, fun (V6720) -> fun (V6721) -> fun (V6722) -> fun (V6723) -> fun (V6724) -> begin (V6725 = (V6722(V6724))), ((V6723(V6725))(V6724)) end end end end end end, fun (V6726) -> fun (V6727) -> fun (V6728) -> begin (V6729 = (V6727(V6728))), (V6729(V6728)) end end end end}, fun (V6730) -> fun (V6731) -> V6731 end end}, V0))(V6704))), {'Idris.Prelude.Types.Right', V6732} end), case V6733 of {'Idris.Prelude.Types.Left', E742} -> (fun (V6734) -> {'Idris.Prelude.Types.Left', V6734} end(E742)); {'Idris.Prelude.Types.Right', E743} -> (fun (V6735) -> begin (V6736 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V6735, {'Idris.Core.Env.Nil'}, V3, V6704))), case V6736 of {'Idris.Prelude.Types.Left', E744} -> (fun (V6737) -> {'Idris.Prelude.Types.Left', V6737} end(E744)); {'Idris.Prelude.Types.Right', E745} -> (fun (V6738) -> begin (V6743 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V6739) -> fun (V6740) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V6739, V6740)) end end, fun (V6741) -> fun (V6742) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V6741, V6742)) end end}, V6738, V6704))), case V6743 of {'Idris.Prelude.Types.Left', E746} -> (fun (V6744) -> {'Idris.Prelude.Types.Left', V6744} end(E746)); {'Idris.Prelude.Types.Right', E747} -> (fun (V6745) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V6745))))}, V6704)) end(E747)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E745)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E743)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end end(E740, E741)); _ -> case V3 of {'Idris.Core.Value.NPrimVal', E554, E555} -> (fun (V6746, V6747) -> case V6747 of {'Idris.Core.TT.DoubleType'} -> (fun () -> fun (V6748) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFDouble'}} end end()); {'Idris.Core.TT.CharType'} -> (fun () -> fun (V6749) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFChar'}} end end()); {'Idris.Core.TT.WorldType'} -> (fun () -> fun (V6750) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFWorld'}} end end()); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E638, E639, E640, E641} -> (fun (V6751, V6752, V6753, V6754) -> case V6753 of {'Idris.Core.TT.Pi', E683, E684, E685, E686} -> (fun (V6755, V6756, V6757, V6758) -> fun (V6759) -> begin (V6788 = begin (V6787 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6760) -> fun (V6761) -> fun (V6762) -> fun (V6763) -> fun (V6764) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6762, V6763, V6764)) end end end end end, fun (V6765) -> fun (V6766) -> fun (V6767) -> V6766 end end end, fun (V6768) -> fun (V6769) -> fun (V6770) -> fun (V6771) -> fun (V6772) -> begin (V6773 = (V6770(V6772))), begin (V6774 = (V6771(V6772))), (V6773(V6774)) end end end end end end end}, fun (V6775) -> fun (V6776) -> fun (V6777) -> fun (V6778) -> fun (V6779) -> begin (V6780 = (V6777(V6779))), ((V6778(V6780))(V6779)) end end end end end end, fun (V6781) -> fun (V6782) -> fun (V6783) -> begin (V6784 = (V6782(V6783))), (V6784(V6783)) end end end end}, fun (V6785) -> fun (V6786) -> V6786 end end}, V0))(V6759))), {'Idris.Prelude.Types.Right', V6787} end), case V6788 of {'Idris.Prelude.Types.Left', E687} -> (fun (V6789) -> {'Idris.Prelude.Types.Left', V6789} end(E687)); {'Idris.Prelude.Types.Right', E688} -> (fun (V6790) -> begin (V6791 = (('un--nfToCFType'(V0, V6751, 1, V6758))(V6759))), case V6791 of {'Idris.Prelude.Types.Left', E689} -> (fun (V6792) -> {'Idris.Prelude.Types.Left', V6792} end(E689)); {'Idris.Prelude.Types.Right', E690} -> (fun (V6793) -> begin (V6794 = (((V6754(V6790))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V6751, 1}))))(V6759))), case V6794 of {'Idris.Prelude.Types.Left', E691} -> (fun (V6795) -> {'Idris.Prelude.Types.Left', V6795} end(E691)); {'Idris.Prelude.Types.Right', E692} -> (fun (V6796) -> begin (V6797 = (('un--nfToCFType'(V0, V6751, 1, V6796))(V6759))), case V6797 of {'Idris.Prelude.Types.Left', E693} -> (fun (V6798) -> {'Idris.Prelude.Types.Left', V6798} end(E693)); {'Idris.Prelude.Types.Right', E694} -> (fun (V6799) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V6793, V6799}} end(E694)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E692)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E690)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E688)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E683, E684, E685, E686)); _ -> case V3 of {'Idris.Core.Value.NTCon', E648, E649, E650, E651, E652} -> (fun (V6800, V6801, V6802, V6803, V6804) -> fun (V6805) -> begin (V6834 = begin (V6833 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6806) -> fun (V6807) -> fun (V6808) -> fun (V6809) -> fun (V6810) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6808, V6809, V6810)) end end end end end, fun (V6811) -> fun (V6812) -> fun (V6813) -> V6812 end end end, fun (V6814) -> fun (V6815) -> fun (V6816) -> fun (V6817) -> fun (V6818) -> begin (V6819 = (V6816(V6818))), begin (V6820 = (V6817(V6818))), (V6819(V6820)) end end end end end end end}, fun (V6821) -> fun (V6822) -> fun (V6823) -> fun (V6824) -> fun (V6825) -> begin (V6826 = (V6823(V6825))), ((V6824(V6826))(V6825)) end end end end end end, fun (V6827) -> fun (V6828) -> fun (V6829) -> begin (V6830 = (V6828(V6829))), (V6830(V6829)) end end end end}, fun (V6831) -> fun (V6832) -> V6832 end end}, V0))(V6805))), {'Idris.Prelude.Types.Right', V6833} end), case V6834 of {'Idris.Prelude.Types.Left', E653} -> (fun (V6835) -> {'Idris.Prelude.Types.Left', V6835} end(E653)); {'Idris.Prelude.Types.Right', E654} -> (fun (V6836) -> begin (V6841 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V6837) -> fun (V6838) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V6837, V6838)) end end, fun (V6839) -> fun (V6840) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V6839, V6840)) end end}, V6801, V6805))), case V6841 of {'Idris.Prelude.Types.Left', E655} -> (fun (V6842) -> {'Idris.Prelude.Types.Left', V6842} end(E655)); {'Idris.Prelude.Types.Right', E656} -> (fun (V6843) -> begin (V6844 = (('un--getNArgs'(V0, V6836, V6843, V6804))(V6805))), case V6844 of {'Idris.Prelude.Types.Left', E657} -> (fun (V6845) -> {'Idris.Prelude.Types.Left', V6845} end(E657)); {'Idris.Prelude.Types.Right', E658} -> (fun (V6846) -> case V6846 of {'Idris.Compiler.CompileExpr.User', E659, E660} -> (fun (V6847, V6848) -> begin (V6850 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6849) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6836, V6849)) end, V6848))(V6805))), case V6850 of {'Idris.Prelude.Types.Left', E661} -> (fun (V6851) -> {'Idris.Prelude.Types.Left', V6851} end(E661)); {'Idris.Prelude.Types.Right', E662} -> (fun (V6852) -> begin (V6854 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6853) -> ('un--nfToCFType'(V0, V6800, V2, V6853)) end, V6852))(V6805))), case V6854 of {'Idris.Prelude.Types.Left', E663} -> (fun (V6855) -> {'Idris.Prelude.Types.Left', V6855} end(E663)); {'Idris.Prelude.Types.Right', E664} -> (fun (V6856) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V6843, V6856}} end(E664)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E662)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E659, E660)); {'Idris.Compiler.CompileExpr.Struct', E665, E666} -> (fun (V6857, V6858) -> begin (V6869 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6859) -> case V6859 of {'Idris.Builtin.MkPair', E667, E668} -> (fun (V6860, V6861) -> fun (V6862) -> begin (V6863 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6836, V6861))(V6862))), case V6863 of {'Idris.Prelude.Types.Left', E669} -> (fun (V6864) -> {'Idris.Prelude.Types.Left', V6864} end(E669)); {'Idris.Prelude.Types.Right', E670} -> (fun (V6865) -> begin (V6866 = (('un--nfToCFType'(V0, V6800, 0, V6865))(V6862))), case V6866 of {'Idris.Prelude.Types.Left', E671} -> (fun (V6867) -> {'Idris.Prelude.Types.Left', V6867} end(E671)); {'Idris.Prelude.Types.Right', E672} -> (fun (V6868) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V6860, V6868}} end(E672)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E670)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E667, E668)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V6858))(V6805))), case V6869 of {'Idris.Prelude.Types.Left', E673} -> (fun (V6870) -> {'Idris.Prelude.Types.Left', V6870} end(E673)); {'Idris.Prelude.Types.Right', E674} -> (fun (V6871) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V6857, V6871}} end(E674)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E665, E666)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E675} -> (fun (V6872) -> begin (V6873 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6836, V6872))(V6805))), case V6873 of {'Idris.Prelude.Types.Left', E676} -> (fun (V6874) -> {'Idris.Prelude.Types.Left', V6874} end(E676)); {'Idris.Prelude.Types.Right', E677} -> (fun (V6875) -> begin (V6876 = (('un--nfToCFType'(V0, V6800, V2, V6875))(V6805))), case V6876 of {'Idris.Prelude.Types.Left', E678} -> (fun (V6877) -> {'Idris.Prelude.Types.Left', V6877} end(E678)); {'Idris.Prelude.Types.Right', E679} -> (fun (V6878) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V6878}} end(E679)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E677)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E675)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E658)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E656)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E654)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E648, E649, E650, E651, E652)); {'Idris.Core.Value.NType', E680} -> (fun (V6879) -> fun (V6880) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E680)); {'Idris.Core.Value.NErased', E681, E682} -> (fun (V6881, V6882) -> fun (V6883) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E681, E682)); _ -> fun (V6884) -> begin (V6913 = begin (V6912 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6885) -> fun (V6886) -> fun (V6887) -> fun (V6888) -> fun (V6889) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6887, V6888, V6889)) end end end end end, fun (V6890) -> fun (V6891) -> fun (V6892) -> V6891 end end end, fun (V6893) -> fun (V6894) -> fun (V6895) -> fun (V6896) -> fun (V6897) -> begin (V6898 = (V6895(V6897))), begin (V6899 = (V6896(V6897))), (V6898(V6899)) end end end end end end end}, fun (V6900) -> fun (V6901) -> fun (V6902) -> fun (V6903) -> fun (V6904) -> begin (V6905 = (V6902(V6904))), ((V6903(V6905))(V6904)) end end end end end end, fun (V6906) -> fun (V6907) -> fun (V6908) -> begin (V6909 = (V6907(V6908))), (V6909(V6908)) end end end end}, fun (V6910) -> fun (V6911) -> V6911 end end}, V0))(V6884))), {'Idris.Prelude.Types.Right', V6912} end), case V6913 of {'Idris.Prelude.Types.Left', E642} -> (fun (V6914) -> {'Idris.Prelude.Types.Left', V6914} end(E642)); {'Idris.Prelude.Types.Right', E643} -> (fun (V6915) -> begin (V6916 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V6915, {'Idris.Core.Env.Nil'}, V3, V6884))), case V6916 of {'Idris.Prelude.Types.Left', E644} -> (fun (V6917) -> {'Idris.Prelude.Types.Left', V6917} end(E644)); {'Idris.Prelude.Types.Right', E645} -> (fun (V6918) -> begin (V6923 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V6919) -> fun (V6920) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V6919, V6920)) end end, fun (V6921) -> fun (V6922) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V6921, V6922)) end end}, V6918, V6884))), case V6923 of {'Idris.Prelude.Types.Left', E646} -> (fun (V6924) -> {'Idris.Prelude.Types.Left', V6924} end(E646)); {'Idris.Prelude.Types.Right', E647} -> (fun (V6925) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V6925))))}, V6884)) end(E647)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E645)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E643)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E638, E639, E640, E641)); _ -> case V3 of {'Idris.Core.Value.NTCon', E603, E604, E605, E606, E607} -> (fun (V6926, V6927, V6928, V6929, V6930) -> fun (V6931) -> begin (V6960 = begin (V6959 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6932) -> fun (V6933) -> fun (V6934) -> fun (V6935) -> fun (V6936) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V6934, V6935, V6936)) end end end end end, fun (V6937) -> fun (V6938) -> fun (V6939) -> V6938 end end end, fun (V6940) -> fun (V6941) -> fun (V6942) -> fun (V6943) -> fun (V6944) -> begin (V6945 = (V6942(V6944))), begin (V6946 = (V6943(V6944))), (V6945(V6946)) end end end end end end end}, fun (V6947) -> fun (V6948) -> fun (V6949) -> fun (V6950) -> fun (V6951) -> begin (V6952 = (V6949(V6951))), ((V6950(V6952))(V6951)) end end end end end end, fun (V6953) -> fun (V6954) -> fun (V6955) -> begin (V6956 = (V6954(V6955))), (V6956(V6955)) end end end end}, fun (V6957) -> fun (V6958) -> V6958 end end}, V0))(V6931))), {'Idris.Prelude.Types.Right', V6959} end), case V6960 of {'Idris.Prelude.Types.Left', E608} -> (fun (V6961) -> {'Idris.Prelude.Types.Left', V6961} end(E608)); {'Idris.Prelude.Types.Right', E609} -> (fun (V6962) -> begin (V6967 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V6963) -> fun (V6964) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V6963, V6964)) end end, fun (V6965) -> fun (V6966) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V6965, V6966)) end end}, V6927, V6931))), case V6967 of {'Idris.Prelude.Types.Left', E610} -> (fun (V6968) -> {'Idris.Prelude.Types.Left', V6968} end(E610)); {'Idris.Prelude.Types.Right', E611} -> (fun (V6969) -> begin (V6970 = (('un--getNArgs'(V0, V6962, V6969, V6930))(V6931))), case V6970 of {'Idris.Prelude.Types.Left', E612} -> (fun (V6971) -> {'Idris.Prelude.Types.Left', V6971} end(E612)); {'Idris.Prelude.Types.Right', E613} -> (fun (V6972) -> case V6972 of {'Idris.Compiler.CompileExpr.User', E614, E615} -> (fun (V6973, V6974) -> begin (V6976 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6975) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6962, V6975)) end, V6974))(V6931))), case V6976 of {'Idris.Prelude.Types.Left', E616} -> (fun (V6977) -> {'Idris.Prelude.Types.Left', V6977} end(E616)); {'Idris.Prelude.Types.Right', E617} -> (fun (V6978) -> begin (V6980 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6979) -> ('un--nfToCFType'(V0, V6926, V2, V6979)) end, V6978))(V6931))), case V6980 of {'Idris.Prelude.Types.Left', E618} -> (fun (V6981) -> {'Idris.Prelude.Types.Left', V6981} end(E618)); {'Idris.Prelude.Types.Right', E619} -> (fun (V6982) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V6969, V6982}} end(E619)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E617)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E614, E615)); {'Idris.Compiler.CompileExpr.Struct', E620, E621} -> (fun (V6983, V6984) -> begin (V6995 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V6985) -> case V6985 of {'Idris.Builtin.MkPair', E622, E623} -> (fun (V6986, V6987) -> fun (V6988) -> begin (V6989 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6962, V6987))(V6988))), case V6989 of {'Idris.Prelude.Types.Left', E624} -> (fun (V6990) -> {'Idris.Prelude.Types.Left', V6990} end(E624)); {'Idris.Prelude.Types.Right', E625} -> (fun (V6991) -> begin (V6992 = (('un--nfToCFType'(V0, V6926, 0, V6991))(V6988))), case V6992 of {'Idris.Prelude.Types.Left', E626} -> (fun (V6993) -> {'Idris.Prelude.Types.Left', V6993} end(E626)); {'Idris.Prelude.Types.Right', E627} -> (fun (V6994) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V6986, V6994}} end(E627)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E625)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E622, E623)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V6984))(V6931))), case V6995 of {'Idris.Prelude.Types.Left', E628} -> (fun (V6996) -> {'Idris.Prelude.Types.Left', V6996} end(E628)); {'Idris.Prelude.Types.Right', E629} -> (fun (V6997) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V6983, V6997}} end(E629)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E620, E621)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E630} -> (fun (V6998) -> begin (V6999 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V6962, V6998))(V6931))), case V6999 of {'Idris.Prelude.Types.Left', E631} -> (fun (V7000) -> {'Idris.Prelude.Types.Left', V7000} end(E631)); {'Idris.Prelude.Types.Right', E632} -> (fun (V7001) -> begin (V7002 = (('un--nfToCFType'(V0, V6926, V2, V7001))(V6931))), case V7002 of {'Idris.Prelude.Types.Left', E633} -> (fun (V7003) -> {'Idris.Prelude.Types.Left', V7003} end(E633)); {'Idris.Prelude.Types.Right', E634} -> (fun (V7004) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V7004}} end(E634)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E632)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E630)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E613)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E611)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E609)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E603, E604, E605, E606, E607)); {'Idris.Core.Value.NType', E635} -> (fun (V7005) -> fun (V7006) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E635)); {'Idris.Core.Value.NErased', E636, E637} -> (fun (V7007, V7008) -> fun (V7009) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E636, E637)); _ -> fun (V7010) -> begin (V7039 = begin (V7038 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7011) -> fun (V7012) -> fun (V7013) -> fun (V7014) -> fun (V7015) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7013, V7014, V7015)) end end end end end, fun (V7016) -> fun (V7017) -> fun (V7018) -> V7017 end end end, fun (V7019) -> fun (V7020) -> fun (V7021) -> fun (V7022) -> fun (V7023) -> begin (V7024 = (V7021(V7023))), begin (V7025 = (V7022(V7023))), (V7024(V7025)) end end end end end end end}, fun (V7026) -> fun (V7027) -> fun (V7028) -> fun (V7029) -> fun (V7030) -> begin (V7031 = (V7028(V7030))), ((V7029(V7031))(V7030)) end end end end end end, fun (V7032) -> fun (V7033) -> fun (V7034) -> begin (V7035 = (V7033(V7034))), (V7035(V7034)) end end end end}, fun (V7036) -> fun (V7037) -> V7037 end end}, V0))(V7010))), {'Idris.Prelude.Types.Right', V7038} end), case V7039 of {'Idris.Prelude.Types.Left', E597} -> (fun (V7040) -> {'Idris.Prelude.Types.Left', V7040} end(E597)); {'Idris.Prelude.Types.Right', E598} -> (fun (V7041) -> begin (V7042 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V7041, {'Idris.Core.Env.Nil'}, V3, V7010))), case V7042 of {'Idris.Prelude.Types.Left', E599} -> (fun (V7043) -> {'Idris.Prelude.Types.Left', V7043} end(E599)); {'Idris.Prelude.Types.Right', E600} -> (fun (V7044) -> begin (V7049 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V7045) -> fun (V7046) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V7045, V7046)) end end, fun (V7047) -> fun (V7048) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V7047, V7048)) end end}, V7044, V7010))), case V7049 of {'Idris.Prelude.Types.Left', E601} -> (fun (V7050) -> {'Idris.Prelude.Types.Left', V7050} end(E601)); {'Idris.Prelude.Types.Right', E602} -> (fun (V7051) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V7051))))}, V7010)) end(E602)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E600)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E598)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E736, E737, E738, E739} -> (fun (V7052, V7053, V7054, V7055) -> fun (V7056) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V7052, <<"Function types not allowed in a foreign struct"/utf8>>}, V7056)) end end(E736, E737, E738, E739)); _ -> case V3 of {'Idris.Core.Value.NTCon', E701, E702, E703, E704, E705} -> (fun (V7057, V7058, V7059, V7060, V7061) -> fun (V7062) -> begin (V7091 = begin (V7090 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7063) -> fun (V7064) -> fun (V7065) -> fun (V7066) -> fun (V7067) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7065, V7066, V7067)) end end end end end, fun (V7068) -> fun (V7069) -> fun (V7070) -> V7069 end end end, fun (V7071) -> fun (V7072) -> fun (V7073) -> fun (V7074) -> fun (V7075) -> begin (V7076 = (V7073(V7075))), begin (V7077 = (V7074(V7075))), (V7076(V7077)) end end end end end end end}, fun (V7078) -> fun (V7079) -> fun (V7080) -> fun (V7081) -> fun (V7082) -> begin (V7083 = (V7080(V7082))), ((V7081(V7083))(V7082)) end end end end end end, fun (V7084) -> fun (V7085) -> fun (V7086) -> begin (V7087 = (V7085(V7086))), (V7087(V7086)) end end end end}, fun (V7088) -> fun (V7089) -> V7089 end end}, V0))(V7062))), {'Idris.Prelude.Types.Right', V7090} end), case V7091 of {'Idris.Prelude.Types.Left', E706} -> (fun (V7092) -> {'Idris.Prelude.Types.Left', V7092} end(E706)); {'Idris.Prelude.Types.Right', E707} -> (fun (V7093) -> begin (V7098 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V7094) -> fun (V7095) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V7094, V7095)) end end, fun (V7096) -> fun (V7097) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V7096, V7097)) end end}, V7058, V7062))), case V7098 of {'Idris.Prelude.Types.Left', E708} -> (fun (V7099) -> {'Idris.Prelude.Types.Left', V7099} end(E708)); {'Idris.Prelude.Types.Right', E709} -> (fun (V7100) -> begin (V7101 = (('un--getNArgs'(V0, V7093, V7100, V7061))(V7062))), case V7101 of {'Idris.Prelude.Types.Left', E710} -> (fun (V7102) -> {'Idris.Prelude.Types.Left', V7102} end(E710)); {'Idris.Prelude.Types.Right', E711} -> (fun (V7103) -> case V7103 of {'Idris.Compiler.CompileExpr.User', E712, E713} -> (fun (V7104, V7105) -> begin (V7107 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7106) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7093, V7106)) end, V7105))(V7062))), case V7107 of {'Idris.Prelude.Types.Left', E714} -> (fun (V7108) -> {'Idris.Prelude.Types.Left', V7108} end(E714)); {'Idris.Prelude.Types.Right', E715} -> (fun (V7109) -> begin (V7111 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7110) -> ('un--nfToCFType'(V0, V7057, V2, V7110)) end, V7109))(V7062))), case V7111 of {'Idris.Prelude.Types.Left', E716} -> (fun (V7112) -> {'Idris.Prelude.Types.Left', V7112} end(E716)); {'Idris.Prelude.Types.Right', E717} -> (fun (V7113) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V7100, V7113}} end(E717)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E715)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E712, E713)); {'Idris.Compiler.CompileExpr.Struct', E718, E719} -> (fun (V7114, V7115) -> begin (V7126 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7116) -> case V7116 of {'Idris.Builtin.MkPair', E720, E721} -> (fun (V7117, V7118) -> fun (V7119) -> begin (V7120 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7093, V7118))(V7119))), case V7120 of {'Idris.Prelude.Types.Left', E722} -> (fun (V7121) -> {'Idris.Prelude.Types.Left', V7121} end(E722)); {'Idris.Prelude.Types.Right', E723} -> (fun (V7122) -> begin (V7123 = (('un--nfToCFType'(V0, V7057, 0, V7122))(V7119))), case V7123 of {'Idris.Prelude.Types.Left', E724} -> (fun (V7124) -> {'Idris.Prelude.Types.Left', V7124} end(E724)); {'Idris.Prelude.Types.Right', E725} -> (fun (V7125) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V7117, V7125}} end(E725)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E723)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E720, E721)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V7115))(V7062))), case V7126 of {'Idris.Prelude.Types.Left', E726} -> (fun (V7127) -> {'Idris.Prelude.Types.Left', V7127} end(E726)); {'Idris.Prelude.Types.Right', E727} -> (fun (V7128) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V7114, V7128}} end(E727)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E718, E719)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E728} -> (fun (V7129) -> begin (V7130 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7093, V7129))(V7062))), case V7130 of {'Idris.Prelude.Types.Left', E729} -> (fun (V7131) -> {'Idris.Prelude.Types.Left', V7131} end(E729)); {'Idris.Prelude.Types.Right', E730} -> (fun (V7132) -> begin (V7133 = (('un--nfToCFType'(V0, V7057, V2, V7132))(V7062))), case V7133 of {'Idris.Prelude.Types.Left', E731} -> (fun (V7134) -> {'Idris.Prelude.Types.Left', V7134} end(E731)); {'Idris.Prelude.Types.Right', E732} -> (fun (V7135) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V7135}} end(E732)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E730)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E728)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E711)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E709)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E707)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E701, E702, E703, E704, E705)); {'Idris.Core.Value.NType', E733} -> (fun (V7136) -> fun (V7137) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E733)); {'Idris.Core.Value.NErased', E734, E735} -> (fun (V7138, V7139) -> fun (V7140) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E734, E735)); _ -> fun (V7141) -> begin (V7170 = begin (V7169 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7142) -> fun (V7143) -> fun (V7144) -> fun (V7145) -> fun (V7146) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7144, V7145, V7146)) end end end end end, fun (V7147) -> fun (V7148) -> fun (V7149) -> V7148 end end end, fun (V7150) -> fun (V7151) -> fun (V7152) -> fun (V7153) -> fun (V7154) -> begin (V7155 = (V7152(V7154))), begin (V7156 = (V7153(V7154))), (V7155(V7156)) end end end end end end end}, fun (V7157) -> fun (V7158) -> fun (V7159) -> fun (V7160) -> fun (V7161) -> begin (V7162 = (V7159(V7161))), ((V7160(V7162))(V7161)) end end end end end end, fun (V7163) -> fun (V7164) -> fun (V7165) -> begin (V7166 = (V7164(V7165))), (V7166(V7165)) end end end end}, fun (V7167) -> fun (V7168) -> V7168 end end}, V0))(V7141))), {'Idris.Prelude.Types.Right', V7169} end), case V7170 of {'Idris.Prelude.Types.Left', E695} -> (fun (V7171) -> {'Idris.Prelude.Types.Left', V7171} end(E695)); {'Idris.Prelude.Types.Right', E696} -> (fun (V7172) -> begin (V7173 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V7172, {'Idris.Core.Env.Nil'}, V3, V7141))), case V7173 of {'Idris.Prelude.Types.Left', E697} -> (fun (V7174) -> {'Idris.Prelude.Types.Left', V7174} end(E697)); {'Idris.Prelude.Types.Right', E698} -> (fun (V7175) -> begin (V7180 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V7176) -> fun (V7177) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V7176, V7177)) end end, fun (V7178) -> fun (V7179) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V7178, V7179)) end end}, V7175, V7141))), case V7180 of {'Idris.Prelude.Types.Left', E699} -> (fun (V7181) -> {'Idris.Prelude.Types.Left', V7181} end(E699)); {'Idris.Prelude.Types.Right', E700} -> (fun (V7182) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V7182))))}, V7141)) end(E700)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E698)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E696)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E562, E563, E564, E565, E566} -> (fun (V7183, V7184, V7185, V7186, V7187) -> fun (V7188) -> begin (V7217 = begin (V7216 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7189) -> fun (V7190) -> fun (V7191) -> fun (V7192) -> fun (V7193) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7191, V7192, V7193)) end end end end end, fun (V7194) -> fun (V7195) -> fun (V7196) -> V7195 end end end, fun (V7197) -> fun (V7198) -> fun (V7199) -> fun (V7200) -> fun (V7201) -> begin (V7202 = (V7199(V7201))), begin (V7203 = (V7200(V7201))), (V7202(V7203)) end end end end end end end}, fun (V7204) -> fun (V7205) -> fun (V7206) -> fun (V7207) -> fun (V7208) -> begin (V7209 = (V7206(V7208))), ((V7207(V7209))(V7208)) end end end end end end, fun (V7210) -> fun (V7211) -> fun (V7212) -> begin (V7213 = (V7211(V7212))), (V7213(V7212)) end end end end}, fun (V7214) -> fun (V7215) -> V7215 end end}, V0))(V7188))), {'Idris.Prelude.Types.Right', V7216} end), case V7217 of {'Idris.Prelude.Types.Left', E567} -> (fun (V7218) -> {'Idris.Prelude.Types.Left', V7218} end(E567)); {'Idris.Prelude.Types.Right', E568} -> (fun (V7219) -> begin (V7224 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V7220) -> fun (V7221) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V7220, V7221)) end end, fun (V7222) -> fun (V7223) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V7222, V7223)) end end}, V7184, V7188))), case V7224 of {'Idris.Prelude.Types.Left', E569} -> (fun (V7225) -> {'Idris.Prelude.Types.Left', V7225} end(E569)); {'Idris.Prelude.Types.Right', E570} -> (fun (V7226) -> begin (V7227 = (('un--getNArgs'(V0, V7219, V7226, V7187))(V7188))), case V7227 of {'Idris.Prelude.Types.Left', E571} -> (fun (V7228) -> {'Idris.Prelude.Types.Left', V7228} end(E571)); {'Idris.Prelude.Types.Right', E572} -> (fun (V7229) -> case V7229 of {'Idris.Compiler.CompileExpr.User', E573, E574} -> (fun (V7230, V7231) -> begin (V7233 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7232) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7219, V7232)) end, V7231))(V7188))), case V7233 of {'Idris.Prelude.Types.Left', E575} -> (fun (V7234) -> {'Idris.Prelude.Types.Left', V7234} end(E575)); {'Idris.Prelude.Types.Right', E576} -> (fun (V7235) -> begin (V7237 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7236) -> ('un--nfToCFType'(V0, V7183, V2, V7236)) end, V7235))(V7188))), case V7237 of {'Idris.Prelude.Types.Left', E577} -> (fun (V7238) -> {'Idris.Prelude.Types.Left', V7238} end(E577)); {'Idris.Prelude.Types.Right', E578} -> (fun (V7239) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V7226, V7239}} end(E578)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E576)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E573, E574)); {'Idris.Compiler.CompileExpr.Struct', E579, E580} -> (fun (V7240, V7241) -> begin (V7252 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7242) -> case V7242 of {'Idris.Builtin.MkPair', E581, E582} -> (fun (V7243, V7244) -> fun (V7245) -> begin (V7246 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7219, V7244))(V7245))), case V7246 of {'Idris.Prelude.Types.Left', E583} -> (fun (V7247) -> {'Idris.Prelude.Types.Left', V7247} end(E583)); {'Idris.Prelude.Types.Right', E584} -> (fun (V7248) -> begin (V7249 = (('un--nfToCFType'(V0, V7183, 0, V7248))(V7245))), case V7249 of {'Idris.Prelude.Types.Left', E585} -> (fun (V7250) -> {'Idris.Prelude.Types.Left', V7250} end(E585)); {'Idris.Prelude.Types.Right', E586} -> (fun (V7251) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V7243, V7251}} end(E586)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E584)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E581, E582)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V7241))(V7188))), case V7252 of {'Idris.Prelude.Types.Left', E587} -> (fun (V7253) -> {'Idris.Prelude.Types.Left', V7253} end(E587)); {'Idris.Prelude.Types.Right', E588} -> (fun (V7254) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V7240, V7254}} end(E588)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E579, E580)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E589} -> (fun (V7255) -> begin (V7256 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7219, V7255))(V7188))), case V7256 of {'Idris.Prelude.Types.Left', E590} -> (fun (V7257) -> {'Idris.Prelude.Types.Left', V7257} end(E590)); {'Idris.Prelude.Types.Right', E591} -> (fun (V7258) -> begin (V7259 = (('un--nfToCFType'(V0, V7183, V2, V7258))(V7188))), case V7259 of {'Idris.Prelude.Types.Left', E592} -> (fun (V7260) -> {'Idris.Prelude.Types.Left', V7260} end(E592)); {'Idris.Prelude.Types.Right', E593} -> (fun (V7261) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V7261}} end(E593)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E591)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E589)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E572)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E570)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E568)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E562, E563, E564, E565, E566)); {'Idris.Core.Value.NType', E594} -> (fun (V7262) -> fun (V7263) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E594)); {'Idris.Core.Value.NErased', E595, E596} -> (fun (V7264, V7265) -> fun (V7266) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E595, E596)); _ -> fun (V7267) -> begin (V7296 = begin (V7295 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7268) -> fun (V7269) -> fun (V7270) -> fun (V7271) -> fun (V7272) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7270, V7271, V7272)) end end end end end, fun (V7273) -> fun (V7274) -> fun (V7275) -> V7274 end end end, fun (V7276) -> fun (V7277) -> fun (V7278) -> fun (V7279) -> fun (V7280) -> begin (V7281 = (V7278(V7280))), begin (V7282 = (V7279(V7280))), (V7281(V7282)) end end end end end end end}, fun (V7283) -> fun (V7284) -> fun (V7285) -> fun (V7286) -> fun (V7287) -> begin (V7288 = (V7285(V7287))), ((V7286(V7288))(V7287)) end end end end end end, fun (V7289) -> fun (V7290) -> fun (V7291) -> begin (V7292 = (V7290(V7291))), (V7292(V7291)) end end end end}, fun (V7293) -> fun (V7294) -> V7294 end end}, V0))(V7267))), {'Idris.Prelude.Types.Right', V7295} end), case V7296 of {'Idris.Prelude.Types.Left', E556} -> (fun (V7297) -> {'Idris.Prelude.Types.Left', V7297} end(E556)); {'Idris.Prelude.Types.Right', E557} -> (fun (V7298) -> begin (V7299 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V7298, {'Idris.Core.Env.Nil'}, V3, V7267))), case V7299 of {'Idris.Prelude.Types.Left', E558} -> (fun (V7300) -> {'Idris.Prelude.Types.Left', V7300} end(E558)); {'Idris.Prelude.Types.Right', E559} -> (fun (V7301) -> begin (V7306 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V7302) -> fun (V7303) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V7302, V7303)) end end, fun (V7304) -> fun (V7305) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V7304, V7305)) end end}, V7301, V7267))), case V7306 of {'Idris.Prelude.Types.Left', E560} -> (fun (V7307) -> {'Idris.Prelude.Types.Left', V7307} end(E560)); {'Idris.Prelude.Types.Right', E561} -> (fun (V7308) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V7308))))}, V7267)) end(E561)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E559)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E557)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end(E554, E555)); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E452, E453, E454, E455} -> (fun (V7309, V7310, V7311, V7312) -> case V7311 of {'Idris.Core.TT.Pi', E497, E498, E499, E500} -> (fun (V7313, V7314, V7315, V7316) -> fun (V7317) -> begin (V7346 = begin (V7345 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7318) -> fun (V7319) -> fun (V7320) -> fun (V7321) -> fun (V7322) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7320, V7321, V7322)) end end end end end, fun (V7323) -> fun (V7324) -> fun (V7325) -> V7324 end end end, fun (V7326) -> fun (V7327) -> fun (V7328) -> fun (V7329) -> fun (V7330) -> begin (V7331 = (V7328(V7330))), begin (V7332 = (V7329(V7330))), (V7331(V7332)) end end end end end end end}, fun (V7333) -> fun (V7334) -> fun (V7335) -> fun (V7336) -> fun (V7337) -> begin (V7338 = (V7335(V7337))), ((V7336(V7338))(V7337)) end end end end end end, fun (V7339) -> fun (V7340) -> fun (V7341) -> begin (V7342 = (V7340(V7341))), (V7342(V7341)) end end end end}, fun (V7343) -> fun (V7344) -> V7344 end end}, V0))(V7317))), {'Idris.Prelude.Types.Right', V7345} end), case V7346 of {'Idris.Prelude.Types.Left', E501} -> (fun (V7347) -> {'Idris.Prelude.Types.Left', V7347} end(E501)); {'Idris.Prelude.Types.Right', E502} -> (fun (V7348) -> begin (V7349 = (('un--nfToCFType'(V0, V7309, 1, V7316))(V7317))), case V7349 of {'Idris.Prelude.Types.Left', E503} -> (fun (V7350) -> {'Idris.Prelude.Types.Left', V7350} end(E503)); {'Idris.Prelude.Types.Right', E504} -> (fun (V7351) -> begin (V7352 = (((V7312(V7348))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V7309, 1}))))(V7317))), case V7352 of {'Idris.Prelude.Types.Left', E505} -> (fun (V7353) -> {'Idris.Prelude.Types.Left', V7353} end(E505)); {'Idris.Prelude.Types.Right', E506} -> (fun (V7354) -> begin (V7355 = (('un--nfToCFType'(V0, V7309, 1, V7354))(V7317))), case V7355 of {'Idris.Prelude.Types.Left', E507} -> (fun (V7356) -> {'Idris.Prelude.Types.Left', V7356} end(E507)); {'Idris.Prelude.Types.Right', E508} -> (fun (V7357) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V7351, V7357}} end(E508)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E506)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E504)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E502)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E497, E498, E499, E500)); _ -> case V3 of {'Idris.Core.Value.NTCon', E462, E463, E464, E465, E466} -> (fun (V7358, V7359, V7360, V7361, V7362) -> fun (V7363) -> begin (V7392 = begin (V7391 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7364) -> fun (V7365) -> fun (V7366) -> fun (V7367) -> fun (V7368) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7366, V7367, V7368)) end end end end end, fun (V7369) -> fun (V7370) -> fun (V7371) -> V7370 end end end, fun (V7372) -> fun (V7373) -> fun (V7374) -> fun (V7375) -> fun (V7376) -> begin (V7377 = (V7374(V7376))), begin (V7378 = (V7375(V7376))), (V7377(V7378)) end end end end end end end}, fun (V7379) -> fun (V7380) -> fun (V7381) -> fun (V7382) -> fun (V7383) -> begin (V7384 = (V7381(V7383))), ((V7382(V7384))(V7383)) end end end end end end, fun (V7385) -> fun (V7386) -> fun (V7387) -> begin (V7388 = (V7386(V7387))), (V7388(V7387)) end end end end}, fun (V7389) -> fun (V7390) -> V7390 end end}, V0))(V7363))), {'Idris.Prelude.Types.Right', V7391} end), case V7392 of {'Idris.Prelude.Types.Left', E467} -> (fun (V7393) -> {'Idris.Prelude.Types.Left', V7393} end(E467)); {'Idris.Prelude.Types.Right', E468} -> (fun (V7394) -> begin (V7399 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V7395) -> fun (V7396) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V7395, V7396)) end end, fun (V7397) -> fun (V7398) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V7397, V7398)) end end}, V7359, V7363))), case V7399 of {'Idris.Prelude.Types.Left', E469} -> (fun (V7400) -> {'Idris.Prelude.Types.Left', V7400} end(E469)); {'Idris.Prelude.Types.Right', E470} -> (fun (V7401) -> begin (V7402 = (('un--getNArgs'(V0, V7394, V7401, V7362))(V7363))), case V7402 of {'Idris.Prelude.Types.Left', E471} -> (fun (V7403) -> {'Idris.Prelude.Types.Left', V7403} end(E471)); {'Idris.Prelude.Types.Right', E472} -> (fun (V7404) -> case V7404 of {'Idris.Compiler.CompileExpr.User', E473, E474} -> (fun (V7405, V7406) -> begin (V7408 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7407) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7394, V7407)) end, V7406))(V7363))), case V7408 of {'Idris.Prelude.Types.Left', E475} -> (fun (V7409) -> {'Idris.Prelude.Types.Left', V7409} end(E475)); {'Idris.Prelude.Types.Right', E476} -> (fun (V7410) -> begin (V7412 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7411) -> ('un--nfToCFType'(V0, V7358, V2, V7411)) end, V7410))(V7363))), case V7412 of {'Idris.Prelude.Types.Left', E477} -> (fun (V7413) -> {'Idris.Prelude.Types.Left', V7413} end(E477)); {'Idris.Prelude.Types.Right', E478} -> (fun (V7414) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V7401, V7414}} end(E478)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E476)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E473, E474)); {'Idris.Compiler.CompileExpr.Struct', E479, E480} -> (fun (V7415, V7416) -> begin (V7427 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7417) -> case V7417 of {'Idris.Builtin.MkPair', E481, E482} -> (fun (V7418, V7419) -> fun (V7420) -> begin (V7421 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7394, V7419))(V7420))), case V7421 of {'Idris.Prelude.Types.Left', E483} -> (fun (V7422) -> {'Idris.Prelude.Types.Left', V7422} end(E483)); {'Idris.Prelude.Types.Right', E484} -> (fun (V7423) -> begin (V7424 = (('un--nfToCFType'(V0, V7358, 0, V7423))(V7420))), case V7424 of {'Idris.Prelude.Types.Left', E485} -> (fun (V7425) -> {'Idris.Prelude.Types.Left', V7425} end(E485)); {'Idris.Prelude.Types.Right', E486} -> (fun (V7426) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V7418, V7426}} end(E486)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E484)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E481, E482)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V7416))(V7363))), case V7427 of {'Idris.Prelude.Types.Left', E487} -> (fun (V7428) -> {'Idris.Prelude.Types.Left', V7428} end(E487)); {'Idris.Prelude.Types.Right', E488} -> (fun (V7429) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V7415, V7429}} end(E488)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E479, E480)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E489} -> (fun (V7430) -> begin (V7431 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7394, V7430))(V7363))), case V7431 of {'Idris.Prelude.Types.Left', E490} -> (fun (V7432) -> {'Idris.Prelude.Types.Left', V7432} end(E490)); {'Idris.Prelude.Types.Right', E491} -> (fun (V7433) -> begin (V7434 = (('un--nfToCFType'(V0, V7358, V2, V7433))(V7363))), case V7434 of {'Idris.Prelude.Types.Left', E492} -> (fun (V7435) -> {'Idris.Prelude.Types.Left', V7435} end(E492)); {'Idris.Prelude.Types.Right', E493} -> (fun (V7436) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V7436}} end(E493)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E491)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E489)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E472)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E470)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E468)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E462, E463, E464, E465, E466)); {'Idris.Core.Value.NType', E494} -> (fun (V7437) -> fun (V7438) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E494)); {'Idris.Core.Value.NErased', E495, E496} -> (fun (V7439, V7440) -> fun (V7441) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E495, E496)); _ -> fun (V7442) -> begin (V7471 = begin (V7470 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7443) -> fun (V7444) -> fun (V7445) -> fun (V7446) -> fun (V7447) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7445, V7446, V7447)) end end end end end, fun (V7448) -> fun (V7449) -> fun (V7450) -> V7449 end end end, fun (V7451) -> fun (V7452) -> fun (V7453) -> fun (V7454) -> fun (V7455) -> begin (V7456 = (V7453(V7455))), begin (V7457 = (V7454(V7455))), (V7456(V7457)) end end end end end end end}, fun (V7458) -> fun (V7459) -> fun (V7460) -> fun (V7461) -> fun (V7462) -> begin (V7463 = (V7460(V7462))), ((V7461(V7463))(V7462)) end end end end end end, fun (V7464) -> fun (V7465) -> fun (V7466) -> begin (V7467 = (V7465(V7466))), (V7467(V7466)) end end end end}, fun (V7468) -> fun (V7469) -> V7469 end end}, V0))(V7442))), {'Idris.Prelude.Types.Right', V7470} end), case V7471 of {'Idris.Prelude.Types.Left', E456} -> (fun (V7472) -> {'Idris.Prelude.Types.Left', V7472} end(E456)); {'Idris.Prelude.Types.Right', E457} -> (fun (V7473) -> begin (V7474 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V7473, {'Idris.Core.Env.Nil'}, V3, V7442))), case V7474 of {'Idris.Prelude.Types.Left', E458} -> (fun (V7475) -> {'Idris.Prelude.Types.Left', V7475} end(E458)); {'Idris.Prelude.Types.Right', E459} -> (fun (V7476) -> begin (V7481 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V7477) -> fun (V7478) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V7477, V7478)) end end, fun (V7479) -> fun (V7480) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V7479, V7480)) end end}, V7476, V7442))), case V7481 of {'Idris.Prelude.Types.Left', E460} -> (fun (V7482) -> {'Idris.Prelude.Types.Left', V7482} end(E460)); {'Idris.Prelude.Types.Right', E461} -> (fun (V7483) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V7483))))}, V7442)) end(E461)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E459)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E457)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E452, E453, E454, E455)); _ -> case V3 of {'Idris.Core.Value.NTCon', E417, E418, E419, E420, E421} -> (fun (V7484, V7485, V7486, V7487, V7488) -> fun (V7489) -> begin (V7518 = begin (V7517 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7490) -> fun (V7491) -> fun (V7492) -> fun (V7493) -> fun (V7494) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7492, V7493, V7494)) end end end end end, fun (V7495) -> fun (V7496) -> fun (V7497) -> V7496 end end end, fun (V7498) -> fun (V7499) -> fun (V7500) -> fun (V7501) -> fun (V7502) -> begin (V7503 = (V7500(V7502))), begin (V7504 = (V7501(V7502))), (V7503(V7504)) end end end end end end end}, fun (V7505) -> fun (V7506) -> fun (V7507) -> fun (V7508) -> fun (V7509) -> begin (V7510 = (V7507(V7509))), ((V7508(V7510))(V7509)) end end end end end end, fun (V7511) -> fun (V7512) -> fun (V7513) -> begin (V7514 = (V7512(V7513))), (V7514(V7513)) end end end end}, fun (V7515) -> fun (V7516) -> V7516 end end}, V0))(V7489))), {'Idris.Prelude.Types.Right', V7517} end), case V7518 of {'Idris.Prelude.Types.Left', E422} -> (fun (V7519) -> {'Idris.Prelude.Types.Left', V7519} end(E422)); {'Idris.Prelude.Types.Right', E423} -> (fun (V7520) -> begin (V7525 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V7521) -> fun (V7522) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V7521, V7522)) end end, fun (V7523) -> fun (V7524) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V7523, V7524)) end end}, V7485, V7489))), case V7525 of {'Idris.Prelude.Types.Left', E424} -> (fun (V7526) -> {'Idris.Prelude.Types.Left', V7526} end(E424)); {'Idris.Prelude.Types.Right', E425} -> (fun (V7527) -> begin (V7528 = (('un--getNArgs'(V0, V7520, V7527, V7488))(V7489))), case V7528 of {'Idris.Prelude.Types.Left', E426} -> (fun (V7529) -> {'Idris.Prelude.Types.Left', V7529} end(E426)); {'Idris.Prelude.Types.Right', E427} -> (fun (V7530) -> case V7530 of {'Idris.Compiler.CompileExpr.User', E428, E429} -> (fun (V7531, V7532) -> begin (V7534 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7533) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7520, V7533)) end, V7532))(V7489))), case V7534 of {'Idris.Prelude.Types.Left', E430} -> (fun (V7535) -> {'Idris.Prelude.Types.Left', V7535} end(E430)); {'Idris.Prelude.Types.Right', E431} -> (fun (V7536) -> begin (V7538 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7537) -> ('un--nfToCFType'(V0, V7484, V2, V7537)) end, V7536))(V7489))), case V7538 of {'Idris.Prelude.Types.Left', E432} -> (fun (V7539) -> {'Idris.Prelude.Types.Left', V7539} end(E432)); {'Idris.Prelude.Types.Right', E433} -> (fun (V7540) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V7527, V7540}} end(E433)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E431)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E428, E429)); {'Idris.Compiler.CompileExpr.Struct', E434, E435} -> (fun (V7541, V7542) -> begin (V7553 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7543) -> case V7543 of {'Idris.Builtin.MkPair', E436, E437} -> (fun (V7544, V7545) -> fun (V7546) -> begin (V7547 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7520, V7545))(V7546))), case V7547 of {'Idris.Prelude.Types.Left', E438} -> (fun (V7548) -> {'Idris.Prelude.Types.Left', V7548} end(E438)); {'Idris.Prelude.Types.Right', E439} -> (fun (V7549) -> begin (V7550 = (('un--nfToCFType'(V0, V7484, 0, V7549))(V7546))), case V7550 of {'Idris.Prelude.Types.Left', E440} -> (fun (V7551) -> {'Idris.Prelude.Types.Left', V7551} end(E440)); {'Idris.Prelude.Types.Right', E441} -> (fun (V7552) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V7544, V7552}} end(E441)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E439)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E436, E437)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V7542))(V7489))), case V7553 of {'Idris.Prelude.Types.Left', E442} -> (fun (V7554) -> {'Idris.Prelude.Types.Left', V7554} end(E442)); {'Idris.Prelude.Types.Right', E443} -> (fun (V7555) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V7541, V7555}} end(E443)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E434, E435)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E444} -> (fun (V7556) -> begin (V7557 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7520, V7556))(V7489))), case V7557 of {'Idris.Prelude.Types.Left', E445} -> (fun (V7558) -> {'Idris.Prelude.Types.Left', V7558} end(E445)); {'Idris.Prelude.Types.Right', E446} -> (fun (V7559) -> begin (V7560 = (('un--nfToCFType'(V0, V7484, V2, V7559))(V7489))), case V7560 of {'Idris.Prelude.Types.Left', E447} -> (fun (V7561) -> {'Idris.Prelude.Types.Left', V7561} end(E447)); {'Idris.Prelude.Types.Right', E448} -> (fun (V7562) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V7562}} end(E448)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E446)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E444)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E427)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E425)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E423)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E417, E418, E419, E420, E421)); {'Idris.Core.Value.NType', E449} -> (fun (V7563) -> fun (V7564) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E449)); {'Idris.Core.Value.NErased', E450, E451} -> (fun (V7565, V7566) -> fun (V7567) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E450, E451)); _ -> fun (V7568) -> begin (V7597 = begin (V7596 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7569) -> fun (V7570) -> fun (V7571) -> fun (V7572) -> fun (V7573) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7571, V7572, V7573)) end end end end end, fun (V7574) -> fun (V7575) -> fun (V7576) -> V7575 end end end, fun (V7577) -> fun (V7578) -> fun (V7579) -> fun (V7580) -> fun (V7581) -> begin (V7582 = (V7579(V7581))), begin (V7583 = (V7580(V7581))), (V7582(V7583)) end end end end end end end}, fun (V7584) -> fun (V7585) -> fun (V7586) -> fun (V7587) -> fun (V7588) -> begin (V7589 = (V7586(V7588))), ((V7587(V7589))(V7588)) end end end end end end, fun (V7590) -> fun (V7591) -> fun (V7592) -> begin (V7593 = (V7591(V7592))), (V7593(V7592)) end end end end}, fun (V7594) -> fun (V7595) -> V7595 end end}, V0))(V7568))), {'Idris.Prelude.Types.Right', V7596} end), case V7597 of {'Idris.Prelude.Types.Left', E411} -> (fun (V7598) -> {'Idris.Prelude.Types.Left', V7598} end(E411)); {'Idris.Prelude.Types.Right', E412} -> (fun (V7599) -> begin (V7600 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V7599, {'Idris.Core.Env.Nil'}, V3, V7568))), case V7600 of {'Idris.Prelude.Types.Left', E413} -> (fun (V7601) -> {'Idris.Prelude.Types.Left', V7601} end(E413)); {'Idris.Prelude.Types.Right', E414} -> (fun (V7602) -> begin (V7607 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V7603) -> fun (V7604) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V7603, V7604)) end end, fun (V7605) -> fun (V7606) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V7605, V7606)) end end}, V7602, V7568))), case V7607 of {'Idris.Prelude.Types.Left', E415} -> (fun (V7608) -> {'Idris.Prelude.Types.Left', V7608} end(E415)); {'Idris.Prelude.Types.Right', E416} -> (fun (V7609) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V7609))))}, V7568)) end(E416)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E414)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E412)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E550, E551, E552, E553} -> (fun (V7610, V7611, V7612, V7613) -> fun (V7614) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V7610, <<"Function types not allowed in a foreign struct"/utf8>>}, V7614)) end end(E550, E551, E552, E553)); _ -> case V3 of {'Idris.Core.Value.NTCon', E515, E516, E517, E518, E519} -> (fun (V7615, V7616, V7617, V7618, V7619) -> fun (V7620) -> begin (V7649 = begin (V7648 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7621) -> fun (V7622) -> fun (V7623) -> fun (V7624) -> fun (V7625) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7623, V7624, V7625)) end end end end end, fun (V7626) -> fun (V7627) -> fun (V7628) -> V7627 end end end, fun (V7629) -> fun (V7630) -> fun (V7631) -> fun (V7632) -> fun (V7633) -> begin (V7634 = (V7631(V7633))), begin (V7635 = (V7632(V7633))), (V7634(V7635)) end end end end end end end}, fun (V7636) -> fun (V7637) -> fun (V7638) -> fun (V7639) -> fun (V7640) -> begin (V7641 = (V7638(V7640))), ((V7639(V7641))(V7640)) end end end end end end, fun (V7642) -> fun (V7643) -> fun (V7644) -> begin (V7645 = (V7643(V7644))), (V7645(V7644)) end end end end}, fun (V7646) -> fun (V7647) -> V7647 end end}, V0))(V7620))), {'Idris.Prelude.Types.Right', V7648} end), case V7649 of {'Idris.Prelude.Types.Left', E520} -> (fun (V7650) -> {'Idris.Prelude.Types.Left', V7650} end(E520)); {'Idris.Prelude.Types.Right', E521} -> (fun (V7651) -> begin (V7656 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V7652) -> fun (V7653) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V7652, V7653)) end end, fun (V7654) -> fun (V7655) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V7654, V7655)) end end}, V7616, V7620))), case V7656 of {'Idris.Prelude.Types.Left', E522} -> (fun (V7657) -> {'Idris.Prelude.Types.Left', V7657} end(E522)); {'Idris.Prelude.Types.Right', E523} -> (fun (V7658) -> begin (V7659 = (('un--getNArgs'(V0, V7651, V7658, V7619))(V7620))), case V7659 of {'Idris.Prelude.Types.Left', E524} -> (fun (V7660) -> {'Idris.Prelude.Types.Left', V7660} end(E524)); {'Idris.Prelude.Types.Right', E525} -> (fun (V7661) -> case V7661 of {'Idris.Compiler.CompileExpr.User', E526, E527} -> (fun (V7662, V7663) -> begin (V7665 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7664) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7651, V7664)) end, V7663))(V7620))), case V7665 of {'Idris.Prelude.Types.Left', E528} -> (fun (V7666) -> {'Idris.Prelude.Types.Left', V7666} end(E528)); {'Idris.Prelude.Types.Right', E529} -> (fun (V7667) -> begin (V7669 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7668) -> ('un--nfToCFType'(V0, V7615, V2, V7668)) end, V7667))(V7620))), case V7669 of {'Idris.Prelude.Types.Left', E530} -> (fun (V7670) -> {'Idris.Prelude.Types.Left', V7670} end(E530)); {'Idris.Prelude.Types.Right', E531} -> (fun (V7671) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V7658, V7671}} end(E531)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E529)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E526, E527)); {'Idris.Compiler.CompileExpr.Struct', E532, E533} -> (fun (V7672, V7673) -> begin (V7684 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7674) -> case V7674 of {'Idris.Builtin.MkPair', E534, E535} -> (fun (V7675, V7676) -> fun (V7677) -> begin (V7678 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7651, V7676))(V7677))), case V7678 of {'Idris.Prelude.Types.Left', E536} -> (fun (V7679) -> {'Idris.Prelude.Types.Left', V7679} end(E536)); {'Idris.Prelude.Types.Right', E537} -> (fun (V7680) -> begin (V7681 = (('un--nfToCFType'(V0, V7615, 0, V7680))(V7677))), case V7681 of {'Idris.Prelude.Types.Left', E538} -> (fun (V7682) -> {'Idris.Prelude.Types.Left', V7682} end(E538)); {'Idris.Prelude.Types.Right', E539} -> (fun (V7683) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V7675, V7683}} end(E539)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E537)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E534, E535)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V7673))(V7620))), case V7684 of {'Idris.Prelude.Types.Left', E540} -> (fun (V7685) -> {'Idris.Prelude.Types.Left', V7685} end(E540)); {'Idris.Prelude.Types.Right', E541} -> (fun (V7686) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V7672, V7686}} end(E541)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E532, E533)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E542} -> (fun (V7687) -> begin (V7688 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7651, V7687))(V7620))), case V7688 of {'Idris.Prelude.Types.Left', E543} -> (fun (V7689) -> {'Idris.Prelude.Types.Left', V7689} end(E543)); {'Idris.Prelude.Types.Right', E544} -> (fun (V7690) -> begin (V7691 = (('un--nfToCFType'(V0, V7615, V2, V7690))(V7620))), case V7691 of {'Idris.Prelude.Types.Left', E545} -> (fun (V7692) -> {'Idris.Prelude.Types.Left', V7692} end(E545)); {'Idris.Prelude.Types.Right', E546} -> (fun (V7693) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V7693}} end(E546)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E544)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E542)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E525)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E523)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E521)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E515, E516, E517, E518, E519)); {'Idris.Core.Value.NType', E547} -> (fun (V7694) -> fun (V7695) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E547)); {'Idris.Core.Value.NErased', E548, E549} -> (fun (V7696, V7697) -> fun (V7698) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E548, E549)); _ -> fun (V7699) -> begin (V7728 = begin (V7727 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7700) -> fun (V7701) -> fun (V7702) -> fun (V7703) -> fun (V7704) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7702, V7703, V7704)) end end end end end, fun (V7705) -> fun (V7706) -> fun (V7707) -> V7706 end end end, fun (V7708) -> fun (V7709) -> fun (V7710) -> fun (V7711) -> fun (V7712) -> begin (V7713 = (V7710(V7712))), begin (V7714 = (V7711(V7712))), (V7713(V7714)) end end end end end end end}, fun (V7715) -> fun (V7716) -> fun (V7717) -> fun (V7718) -> fun (V7719) -> begin (V7720 = (V7717(V7719))), ((V7718(V7720))(V7719)) end end end end end end, fun (V7721) -> fun (V7722) -> fun (V7723) -> begin (V7724 = (V7722(V7723))), (V7724(V7723)) end end end end}, fun (V7725) -> fun (V7726) -> V7726 end end}, V0))(V7699))), {'Idris.Prelude.Types.Right', V7727} end), case V7728 of {'Idris.Prelude.Types.Left', E509} -> (fun (V7729) -> {'Idris.Prelude.Types.Left', V7729} end(E509)); {'Idris.Prelude.Types.Right', E510} -> (fun (V7730) -> begin (V7731 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V7730, {'Idris.Core.Env.Nil'}, V3, V7699))), case V7731 of {'Idris.Prelude.Types.Left', E511} -> (fun (V7732) -> {'Idris.Prelude.Types.Left', V7732} end(E511)); {'Idris.Prelude.Types.Right', E512} -> (fun (V7733) -> begin (V7738 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V7734) -> fun (V7735) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V7734, V7735)) end end, fun (V7736) -> fun (V7737) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V7736, V7737)) end end}, V7733, V7699))), case V7738 of {'Idris.Prelude.Types.Left', E513} -> (fun (V7739) -> {'Idris.Prelude.Types.Left', V7739} end(E513)); {'Idris.Prelude.Types.Right', E514} -> (fun (V7740) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V7740))))}, V7699)) end(E514)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E512)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E510)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E376, E377, E378, E379, E380} -> (fun (V7741, V7742, V7743, V7744, V7745) -> fun (V7746) -> begin (V7775 = begin (V7774 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7747) -> fun (V7748) -> fun (V7749) -> fun (V7750) -> fun (V7751) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7749, V7750, V7751)) end end end end end, fun (V7752) -> fun (V7753) -> fun (V7754) -> V7753 end end end, fun (V7755) -> fun (V7756) -> fun (V7757) -> fun (V7758) -> fun (V7759) -> begin (V7760 = (V7757(V7759))), begin (V7761 = (V7758(V7759))), (V7760(V7761)) end end end end end end end}, fun (V7762) -> fun (V7763) -> fun (V7764) -> fun (V7765) -> fun (V7766) -> begin (V7767 = (V7764(V7766))), ((V7765(V7767))(V7766)) end end end end end end, fun (V7768) -> fun (V7769) -> fun (V7770) -> begin (V7771 = (V7769(V7770))), (V7771(V7770)) end end end end}, fun (V7772) -> fun (V7773) -> V7773 end end}, V0))(V7746))), {'Idris.Prelude.Types.Right', V7774} end), case V7775 of {'Idris.Prelude.Types.Left', E381} -> (fun (V7776) -> {'Idris.Prelude.Types.Left', V7776} end(E381)); {'Idris.Prelude.Types.Right', E382} -> (fun (V7777) -> begin (V7782 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V7778) -> fun (V7779) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V7778, V7779)) end end, fun (V7780) -> fun (V7781) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V7780, V7781)) end end}, V7742, V7746))), case V7782 of {'Idris.Prelude.Types.Left', E383} -> (fun (V7783) -> {'Idris.Prelude.Types.Left', V7783} end(E383)); {'Idris.Prelude.Types.Right', E384} -> (fun (V7784) -> begin (V7785 = (('un--getNArgs'(V0, V7777, V7784, V7745))(V7746))), case V7785 of {'Idris.Prelude.Types.Left', E385} -> (fun (V7786) -> {'Idris.Prelude.Types.Left', V7786} end(E385)); {'Idris.Prelude.Types.Right', E386} -> (fun (V7787) -> case V7787 of {'Idris.Compiler.CompileExpr.User', E387, E388} -> (fun (V7788, V7789) -> begin (V7791 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7790) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7777, V7790)) end, V7789))(V7746))), case V7791 of {'Idris.Prelude.Types.Left', E389} -> (fun (V7792) -> {'Idris.Prelude.Types.Left', V7792} end(E389)); {'Idris.Prelude.Types.Right', E390} -> (fun (V7793) -> begin (V7795 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7794) -> ('un--nfToCFType'(V0, V7741, V2, V7794)) end, V7793))(V7746))), case V7795 of {'Idris.Prelude.Types.Left', E391} -> (fun (V7796) -> {'Idris.Prelude.Types.Left', V7796} end(E391)); {'Idris.Prelude.Types.Right', E392} -> (fun (V7797) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V7784, V7797}} end(E392)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E390)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E387, E388)); {'Idris.Compiler.CompileExpr.Struct', E393, E394} -> (fun (V7798, V7799) -> begin (V7810 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7800) -> case V7800 of {'Idris.Builtin.MkPair', E395, E396} -> (fun (V7801, V7802) -> fun (V7803) -> begin (V7804 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7777, V7802))(V7803))), case V7804 of {'Idris.Prelude.Types.Left', E397} -> (fun (V7805) -> {'Idris.Prelude.Types.Left', V7805} end(E397)); {'Idris.Prelude.Types.Right', E398} -> (fun (V7806) -> begin (V7807 = (('un--nfToCFType'(V0, V7741, 0, V7806))(V7803))), case V7807 of {'Idris.Prelude.Types.Left', E399} -> (fun (V7808) -> {'Idris.Prelude.Types.Left', V7808} end(E399)); {'Idris.Prelude.Types.Right', E400} -> (fun (V7809) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V7801, V7809}} end(E400)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E398)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E395, E396)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V7799))(V7746))), case V7810 of {'Idris.Prelude.Types.Left', E401} -> (fun (V7811) -> {'Idris.Prelude.Types.Left', V7811} end(E401)); {'Idris.Prelude.Types.Right', E402} -> (fun (V7812) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V7798, V7812}} end(E402)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E393, E394)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E403} -> (fun (V7813) -> begin (V7814 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7777, V7813))(V7746))), case V7814 of {'Idris.Prelude.Types.Left', E404} -> (fun (V7815) -> {'Idris.Prelude.Types.Left', V7815} end(E404)); {'Idris.Prelude.Types.Right', E405} -> (fun (V7816) -> begin (V7817 = (('un--nfToCFType'(V0, V7741, V2, V7816))(V7746))), case V7817 of {'Idris.Prelude.Types.Left', E406} -> (fun (V7818) -> {'Idris.Prelude.Types.Left', V7818} end(E406)); {'Idris.Prelude.Types.Right', E407} -> (fun (V7819) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V7819}} end(E407)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E405)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E403)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E386)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E384)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E382)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E376, E377, E378, E379, E380)); {'Idris.Core.Value.NType', E408} -> (fun (V7820) -> fun (V7821) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E408)); {'Idris.Core.Value.NErased', E409, E410} -> (fun (V7822, V7823) -> fun (V7824) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E409, E410)); _ -> fun (V7825) -> begin (V7854 = begin (V7853 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7826) -> fun (V7827) -> fun (V7828) -> fun (V7829) -> fun (V7830) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7828, V7829, V7830)) end end end end end, fun (V7831) -> fun (V7832) -> fun (V7833) -> V7832 end end end, fun (V7834) -> fun (V7835) -> fun (V7836) -> fun (V7837) -> fun (V7838) -> begin (V7839 = (V7836(V7838))), begin (V7840 = (V7837(V7838))), (V7839(V7840)) end end end end end end end}, fun (V7841) -> fun (V7842) -> fun (V7843) -> fun (V7844) -> fun (V7845) -> begin (V7846 = (V7843(V7845))), ((V7844(V7846))(V7845)) end end end end end end, fun (V7847) -> fun (V7848) -> fun (V7849) -> begin (V7850 = (V7848(V7849))), (V7850(V7849)) end end end end}, fun (V7851) -> fun (V7852) -> V7852 end end}, V0))(V7825))), {'Idris.Prelude.Types.Right', V7853} end), case V7854 of {'Idris.Prelude.Types.Left', E370} -> (fun (V7855) -> {'Idris.Prelude.Types.Left', V7855} end(E370)); {'Idris.Prelude.Types.Right', E371} -> (fun (V7856) -> begin (V7857 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V7856, {'Idris.Core.Env.Nil'}, V3, V7825))), case V7857 of {'Idris.Prelude.Types.Left', E372} -> (fun (V7858) -> {'Idris.Prelude.Types.Left', V7858} end(E372)); {'Idris.Prelude.Types.Right', E373} -> (fun (V7859) -> begin (V7864 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V7860) -> fun (V7861) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V7860, V7861)) end end, fun (V7862) -> fun (V7863) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V7862, V7863)) end end}, V7859, V7825))), case V7864 of {'Idris.Prelude.Types.Left', E374} -> (fun (V7865) -> {'Idris.Prelude.Types.Left', V7865} end(E374)); {'Idris.Prelude.Types.Right', E375} -> (fun (V7866) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V7866))))}, V7825)) end(E375)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E373)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E371)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end; 0 -> case V3 of {'Idris.Core.Value.NPrimVal', E1482, E1483} -> (fun (V7867, V7868) -> case V7868 of {'Idris.Core.TT.StringType'} -> (fun () -> fun (V7869) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V1, <<"String not allowed in a foreign struct"/utf8>>}, V7869)) end end()); _ -> case V3 of {'Idris.Core.Value.NPrimVal', E1668, E1669} -> (fun (V7870, V7871) -> case V7871 of {'Idris.Core.TT.DoubleType'} -> (fun () -> fun (V7872) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFDouble'}} end end()); {'Idris.Core.TT.CharType'} -> (fun () -> fun (V7873) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFChar'}} end end()); {'Idris.Core.TT.WorldType'} -> (fun () -> fun (V7874) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFWorld'}} end end()); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E1752, E1753, E1754, E1755} -> (fun (V7875, V7876, V7877, V7878) -> case V7877 of {'Idris.Core.TT.Pi', E1797, E1798, E1799, E1800} -> (fun (V7879, V7880, V7881, V7882) -> fun (V7883) -> begin (V7912 = begin (V7911 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7884) -> fun (V7885) -> fun (V7886) -> fun (V7887) -> fun (V7888) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7886, V7887, V7888)) end end end end end, fun (V7889) -> fun (V7890) -> fun (V7891) -> V7890 end end end, fun (V7892) -> fun (V7893) -> fun (V7894) -> fun (V7895) -> fun (V7896) -> begin (V7897 = (V7894(V7896))), begin (V7898 = (V7895(V7896))), (V7897(V7898)) end end end end end end end}, fun (V7899) -> fun (V7900) -> fun (V7901) -> fun (V7902) -> fun (V7903) -> begin (V7904 = (V7901(V7903))), ((V7902(V7904))(V7903)) end end end end end end, fun (V7905) -> fun (V7906) -> fun (V7907) -> begin (V7908 = (V7906(V7907))), (V7908(V7907)) end end end end}, fun (V7909) -> fun (V7910) -> V7910 end end}, V0))(V7883))), {'Idris.Prelude.Types.Right', V7911} end), case V7912 of {'Idris.Prelude.Types.Left', E1801} -> (fun (V7913) -> {'Idris.Prelude.Types.Left', V7913} end(E1801)); {'Idris.Prelude.Types.Right', E1802} -> (fun (V7914) -> begin (V7915 = (('un--nfToCFType'(V0, V7875, 1, V7882))(V7883))), case V7915 of {'Idris.Prelude.Types.Left', E1803} -> (fun (V7916) -> {'Idris.Prelude.Types.Left', V7916} end(E1803)); {'Idris.Prelude.Types.Right', E1804} -> (fun (V7917) -> begin (V7918 = (((V7878(V7914))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V7875, 1}))))(V7883))), case V7918 of {'Idris.Prelude.Types.Left', E1805} -> (fun (V7919) -> {'Idris.Prelude.Types.Left', V7919} end(E1805)); {'Idris.Prelude.Types.Right', E1806} -> (fun (V7920) -> begin (V7921 = (('un--nfToCFType'(V0, V7875, 1, V7920))(V7883))), case V7921 of {'Idris.Prelude.Types.Left', E1807} -> (fun (V7922) -> {'Idris.Prelude.Types.Left', V7922} end(E1807)); {'Idris.Prelude.Types.Right', E1808} -> (fun (V7923) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V7917, V7923}} end(E1808)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1806)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1804)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1802)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1797, E1798, E1799, E1800)); _ -> case V3 of {'Idris.Core.Value.NTCon', E1762, E1763, E1764, E1765, E1766} -> (fun (V7924, V7925, V7926, V7927, V7928) -> fun (V7929) -> begin (V7958 = begin (V7957 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V7930) -> fun (V7931) -> fun (V7932) -> fun (V7933) -> fun (V7934) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V7932, V7933, V7934)) end end end end end, fun (V7935) -> fun (V7936) -> fun (V7937) -> V7936 end end end, fun (V7938) -> fun (V7939) -> fun (V7940) -> fun (V7941) -> fun (V7942) -> begin (V7943 = (V7940(V7942))), begin (V7944 = (V7941(V7942))), (V7943(V7944)) end end end end end end end}, fun (V7945) -> fun (V7946) -> fun (V7947) -> fun (V7948) -> fun (V7949) -> begin (V7950 = (V7947(V7949))), ((V7948(V7950))(V7949)) end end end end end end, fun (V7951) -> fun (V7952) -> fun (V7953) -> begin (V7954 = (V7952(V7953))), (V7954(V7953)) end end end end}, fun (V7955) -> fun (V7956) -> V7956 end end}, V0))(V7929))), {'Idris.Prelude.Types.Right', V7957} end), case V7958 of {'Idris.Prelude.Types.Left', E1767} -> (fun (V7959) -> {'Idris.Prelude.Types.Left', V7959} end(E1767)); {'Idris.Prelude.Types.Right', E1768} -> (fun (V7960) -> begin (V7965 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V7961) -> fun (V7962) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V7961, V7962)) end end, fun (V7963) -> fun (V7964) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V7963, V7964)) end end}, V7925, V7929))), case V7965 of {'Idris.Prelude.Types.Left', E1769} -> (fun (V7966) -> {'Idris.Prelude.Types.Left', V7966} end(E1769)); {'Idris.Prelude.Types.Right', E1770} -> (fun (V7967) -> begin (V7968 = (('un--getNArgs'(V0, V7960, V7967, V7928))(V7929))), case V7968 of {'Idris.Prelude.Types.Left', E1771} -> (fun (V7969) -> {'Idris.Prelude.Types.Left', V7969} end(E1771)); {'Idris.Prelude.Types.Right', E1772} -> (fun (V7970) -> case V7970 of {'Idris.Compiler.CompileExpr.User', E1773, E1774} -> (fun (V7971, V7972) -> begin (V7974 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7973) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7960, V7973)) end, V7972))(V7929))), case V7974 of {'Idris.Prelude.Types.Left', E1775} -> (fun (V7975) -> {'Idris.Prelude.Types.Left', V7975} end(E1775)); {'Idris.Prelude.Types.Right', E1776} -> (fun (V7976) -> begin (V7978 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7977) -> ('un--nfToCFType'(V0, V7924, V2, V7977)) end, V7976))(V7929))), case V7978 of {'Idris.Prelude.Types.Left', E1777} -> (fun (V7979) -> {'Idris.Prelude.Types.Left', V7979} end(E1777)); {'Idris.Prelude.Types.Right', E1778} -> (fun (V7980) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V7967, V7980}} end(E1778)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1776)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1773, E1774)); {'Idris.Compiler.CompileExpr.Struct', E1779, E1780} -> (fun (V7981, V7982) -> begin (V7993 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V7983) -> case V7983 of {'Idris.Builtin.MkPair', E1781, E1782} -> (fun (V7984, V7985) -> fun (V7986) -> begin (V7987 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7960, V7985))(V7986))), case V7987 of {'Idris.Prelude.Types.Left', E1783} -> (fun (V7988) -> {'Idris.Prelude.Types.Left', V7988} end(E1783)); {'Idris.Prelude.Types.Right', E1784} -> (fun (V7989) -> begin (V7990 = (('un--nfToCFType'(V0, V7924, 0, V7989))(V7986))), case V7990 of {'Idris.Prelude.Types.Left', E1785} -> (fun (V7991) -> {'Idris.Prelude.Types.Left', V7991} end(E1785)); {'Idris.Prelude.Types.Right', E1786} -> (fun (V7992) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V7984, V7992}} end(E1786)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1784)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1781, E1782)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V7982))(V7929))), case V7993 of {'Idris.Prelude.Types.Left', E1787} -> (fun (V7994) -> {'Idris.Prelude.Types.Left', V7994} end(E1787)); {'Idris.Prelude.Types.Right', E1788} -> (fun (V7995) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V7981, V7995}} end(E1788)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1779, E1780)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1789} -> (fun (V7996) -> begin (V7997 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V7960, V7996))(V7929))), case V7997 of {'Idris.Prelude.Types.Left', E1790} -> (fun (V7998) -> {'Idris.Prelude.Types.Left', V7998} end(E1790)); {'Idris.Prelude.Types.Right', E1791} -> (fun (V7999) -> begin (V8000 = (('un--nfToCFType'(V0, V7924, V2, V7999))(V7929))), case V8000 of {'Idris.Prelude.Types.Left', E1792} -> (fun (V8001) -> {'Idris.Prelude.Types.Left', V8001} end(E1792)); {'Idris.Prelude.Types.Right', E1793} -> (fun (V8002) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V8002}} end(E1793)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1791)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1789)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1772)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1770)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1768)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1762, E1763, E1764, E1765, E1766)); {'Idris.Core.Value.NType', E1794} -> (fun (V8003) -> fun (V8004) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1794)); {'Idris.Core.Value.NErased', E1795, E1796} -> (fun (V8005, V8006) -> fun (V8007) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1795, E1796)); _ -> fun (V8008) -> begin (V8037 = begin (V8036 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V8009) -> fun (V8010) -> fun (V8011) -> fun (V8012) -> fun (V8013) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V8011, V8012, V8013)) end end end end end, fun (V8014) -> fun (V8015) -> fun (V8016) -> V8015 end end end, fun (V8017) -> fun (V8018) -> fun (V8019) -> fun (V8020) -> fun (V8021) -> begin (V8022 = (V8019(V8021))), begin (V8023 = (V8020(V8021))), (V8022(V8023)) end end end end end end end}, fun (V8024) -> fun (V8025) -> fun (V8026) -> fun (V8027) -> fun (V8028) -> begin (V8029 = (V8026(V8028))), ((V8027(V8029))(V8028)) end end end end end end, fun (V8030) -> fun (V8031) -> fun (V8032) -> begin (V8033 = (V8031(V8032))), (V8033(V8032)) end end end end}, fun (V8034) -> fun (V8035) -> V8035 end end}, V0))(V8008))), {'Idris.Prelude.Types.Right', V8036} end), case V8037 of {'Idris.Prelude.Types.Left', E1756} -> (fun (V8038) -> {'Idris.Prelude.Types.Left', V8038} end(E1756)); {'Idris.Prelude.Types.Right', E1757} -> (fun (V8039) -> begin (V8040 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V8039, {'Idris.Core.Env.Nil'}, V3, V8008))), case V8040 of {'Idris.Prelude.Types.Left', E1758} -> (fun (V8041) -> {'Idris.Prelude.Types.Left', V8041} end(E1758)); {'Idris.Prelude.Types.Right', E1759} -> (fun (V8042) -> begin (V8047 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V8043) -> fun (V8044) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V8043, V8044)) end end, fun (V8045) -> fun (V8046) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V8045, V8046)) end end}, V8042, V8008))), case V8047 of {'Idris.Prelude.Types.Left', E1760} -> (fun (V8048) -> {'Idris.Prelude.Types.Left', V8048} end(E1760)); {'Idris.Prelude.Types.Right', E1761} -> (fun (V8049) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V8049))))}, V8008)) end(E1761)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1759)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1757)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E1752, E1753, E1754, E1755)); _ -> case V3 of {'Idris.Core.Value.NTCon', E1717, E1718, E1719, E1720, E1721} -> (fun (V8050, V8051, V8052, V8053, V8054) -> fun (V8055) -> begin (V8084 = begin (V8083 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V8056) -> fun (V8057) -> fun (V8058) -> fun (V8059) -> fun (V8060) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V8058, V8059, V8060)) end end end end end, fun (V8061) -> fun (V8062) -> fun (V8063) -> V8062 end end end, fun (V8064) -> fun (V8065) -> fun (V8066) -> fun (V8067) -> fun (V8068) -> begin (V8069 = (V8066(V8068))), begin (V8070 = (V8067(V8068))), (V8069(V8070)) end end end end end end end}, fun (V8071) -> fun (V8072) -> fun (V8073) -> fun (V8074) -> fun (V8075) -> begin (V8076 = (V8073(V8075))), ((V8074(V8076))(V8075)) end end end end end end, fun (V8077) -> fun (V8078) -> fun (V8079) -> begin (V8080 = (V8078(V8079))), (V8080(V8079)) end end end end}, fun (V8081) -> fun (V8082) -> V8082 end end}, V0))(V8055))), {'Idris.Prelude.Types.Right', V8083} end), case V8084 of {'Idris.Prelude.Types.Left', E1722} -> (fun (V8085) -> {'Idris.Prelude.Types.Left', V8085} end(E1722)); {'Idris.Prelude.Types.Right', E1723} -> (fun (V8086) -> begin (V8091 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V8087) -> fun (V8088) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V8087, V8088)) end end, fun (V8089) -> fun (V8090) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V8089, V8090)) end end}, V8051, V8055))), case V8091 of {'Idris.Prelude.Types.Left', E1724} -> (fun (V8092) -> {'Idris.Prelude.Types.Left', V8092} end(E1724)); {'Idris.Prelude.Types.Right', E1725} -> (fun (V8093) -> begin (V8094 = (('un--getNArgs'(V0, V8086, V8093, V8054))(V8055))), case V8094 of {'Idris.Prelude.Types.Left', E1726} -> (fun (V8095) -> {'Idris.Prelude.Types.Left', V8095} end(E1726)); {'Idris.Prelude.Types.Right', E1727} -> (fun (V8096) -> case V8096 of {'Idris.Compiler.CompileExpr.User', E1728, E1729} -> (fun (V8097, V8098) -> begin (V8100 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8099) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8086, V8099)) end, V8098))(V8055))), case V8100 of {'Idris.Prelude.Types.Left', E1730} -> (fun (V8101) -> {'Idris.Prelude.Types.Left', V8101} end(E1730)); {'Idris.Prelude.Types.Right', E1731} -> (fun (V8102) -> begin (V8104 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8103) -> ('un--nfToCFType'(V0, V8050, V2, V8103)) end, V8102))(V8055))), case V8104 of {'Idris.Prelude.Types.Left', E1732} -> (fun (V8105) -> {'Idris.Prelude.Types.Left', V8105} end(E1732)); {'Idris.Prelude.Types.Right', E1733} -> (fun (V8106) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V8093, V8106}} end(E1733)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1731)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1728, E1729)); {'Idris.Compiler.CompileExpr.Struct', E1734, E1735} -> (fun (V8107, V8108) -> begin (V8119 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8109) -> case V8109 of {'Idris.Builtin.MkPair', E1736, E1737} -> (fun (V8110, V8111) -> fun (V8112) -> begin (V8113 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8086, V8111))(V8112))), case V8113 of {'Idris.Prelude.Types.Left', E1738} -> (fun (V8114) -> {'Idris.Prelude.Types.Left', V8114} end(E1738)); {'Idris.Prelude.Types.Right', E1739} -> (fun (V8115) -> begin (V8116 = (('un--nfToCFType'(V0, V8050, 0, V8115))(V8112))), case V8116 of {'Idris.Prelude.Types.Left', E1740} -> (fun (V8117) -> {'Idris.Prelude.Types.Left', V8117} end(E1740)); {'Idris.Prelude.Types.Right', E1741} -> (fun (V8118) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V8110, V8118}} end(E1741)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1739)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1736, E1737)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V8108))(V8055))), case V8119 of {'Idris.Prelude.Types.Left', E1742} -> (fun (V8120) -> {'Idris.Prelude.Types.Left', V8120} end(E1742)); {'Idris.Prelude.Types.Right', E1743} -> (fun (V8121) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V8107, V8121}} end(E1743)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1734, E1735)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1744} -> (fun (V8122) -> begin (V8123 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8086, V8122))(V8055))), case V8123 of {'Idris.Prelude.Types.Left', E1745} -> (fun (V8124) -> {'Idris.Prelude.Types.Left', V8124} end(E1745)); {'Idris.Prelude.Types.Right', E1746} -> (fun (V8125) -> begin (V8126 = (('un--nfToCFType'(V0, V8050, V2, V8125))(V8055))), case V8126 of {'Idris.Prelude.Types.Left', E1747} -> (fun (V8127) -> {'Idris.Prelude.Types.Left', V8127} end(E1747)); {'Idris.Prelude.Types.Right', E1748} -> (fun (V8128) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V8128}} end(E1748)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1746)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1744)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1727)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1725)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1723)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1717, E1718, E1719, E1720, E1721)); {'Idris.Core.Value.NType', E1749} -> (fun (V8129) -> fun (V8130) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1749)); {'Idris.Core.Value.NErased', E1750, E1751} -> (fun (V8131, V8132) -> fun (V8133) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1750, E1751)); _ -> fun (V8134) -> begin (V8163 = begin (V8162 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V8135) -> fun (V8136) -> fun (V8137) -> fun (V8138) -> fun (V8139) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V8137, V8138, V8139)) end end end end end, fun (V8140) -> fun (V8141) -> fun (V8142) -> V8141 end end end, fun (V8143) -> fun (V8144) -> fun (V8145) -> fun (V8146) -> fun (V8147) -> begin (V8148 = (V8145(V8147))), begin (V8149 = (V8146(V8147))), (V8148(V8149)) end end end end end end end}, fun (V8150) -> fun (V8151) -> fun (V8152) -> fun (V8153) -> fun (V8154) -> begin (V8155 = (V8152(V8154))), ((V8153(V8155))(V8154)) end end end end end end, fun (V8156) -> fun (V8157) -> fun (V8158) -> begin (V8159 = (V8157(V8158))), (V8159(V8158)) end end end end}, fun (V8160) -> fun (V8161) -> V8161 end end}, V0))(V8134))), {'Idris.Prelude.Types.Right', V8162} end), case V8163 of {'Idris.Prelude.Types.Left', E1711} -> (fun (V8164) -> {'Idris.Prelude.Types.Left', V8164} end(E1711)); {'Idris.Prelude.Types.Right', E1712} -> (fun (V8165) -> begin (V8166 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V8165, {'Idris.Core.Env.Nil'}, V3, V8134))), case V8166 of {'Idris.Prelude.Types.Left', E1713} -> (fun (V8167) -> {'Idris.Prelude.Types.Left', V8167} end(E1713)); {'Idris.Prelude.Types.Right', E1714} -> (fun (V8168) -> begin (V8173 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V8169) -> fun (V8170) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V8169, V8170)) end end, fun (V8171) -> fun (V8172) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V8171, V8172)) end end}, V8168, V8134))), case V8173 of {'Idris.Prelude.Types.Left', E1715} -> (fun (V8174) -> {'Idris.Prelude.Types.Left', V8174} end(E1715)); {'Idris.Prelude.Types.Right', E1716} -> (fun (V8175) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V8175))))}, V8134)) end(E1716)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1714)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1712)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E1850, E1851, E1852, E1853} -> (fun (V8176, V8177, V8178, V8179) -> fun (V8180) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V8176, <<"Function types not allowed in a foreign struct"/utf8>>}, V8180)) end end(E1850, E1851, E1852, E1853)); _ -> case V3 of {'Idris.Core.Value.NTCon', E1815, E1816, E1817, E1818, E1819} -> (fun (V8181, V8182, V8183, V8184, V8185) -> fun (V8186) -> begin (V8215 = begin (V8214 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V8187) -> fun (V8188) -> fun (V8189) -> fun (V8190) -> fun (V8191) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V8189, V8190, V8191)) end end end end end, fun (V8192) -> fun (V8193) -> fun (V8194) -> V8193 end end end, fun (V8195) -> fun (V8196) -> fun (V8197) -> fun (V8198) -> fun (V8199) -> begin (V8200 = (V8197(V8199))), begin (V8201 = (V8198(V8199))), (V8200(V8201)) end end end end end end end}, fun (V8202) -> fun (V8203) -> fun (V8204) -> fun (V8205) -> fun (V8206) -> begin (V8207 = (V8204(V8206))), ((V8205(V8207))(V8206)) end end end end end end, fun (V8208) -> fun (V8209) -> fun (V8210) -> begin (V8211 = (V8209(V8210))), (V8211(V8210)) end end end end}, fun (V8212) -> fun (V8213) -> V8213 end end}, V0))(V8186))), {'Idris.Prelude.Types.Right', V8214} end), case V8215 of {'Idris.Prelude.Types.Left', E1820} -> (fun (V8216) -> {'Idris.Prelude.Types.Left', V8216} end(E1820)); {'Idris.Prelude.Types.Right', E1821} -> (fun (V8217) -> begin (V8222 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V8218) -> fun (V8219) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V8218, V8219)) end end, fun (V8220) -> fun (V8221) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V8220, V8221)) end end}, V8182, V8186))), case V8222 of {'Idris.Prelude.Types.Left', E1822} -> (fun (V8223) -> {'Idris.Prelude.Types.Left', V8223} end(E1822)); {'Idris.Prelude.Types.Right', E1823} -> (fun (V8224) -> begin (V8225 = (('un--getNArgs'(V0, V8217, V8224, V8185))(V8186))), case V8225 of {'Idris.Prelude.Types.Left', E1824} -> (fun (V8226) -> {'Idris.Prelude.Types.Left', V8226} end(E1824)); {'Idris.Prelude.Types.Right', E1825} -> (fun (V8227) -> case V8227 of {'Idris.Compiler.CompileExpr.User', E1826, E1827} -> (fun (V8228, V8229) -> begin (V8231 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8230) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8217, V8230)) end, V8229))(V8186))), case V8231 of {'Idris.Prelude.Types.Left', E1828} -> (fun (V8232) -> {'Idris.Prelude.Types.Left', V8232} end(E1828)); {'Idris.Prelude.Types.Right', E1829} -> (fun (V8233) -> begin (V8235 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8234) -> ('un--nfToCFType'(V0, V8181, V2, V8234)) end, V8233))(V8186))), case V8235 of {'Idris.Prelude.Types.Left', E1830} -> (fun (V8236) -> {'Idris.Prelude.Types.Left', V8236} end(E1830)); {'Idris.Prelude.Types.Right', E1831} -> (fun (V8237) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V8224, V8237}} end(E1831)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1829)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1826, E1827)); {'Idris.Compiler.CompileExpr.Struct', E1832, E1833} -> (fun (V8238, V8239) -> begin (V8250 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8240) -> case V8240 of {'Idris.Builtin.MkPair', E1834, E1835} -> (fun (V8241, V8242) -> fun (V8243) -> begin (V8244 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8217, V8242))(V8243))), case V8244 of {'Idris.Prelude.Types.Left', E1836} -> (fun (V8245) -> {'Idris.Prelude.Types.Left', V8245} end(E1836)); {'Idris.Prelude.Types.Right', E1837} -> (fun (V8246) -> begin (V8247 = (('un--nfToCFType'(V0, V8181, 0, V8246))(V8243))), case V8247 of {'Idris.Prelude.Types.Left', E1838} -> (fun (V8248) -> {'Idris.Prelude.Types.Left', V8248} end(E1838)); {'Idris.Prelude.Types.Right', E1839} -> (fun (V8249) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V8241, V8249}} end(E1839)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1837)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1834, E1835)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V8239))(V8186))), case V8250 of {'Idris.Prelude.Types.Left', E1840} -> (fun (V8251) -> {'Idris.Prelude.Types.Left', V8251} end(E1840)); {'Idris.Prelude.Types.Right', E1841} -> (fun (V8252) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V8238, V8252}} end(E1841)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1832, E1833)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1842} -> (fun (V8253) -> begin (V8254 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8217, V8253))(V8186))), case V8254 of {'Idris.Prelude.Types.Left', E1843} -> (fun (V8255) -> {'Idris.Prelude.Types.Left', V8255} end(E1843)); {'Idris.Prelude.Types.Right', E1844} -> (fun (V8256) -> begin (V8257 = (('un--nfToCFType'(V0, V8181, V2, V8256))(V8186))), case V8257 of {'Idris.Prelude.Types.Left', E1845} -> (fun (V8258) -> {'Idris.Prelude.Types.Left', V8258} end(E1845)); {'Idris.Prelude.Types.Right', E1846} -> (fun (V8259) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V8259}} end(E1846)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1844)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1842)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1825)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1823)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1821)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1815, E1816, E1817, E1818, E1819)); {'Idris.Core.Value.NType', E1847} -> (fun (V8260) -> fun (V8261) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1847)); {'Idris.Core.Value.NErased', E1848, E1849} -> (fun (V8262, V8263) -> fun (V8264) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1848, E1849)); _ -> fun (V8265) -> begin (V8294 = begin (V8293 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V8266) -> fun (V8267) -> fun (V8268) -> fun (V8269) -> fun (V8270) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V8268, V8269, V8270)) end end end end end, fun (V8271) -> fun (V8272) -> fun (V8273) -> V8272 end end end, fun (V8274) -> fun (V8275) -> fun (V8276) -> fun (V8277) -> fun (V8278) -> begin (V8279 = (V8276(V8278))), begin (V8280 = (V8277(V8278))), (V8279(V8280)) end end end end end end end}, fun (V8281) -> fun (V8282) -> fun (V8283) -> fun (V8284) -> fun (V8285) -> begin (V8286 = (V8283(V8285))), ((V8284(V8286))(V8285)) end end end end end end, fun (V8287) -> fun (V8288) -> fun (V8289) -> begin (V8290 = (V8288(V8289))), (V8290(V8289)) end end end end}, fun (V8291) -> fun (V8292) -> V8292 end end}, V0))(V8265))), {'Idris.Prelude.Types.Right', V8293} end), case V8294 of {'Idris.Prelude.Types.Left', E1809} -> (fun (V8295) -> {'Idris.Prelude.Types.Left', V8295} end(E1809)); {'Idris.Prelude.Types.Right', E1810} -> (fun (V8296) -> begin (V8297 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V8296, {'Idris.Core.Env.Nil'}, V3, V8265))), case V8297 of {'Idris.Prelude.Types.Left', E1811} -> (fun (V8298) -> {'Idris.Prelude.Types.Left', V8298} end(E1811)); {'Idris.Prelude.Types.Right', E1812} -> (fun (V8299) -> begin (V8304 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V8300) -> fun (V8301) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V8300, V8301)) end end, fun (V8302) -> fun (V8303) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V8302, V8303)) end end}, V8299, V8265))), case V8304 of {'Idris.Prelude.Types.Left', E1813} -> (fun (V8305) -> {'Idris.Prelude.Types.Left', V8305} end(E1813)); {'Idris.Prelude.Types.Right', E1814} -> (fun (V8306) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V8306))))}, V8265)) end(E1814)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1812)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1810)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E1676, E1677, E1678, E1679, E1680} -> (fun (V8307, V8308, V8309, V8310, V8311) -> fun (V8312) -> begin (V8341 = begin (V8340 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V8313) -> fun (V8314) -> fun (V8315) -> fun (V8316) -> fun (V8317) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V8315, V8316, V8317)) end end end end end, fun (V8318) -> fun (V8319) -> fun (V8320) -> V8319 end end end, fun (V8321) -> fun (V8322) -> fun (V8323) -> fun (V8324) -> fun (V8325) -> begin (V8326 = (V8323(V8325))), begin (V8327 = (V8324(V8325))), (V8326(V8327)) end end end end end end end}, fun (V8328) -> fun (V8329) -> fun (V8330) -> fun (V8331) -> fun (V8332) -> begin (V8333 = (V8330(V8332))), ((V8331(V8333))(V8332)) end end end end end end, fun (V8334) -> fun (V8335) -> fun (V8336) -> begin (V8337 = (V8335(V8336))), (V8337(V8336)) end end end end}, fun (V8338) -> fun (V8339) -> V8339 end end}, V0))(V8312))), {'Idris.Prelude.Types.Right', V8340} end), case V8341 of {'Idris.Prelude.Types.Left', E1681} -> (fun (V8342) -> {'Idris.Prelude.Types.Left', V8342} end(E1681)); {'Idris.Prelude.Types.Right', E1682} -> (fun (V8343) -> begin (V8348 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V8344) -> fun (V8345) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V8344, V8345)) end end, fun (V8346) -> fun (V8347) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V8346, V8347)) end end}, V8308, V8312))), case V8348 of {'Idris.Prelude.Types.Left', E1683} -> (fun (V8349) -> {'Idris.Prelude.Types.Left', V8349} end(E1683)); {'Idris.Prelude.Types.Right', E1684} -> (fun (V8350) -> begin (V8351 = (('un--getNArgs'(V0, V8343, V8350, V8311))(V8312))), case V8351 of {'Idris.Prelude.Types.Left', E1685} -> (fun (V8352) -> {'Idris.Prelude.Types.Left', V8352} end(E1685)); {'Idris.Prelude.Types.Right', E1686} -> (fun (V8353) -> case V8353 of {'Idris.Compiler.CompileExpr.User', E1687, E1688} -> (fun (V8354, V8355) -> begin (V8357 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8356) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8343, V8356)) end, V8355))(V8312))), case V8357 of {'Idris.Prelude.Types.Left', E1689} -> (fun (V8358) -> {'Idris.Prelude.Types.Left', V8358} end(E1689)); {'Idris.Prelude.Types.Right', E1690} -> (fun (V8359) -> begin (V8361 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8360) -> ('un--nfToCFType'(V0, V8307, V2, V8360)) end, V8359))(V8312))), case V8361 of {'Idris.Prelude.Types.Left', E1691} -> (fun (V8362) -> {'Idris.Prelude.Types.Left', V8362} end(E1691)); {'Idris.Prelude.Types.Right', E1692} -> (fun (V8363) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V8350, V8363}} end(E1692)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1690)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1687, E1688)); {'Idris.Compiler.CompileExpr.Struct', E1693, E1694} -> (fun (V8364, V8365) -> begin (V8376 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8366) -> case V8366 of {'Idris.Builtin.MkPair', E1695, E1696} -> (fun (V8367, V8368) -> fun (V8369) -> begin (V8370 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8343, V8368))(V8369))), case V8370 of {'Idris.Prelude.Types.Left', E1697} -> (fun (V8371) -> {'Idris.Prelude.Types.Left', V8371} end(E1697)); {'Idris.Prelude.Types.Right', E1698} -> (fun (V8372) -> begin (V8373 = (('un--nfToCFType'(V0, V8307, 0, V8372))(V8369))), case V8373 of {'Idris.Prelude.Types.Left', E1699} -> (fun (V8374) -> {'Idris.Prelude.Types.Left', V8374} end(E1699)); {'Idris.Prelude.Types.Right', E1700} -> (fun (V8375) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V8367, V8375}} end(E1700)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1698)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1695, E1696)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V8365))(V8312))), case V8376 of {'Idris.Prelude.Types.Left', E1701} -> (fun (V8377) -> {'Idris.Prelude.Types.Left', V8377} end(E1701)); {'Idris.Prelude.Types.Right', E1702} -> (fun (V8378) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V8364, V8378}} end(E1702)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1693, E1694)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1703} -> (fun (V8379) -> begin (V8380 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8343, V8379))(V8312))), case V8380 of {'Idris.Prelude.Types.Left', E1704} -> (fun (V8381) -> {'Idris.Prelude.Types.Left', V8381} end(E1704)); {'Idris.Prelude.Types.Right', E1705} -> (fun (V8382) -> begin (V8383 = (('un--nfToCFType'(V0, V8307, V2, V8382))(V8312))), case V8383 of {'Idris.Prelude.Types.Left', E1706} -> (fun (V8384) -> {'Idris.Prelude.Types.Left', V8384} end(E1706)); {'Idris.Prelude.Types.Right', E1707} -> (fun (V8385) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V8385}} end(E1707)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1705)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1703)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1686)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1684)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1682)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1676, E1677, E1678, E1679, E1680)); {'Idris.Core.Value.NType', E1708} -> (fun (V8386) -> fun (V8387) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1708)); {'Idris.Core.Value.NErased', E1709, E1710} -> (fun (V8388, V8389) -> fun (V8390) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1709, E1710)); _ -> fun (V8391) -> begin (V8420 = begin (V8419 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V8392) -> fun (V8393) -> fun (V8394) -> fun (V8395) -> fun (V8396) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V8394, V8395, V8396)) end end end end end, fun (V8397) -> fun (V8398) -> fun (V8399) -> V8398 end end end, fun (V8400) -> fun (V8401) -> fun (V8402) -> fun (V8403) -> fun (V8404) -> begin (V8405 = (V8402(V8404))), begin (V8406 = (V8403(V8404))), (V8405(V8406)) end end end end end end end}, fun (V8407) -> fun (V8408) -> fun (V8409) -> fun (V8410) -> fun (V8411) -> begin (V8412 = (V8409(V8411))), ((V8410(V8412))(V8411)) end end end end end end, fun (V8413) -> fun (V8414) -> fun (V8415) -> begin (V8416 = (V8414(V8415))), (V8416(V8415)) end end end end}, fun (V8417) -> fun (V8418) -> V8418 end end}, V0))(V8391))), {'Idris.Prelude.Types.Right', V8419} end), case V8420 of {'Idris.Prelude.Types.Left', E1670} -> (fun (V8421) -> {'Idris.Prelude.Types.Left', V8421} end(E1670)); {'Idris.Prelude.Types.Right', E1671} -> (fun (V8422) -> begin (V8423 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V8422, {'Idris.Core.Env.Nil'}, V3, V8391))), case V8423 of {'Idris.Prelude.Types.Left', E1672} -> (fun (V8424) -> {'Idris.Prelude.Types.Left', V8424} end(E1672)); {'Idris.Prelude.Types.Right', E1673} -> (fun (V8425) -> begin (V8430 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V8426) -> fun (V8427) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V8426, V8427)) end end, fun (V8428) -> fun (V8429) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V8428, V8429)) end end}, V8425, V8391))), case V8430 of {'Idris.Prelude.Types.Left', E1674} -> (fun (V8431) -> {'Idris.Prelude.Types.Left', V8431} end(E1674)); {'Idris.Prelude.Types.Right', E1675} -> (fun (V8432) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V8432))))}, V8391)) end(E1675)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1673)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1671)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end(E1668, E1669)); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E1566, E1567, E1568, E1569} -> (fun (V8433, V8434, V8435, V8436) -> case V8435 of {'Idris.Core.TT.Pi', E1611, E1612, E1613, E1614} -> (fun (V8437, V8438, V8439, V8440) -> fun (V8441) -> begin (V8470 = begin (V8469 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V8442) -> fun (V8443) -> fun (V8444) -> fun (V8445) -> fun (V8446) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V8444, V8445, V8446)) end end end end end, fun (V8447) -> fun (V8448) -> fun (V8449) -> V8448 end end end, fun (V8450) -> fun (V8451) -> fun (V8452) -> fun (V8453) -> fun (V8454) -> begin (V8455 = (V8452(V8454))), begin (V8456 = (V8453(V8454))), (V8455(V8456)) end end end end end end end}, fun (V8457) -> fun (V8458) -> fun (V8459) -> fun (V8460) -> fun (V8461) -> begin (V8462 = (V8459(V8461))), ((V8460(V8462))(V8461)) end end end end end end, fun (V8463) -> fun (V8464) -> fun (V8465) -> begin (V8466 = (V8464(V8465))), (V8466(V8465)) end end end end}, fun (V8467) -> fun (V8468) -> V8468 end end}, V0))(V8441))), {'Idris.Prelude.Types.Right', V8469} end), case V8470 of {'Idris.Prelude.Types.Left', E1615} -> (fun (V8471) -> {'Idris.Prelude.Types.Left', V8471} end(E1615)); {'Idris.Prelude.Types.Right', E1616} -> (fun (V8472) -> begin (V8473 = (('un--nfToCFType'(V0, V8433, 1, V8440))(V8441))), case V8473 of {'Idris.Prelude.Types.Left', E1617} -> (fun (V8474) -> {'Idris.Prelude.Types.Left', V8474} end(E1617)); {'Idris.Prelude.Types.Right', E1618} -> (fun (V8475) -> begin (V8476 = (((V8436(V8472))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V8433, 1}))))(V8441))), case V8476 of {'Idris.Prelude.Types.Left', E1619} -> (fun (V8477) -> {'Idris.Prelude.Types.Left', V8477} end(E1619)); {'Idris.Prelude.Types.Right', E1620} -> (fun (V8478) -> begin (V8479 = (('un--nfToCFType'(V0, V8433, 1, V8478))(V8441))), case V8479 of {'Idris.Prelude.Types.Left', E1621} -> (fun (V8480) -> {'Idris.Prelude.Types.Left', V8480} end(E1621)); {'Idris.Prelude.Types.Right', E1622} -> (fun (V8481) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V8475, V8481}} end(E1622)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1620)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1618)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1616)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1611, E1612, E1613, E1614)); _ -> case V3 of {'Idris.Core.Value.NTCon', E1576, E1577, E1578, E1579, E1580} -> (fun (V8482, V8483, V8484, V8485, V8486) -> fun (V8487) -> begin (V8516 = begin (V8515 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V8488) -> fun (V8489) -> fun (V8490) -> fun (V8491) -> fun (V8492) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V8490, V8491, V8492)) end end end end end, fun (V8493) -> fun (V8494) -> fun (V8495) -> V8494 end end end, fun (V8496) -> fun (V8497) -> fun (V8498) -> fun (V8499) -> fun (V8500) -> begin (V8501 = (V8498(V8500))), begin (V8502 = (V8499(V8500))), (V8501(V8502)) end end end end end end end}, fun (V8503) -> fun (V8504) -> fun (V8505) -> fun (V8506) -> fun (V8507) -> begin (V8508 = (V8505(V8507))), ((V8506(V8508))(V8507)) end end end end end end, fun (V8509) -> fun (V8510) -> fun (V8511) -> begin (V8512 = (V8510(V8511))), (V8512(V8511)) end end end end}, fun (V8513) -> fun (V8514) -> V8514 end end}, V0))(V8487))), {'Idris.Prelude.Types.Right', V8515} end), case V8516 of {'Idris.Prelude.Types.Left', E1581} -> (fun (V8517) -> {'Idris.Prelude.Types.Left', V8517} end(E1581)); {'Idris.Prelude.Types.Right', E1582} -> (fun (V8518) -> begin (V8523 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V8519) -> fun (V8520) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V8519, V8520)) end end, fun (V8521) -> fun (V8522) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V8521, V8522)) end end}, V8483, V8487))), case V8523 of {'Idris.Prelude.Types.Left', E1583} -> (fun (V8524) -> {'Idris.Prelude.Types.Left', V8524} end(E1583)); {'Idris.Prelude.Types.Right', E1584} -> (fun (V8525) -> begin (V8526 = (('un--getNArgs'(V0, V8518, V8525, V8486))(V8487))), case V8526 of {'Idris.Prelude.Types.Left', E1585} -> (fun (V8527) -> {'Idris.Prelude.Types.Left', V8527} end(E1585)); {'Idris.Prelude.Types.Right', E1586} -> (fun (V8528) -> case V8528 of {'Idris.Compiler.CompileExpr.User', E1587, E1588} -> (fun (V8529, V8530) -> begin (V8532 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8531) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8518, V8531)) end, V8530))(V8487))), case V8532 of {'Idris.Prelude.Types.Left', E1589} -> (fun (V8533) -> {'Idris.Prelude.Types.Left', V8533} end(E1589)); {'Idris.Prelude.Types.Right', E1590} -> (fun (V8534) -> begin (V8536 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8535) -> ('un--nfToCFType'(V0, V8482, V2, V8535)) end, V8534))(V8487))), case V8536 of {'Idris.Prelude.Types.Left', E1591} -> (fun (V8537) -> {'Idris.Prelude.Types.Left', V8537} end(E1591)); {'Idris.Prelude.Types.Right', E1592} -> (fun (V8538) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V8525, V8538}} end(E1592)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1590)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1587, E1588)); {'Idris.Compiler.CompileExpr.Struct', E1593, E1594} -> (fun (V8539, V8540) -> begin (V8551 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8541) -> case V8541 of {'Idris.Builtin.MkPair', E1595, E1596} -> (fun (V8542, V8543) -> fun (V8544) -> begin (V8545 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8518, V8543))(V8544))), case V8545 of {'Idris.Prelude.Types.Left', E1597} -> (fun (V8546) -> {'Idris.Prelude.Types.Left', V8546} end(E1597)); {'Idris.Prelude.Types.Right', E1598} -> (fun (V8547) -> begin (V8548 = (('un--nfToCFType'(V0, V8482, 0, V8547))(V8544))), case V8548 of {'Idris.Prelude.Types.Left', E1599} -> (fun (V8549) -> {'Idris.Prelude.Types.Left', V8549} end(E1599)); {'Idris.Prelude.Types.Right', E1600} -> (fun (V8550) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V8542, V8550}} end(E1600)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1598)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1595, E1596)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V8540))(V8487))), case V8551 of {'Idris.Prelude.Types.Left', E1601} -> (fun (V8552) -> {'Idris.Prelude.Types.Left', V8552} end(E1601)); {'Idris.Prelude.Types.Right', E1602} -> (fun (V8553) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V8539, V8553}} end(E1602)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1593, E1594)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1603} -> (fun (V8554) -> begin (V8555 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8518, V8554))(V8487))), case V8555 of {'Idris.Prelude.Types.Left', E1604} -> (fun (V8556) -> {'Idris.Prelude.Types.Left', V8556} end(E1604)); {'Idris.Prelude.Types.Right', E1605} -> (fun (V8557) -> begin (V8558 = (('un--nfToCFType'(V0, V8482, V2, V8557))(V8487))), case V8558 of {'Idris.Prelude.Types.Left', E1606} -> (fun (V8559) -> {'Idris.Prelude.Types.Left', V8559} end(E1606)); {'Idris.Prelude.Types.Right', E1607} -> (fun (V8560) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V8560}} end(E1607)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1605)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1603)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1586)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1584)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1582)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1576, E1577, E1578, E1579, E1580)); {'Idris.Core.Value.NType', E1608} -> (fun (V8561) -> fun (V8562) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1608)); {'Idris.Core.Value.NErased', E1609, E1610} -> (fun (V8563, V8564) -> fun (V8565) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1609, E1610)); _ -> fun (V8566) -> begin (V8595 = begin (V8594 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V8567) -> fun (V8568) -> fun (V8569) -> fun (V8570) -> fun (V8571) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V8569, V8570, V8571)) end end end end end, fun (V8572) -> fun (V8573) -> fun (V8574) -> V8573 end end end, fun (V8575) -> fun (V8576) -> fun (V8577) -> fun (V8578) -> fun (V8579) -> begin (V8580 = (V8577(V8579))), begin (V8581 = (V8578(V8579))), (V8580(V8581)) end end end end end end end}, fun (V8582) -> fun (V8583) -> fun (V8584) -> fun (V8585) -> fun (V8586) -> begin (V8587 = (V8584(V8586))), ((V8585(V8587))(V8586)) end end end end end end, fun (V8588) -> fun (V8589) -> fun (V8590) -> begin (V8591 = (V8589(V8590))), (V8591(V8590)) end end end end}, fun (V8592) -> fun (V8593) -> V8593 end end}, V0))(V8566))), {'Idris.Prelude.Types.Right', V8594} end), case V8595 of {'Idris.Prelude.Types.Left', E1570} -> (fun (V8596) -> {'Idris.Prelude.Types.Left', V8596} end(E1570)); {'Idris.Prelude.Types.Right', E1571} -> (fun (V8597) -> begin (V8598 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V8597, {'Idris.Core.Env.Nil'}, V3, V8566))), case V8598 of {'Idris.Prelude.Types.Left', E1572} -> (fun (V8599) -> {'Idris.Prelude.Types.Left', V8599} end(E1572)); {'Idris.Prelude.Types.Right', E1573} -> (fun (V8600) -> begin (V8605 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V8601) -> fun (V8602) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V8601, V8602)) end end, fun (V8603) -> fun (V8604) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V8603, V8604)) end end}, V8600, V8566))), case V8605 of {'Idris.Prelude.Types.Left', E1574} -> (fun (V8606) -> {'Idris.Prelude.Types.Left', V8606} end(E1574)); {'Idris.Prelude.Types.Right', E1575} -> (fun (V8607) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V8607))))}, V8566)) end(E1575)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1573)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1571)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E1566, E1567, E1568, E1569)); _ -> case V3 of {'Idris.Core.Value.NTCon', E1531, E1532, E1533, E1534, E1535} -> (fun (V8608, V8609, V8610, V8611, V8612) -> fun (V8613) -> begin (V8642 = begin (V8641 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V8614) -> fun (V8615) -> fun (V8616) -> fun (V8617) -> fun (V8618) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V8616, V8617, V8618)) end end end end end, fun (V8619) -> fun (V8620) -> fun (V8621) -> V8620 end end end, fun (V8622) -> fun (V8623) -> fun (V8624) -> fun (V8625) -> fun (V8626) -> begin (V8627 = (V8624(V8626))), begin (V8628 = (V8625(V8626))), (V8627(V8628)) end end end end end end end}, fun (V8629) -> fun (V8630) -> fun (V8631) -> fun (V8632) -> fun (V8633) -> begin (V8634 = (V8631(V8633))), ((V8632(V8634))(V8633)) end end end end end end, fun (V8635) -> fun (V8636) -> fun (V8637) -> begin (V8638 = (V8636(V8637))), (V8638(V8637)) end end end end}, fun (V8639) -> fun (V8640) -> V8640 end end}, V0))(V8613))), {'Idris.Prelude.Types.Right', V8641} end), case V8642 of {'Idris.Prelude.Types.Left', E1536} -> (fun (V8643) -> {'Idris.Prelude.Types.Left', V8643} end(E1536)); {'Idris.Prelude.Types.Right', E1537} -> (fun (V8644) -> begin (V8649 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V8645) -> fun (V8646) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V8645, V8646)) end end, fun (V8647) -> fun (V8648) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V8647, V8648)) end end}, V8609, V8613))), case V8649 of {'Idris.Prelude.Types.Left', E1538} -> (fun (V8650) -> {'Idris.Prelude.Types.Left', V8650} end(E1538)); {'Idris.Prelude.Types.Right', E1539} -> (fun (V8651) -> begin (V8652 = (('un--getNArgs'(V0, V8644, V8651, V8612))(V8613))), case V8652 of {'Idris.Prelude.Types.Left', E1540} -> (fun (V8653) -> {'Idris.Prelude.Types.Left', V8653} end(E1540)); {'Idris.Prelude.Types.Right', E1541} -> (fun (V8654) -> case V8654 of {'Idris.Compiler.CompileExpr.User', E1542, E1543} -> (fun (V8655, V8656) -> begin (V8658 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8657) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8644, V8657)) end, V8656))(V8613))), case V8658 of {'Idris.Prelude.Types.Left', E1544} -> (fun (V8659) -> {'Idris.Prelude.Types.Left', V8659} end(E1544)); {'Idris.Prelude.Types.Right', E1545} -> (fun (V8660) -> begin (V8662 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8661) -> ('un--nfToCFType'(V0, V8608, V2, V8661)) end, V8660))(V8613))), case V8662 of {'Idris.Prelude.Types.Left', E1546} -> (fun (V8663) -> {'Idris.Prelude.Types.Left', V8663} end(E1546)); {'Idris.Prelude.Types.Right', E1547} -> (fun (V8664) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V8651, V8664}} end(E1547)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1545)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1542, E1543)); {'Idris.Compiler.CompileExpr.Struct', E1548, E1549} -> (fun (V8665, V8666) -> begin (V8677 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8667) -> case V8667 of {'Idris.Builtin.MkPair', E1550, E1551} -> (fun (V8668, V8669) -> fun (V8670) -> begin (V8671 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8644, V8669))(V8670))), case V8671 of {'Idris.Prelude.Types.Left', E1552} -> (fun (V8672) -> {'Idris.Prelude.Types.Left', V8672} end(E1552)); {'Idris.Prelude.Types.Right', E1553} -> (fun (V8673) -> begin (V8674 = (('un--nfToCFType'(V0, V8608, 0, V8673))(V8670))), case V8674 of {'Idris.Prelude.Types.Left', E1554} -> (fun (V8675) -> {'Idris.Prelude.Types.Left', V8675} end(E1554)); {'Idris.Prelude.Types.Right', E1555} -> (fun (V8676) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V8668, V8676}} end(E1555)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1553)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1550, E1551)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V8666))(V8613))), case V8677 of {'Idris.Prelude.Types.Left', E1556} -> (fun (V8678) -> {'Idris.Prelude.Types.Left', V8678} end(E1556)); {'Idris.Prelude.Types.Right', E1557} -> (fun (V8679) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V8665, V8679}} end(E1557)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1548, E1549)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1558} -> (fun (V8680) -> begin (V8681 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8644, V8680))(V8613))), case V8681 of {'Idris.Prelude.Types.Left', E1559} -> (fun (V8682) -> {'Idris.Prelude.Types.Left', V8682} end(E1559)); {'Idris.Prelude.Types.Right', E1560} -> (fun (V8683) -> begin (V8684 = (('un--nfToCFType'(V0, V8608, V2, V8683))(V8613))), case V8684 of {'Idris.Prelude.Types.Left', E1561} -> (fun (V8685) -> {'Idris.Prelude.Types.Left', V8685} end(E1561)); {'Idris.Prelude.Types.Right', E1562} -> (fun (V8686) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V8686}} end(E1562)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1560)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1558)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1541)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1539)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1537)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1531, E1532, E1533, E1534, E1535)); {'Idris.Core.Value.NType', E1563} -> (fun (V8687) -> fun (V8688) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1563)); {'Idris.Core.Value.NErased', E1564, E1565} -> (fun (V8689, V8690) -> fun (V8691) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1564, E1565)); _ -> fun (V8692) -> begin (V8721 = begin (V8720 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V8693) -> fun (V8694) -> fun (V8695) -> fun (V8696) -> fun (V8697) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V8695, V8696, V8697)) end end end end end, fun (V8698) -> fun (V8699) -> fun (V8700) -> V8699 end end end, fun (V8701) -> fun (V8702) -> fun (V8703) -> fun (V8704) -> fun (V8705) -> begin (V8706 = (V8703(V8705))), begin (V8707 = (V8704(V8705))), (V8706(V8707)) end end end end end end end}, fun (V8708) -> fun (V8709) -> fun (V8710) -> fun (V8711) -> fun (V8712) -> begin (V8713 = (V8710(V8712))), ((V8711(V8713))(V8712)) end end end end end end, fun (V8714) -> fun (V8715) -> fun (V8716) -> begin (V8717 = (V8715(V8716))), (V8717(V8716)) end end end end}, fun (V8718) -> fun (V8719) -> V8719 end end}, V0))(V8692))), {'Idris.Prelude.Types.Right', V8720} end), case V8721 of {'Idris.Prelude.Types.Left', E1525} -> (fun (V8722) -> {'Idris.Prelude.Types.Left', V8722} end(E1525)); {'Idris.Prelude.Types.Right', E1526} -> (fun (V8723) -> begin (V8724 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V8723, {'Idris.Core.Env.Nil'}, V3, V8692))), case V8724 of {'Idris.Prelude.Types.Left', E1527} -> (fun (V8725) -> {'Idris.Prelude.Types.Left', V8725} end(E1527)); {'Idris.Prelude.Types.Right', E1528} -> (fun (V8726) -> begin (V8731 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V8727) -> fun (V8728) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V8727, V8728)) end end, fun (V8729) -> fun (V8730) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V8729, V8730)) end end}, V8726, V8692))), case V8731 of {'Idris.Prelude.Types.Left', E1529} -> (fun (V8732) -> {'Idris.Prelude.Types.Left', V8732} end(E1529)); {'Idris.Prelude.Types.Right', E1530} -> (fun (V8733) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V8733))))}, V8692)) end(E1530)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1528)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1526)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E1664, E1665, E1666, E1667} -> (fun (V8734, V8735, V8736, V8737) -> fun (V8738) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V8734, <<"Function types not allowed in a foreign struct"/utf8>>}, V8738)) end end(E1664, E1665, E1666, E1667)); _ -> case V3 of {'Idris.Core.Value.NTCon', E1629, E1630, E1631, E1632, E1633} -> (fun (V8739, V8740, V8741, V8742, V8743) -> fun (V8744) -> begin (V8773 = begin (V8772 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V8745) -> fun (V8746) -> fun (V8747) -> fun (V8748) -> fun (V8749) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V8747, V8748, V8749)) end end end end end, fun (V8750) -> fun (V8751) -> fun (V8752) -> V8751 end end end, fun (V8753) -> fun (V8754) -> fun (V8755) -> fun (V8756) -> fun (V8757) -> begin (V8758 = (V8755(V8757))), begin (V8759 = (V8756(V8757))), (V8758(V8759)) end end end end end end end}, fun (V8760) -> fun (V8761) -> fun (V8762) -> fun (V8763) -> fun (V8764) -> begin (V8765 = (V8762(V8764))), ((V8763(V8765))(V8764)) end end end end end end, fun (V8766) -> fun (V8767) -> fun (V8768) -> begin (V8769 = (V8767(V8768))), (V8769(V8768)) end end end end}, fun (V8770) -> fun (V8771) -> V8771 end end}, V0))(V8744))), {'Idris.Prelude.Types.Right', V8772} end), case V8773 of {'Idris.Prelude.Types.Left', E1634} -> (fun (V8774) -> {'Idris.Prelude.Types.Left', V8774} end(E1634)); {'Idris.Prelude.Types.Right', E1635} -> (fun (V8775) -> begin (V8780 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V8776) -> fun (V8777) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V8776, V8777)) end end, fun (V8778) -> fun (V8779) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V8778, V8779)) end end}, V8740, V8744))), case V8780 of {'Idris.Prelude.Types.Left', E1636} -> (fun (V8781) -> {'Idris.Prelude.Types.Left', V8781} end(E1636)); {'Idris.Prelude.Types.Right', E1637} -> (fun (V8782) -> begin (V8783 = (('un--getNArgs'(V0, V8775, V8782, V8743))(V8744))), case V8783 of {'Idris.Prelude.Types.Left', E1638} -> (fun (V8784) -> {'Idris.Prelude.Types.Left', V8784} end(E1638)); {'Idris.Prelude.Types.Right', E1639} -> (fun (V8785) -> case V8785 of {'Idris.Compiler.CompileExpr.User', E1640, E1641} -> (fun (V8786, V8787) -> begin (V8789 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8788) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8775, V8788)) end, V8787))(V8744))), case V8789 of {'Idris.Prelude.Types.Left', E1642} -> (fun (V8790) -> {'Idris.Prelude.Types.Left', V8790} end(E1642)); {'Idris.Prelude.Types.Right', E1643} -> (fun (V8791) -> begin (V8793 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8792) -> ('un--nfToCFType'(V0, V8739, V2, V8792)) end, V8791))(V8744))), case V8793 of {'Idris.Prelude.Types.Left', E1644} -> (fun (V8794) -> {'Idris.Prelude.Types.Left', V8794} end(E1644)); {'Idris.Prelude.Types.Right', E1645} -> (fun (V8795) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V8782, V8795}} end(E1645)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1643)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1640, E1641)); {'Idris.Compiler.CompileExpr.Struct', E1646, E1647} -> (fun (V8796, V8797) -> begin (V8808 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8798) -> case V8798 of {'Idris.Builtin.MkPair', E1648, E1649} -> (fun (V8799, V8800) -> fun (V8801) -> begin (V8802 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8775, V8800))(V8801))), case V8802 of {'Idris.Prelude.Types.Left', E1650} -> (fun (V8803) -> {'Idris.Prelude.Types.Left', V8803} end(E1650)); {'Idris.Prelude.Types.Right', E1651} -> (fun (V8804) -> begin (V8805 = (('un--nfToCFType'(V0, V8739, 0, V8804))(V8801))), case V8805 of {'Idris.Prelude.Types.Left', E1652} -> (fun (V8806) -> {'Idris.Prelude.Types.Left', V8806} end(E1652)); {'Idris.Prelude.Types.Right', E1653} -> (fun (V8807) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V8799, V8807}} end(E1653)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1651)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1648, E1649)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V8797))(V8744))), case V8808 of {'Idris.Prelude.Types.Left', E1654} -> (fun (V8809) -> {'Idris.Prelude.Types.Left', V8809} end(E1654)); {'Idris.Prelude.Types.Right', E1655} -> (fun (V8810) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V8796, V8810}} end(E1655)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1646, E1647)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1656} -> (fun (V8811) -> begin (V8812 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8775, V8811))(V8744))), case V8812 of {'Idris.Prelude.Types.Left', E1657} -> (fun (V8813) -> {'Idris.Prelude.Types.Left', V8813} end(E1657)); {'Idris.Prelude.Types.Right', E1658} -> (fun (V8814) -> begin (V8815 = (('un--nfToCFType'(V0, V8739, V2, V8814))(V8744))), case V8815 of {'Idris.Prelude.Types.Left', E1659} -> (fun (V8816) -> {'Idris.Prelude.Types.Left', V8816} end(E1659)); {'Idris.Prelude.Types.Right', E1660} -> (fun (V8817) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V8817}} end(E1660)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1658)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1656)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1639)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1637)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1635)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1629, E1630, E1631, E1632, E1633)); {'Idris.Core.Value.NType', E1661} -> (fun (V8818) -> fun (V8819) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1661)); {'Idris.Core.Value.NErased', E1662, E1663} -> (fun (V8820, V8821) -> fun (V8822) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1662, E1663)); _ -> fun (V8823) -> begin (V8852 = begin (V8851 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V8824) -> fun (V8825) -> fun (V8826) -> fun (V8827) -> fun (V8828) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V8826, V8827, V8828)) end end end end end, fun (V8829) -> fun (V8830) -> fun (V8831) -> V8830 end end end, fun (V8832) -> fun (V8833) -> fun (V8834) -> fun (V8835) -> fun (V8836) -> begin (V8837 = (V8834(V8836))), begin (V8838 = (V8835(V8836))), (V8837(V8838)) end end end end end end end}, fun (V8839) -> fun (V8840) -> fun (V8841) -> fun (V8842) -> fun (V8843) -> begin (V8844 = (V8841(V8843))), ((V8842(V8844))(V8843)) end end end end end end, fun (V8845) -> fun (V8846) -> fun (V8847) -> begin (V8848 = (V8846(V8847))), (V8848(V8847)) end end end end}, fun (V8849) -> fun (V8850) -> V8850 end end}, V0))(V8823))), {'Idris.Prelude.Types.Right', V8851} end), case V8852 of {'Idris.Prelude.Types.Left', E1623} -> (fun (V8853) -> {'Idris.Prelude.Types.Left', V8853} end(E1623)); {'Idris.Prelude.Types.Right', E1624} -> (fun (V8854) -> begin (V8855 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V8854, {'Idris.Core.Env.Nil'}, V3, V8823))), case V8855 of {'Idris.Prelude.Types.Left', E1625} -> (fun (V8856) -> {'Idris.Prelude.Types.Left', V8856} end(E1625)); {'Idris.Prelude.Types.Right', E1626} -> (fun (V8857) -> begin (V8862 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V8858) -> fun (V8859) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V8858, V8859)) end end, fun (V8860) -> fun (V8861) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V8860, V8861)) end end}, V8857, V8823))), case V8862 of {'Idris.Prelude.Types.Left', E1627} -> (fun (V8863) -> {'Idris.Prelude.Types.Left', V8863} end(E1627)); {'Idris.Prelude.Types.Right', E1628} -> (fun (V8864) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V8864))))}, V8823)) end(E1628)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1626)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1624)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E1490, E1491, E1492, E1493, E1494} -> (fun (V8865, V8866, V8867, V8868, V8869) -> fun (V8870) -> begin (V8899 = begin (V8898 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V8871) -> fun (V8872) -> fun (V8873) -> fun (V8874) -> fun (V8875) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V8873, V8874, V8875)) end end end end end, fun (V8876) -> fun (V8877) -> fun (V8878) -> V8877 end end end, fun (V8879) -> fun (V8880) -> fun (V8881) -> fun (V8882) -> fun (V8883) -> begin (V8884 = (V8881(V8883))), begin (V8885 = (V8882(V8883))), (V8884(V8885)) end end end end end end end}, fun (V8886) -> fun (V8887) -> fun (V8888) -> fun (V8889) -> fun (V8890) -> begin (V8891 = (V8888(V8890))), ((V8889(V8891))(V8890)) end end end end end end, fun (V8892) -> fun (V8893) -> fun (V8894) -> begin (V8895 = (V8893(V8894))), (V8895(V8894)) end end end end}, fun (V8896) -> fun (V8897) -> V8897 end end}, V0))(V8870))), {'Idris.Prelude.Types.Right', V8898} end), case V8899 of {'Idris.Prelude.Types.Left', E1495} -> (fun (V8900) -> {'Idris.Prelude.Types.Left', V8900} end(E1495)); {'Idris.Prelude.Types.Right', E1496} -> (fun (V8901) -> begin (V8906 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V8902) -> fun (V8903) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V8902, V8903)) end end, fun (V8904) -> fun (V8905) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V8904, V8905)) end end}, V8866, V8870))), case V8906 of {'Idris.Prelude.Types.Left', E1497} -> (fun (V8907) -> {'Idris.Prelude.Types.Left', V8907} end(E1497)); {'Idris.Prelude.Types.Right', E1498} -> (fun (V8908) -> begin (V8909 = (('un--getNArgs'(V0, V8901, V8908, V8869))(V8870))), case V8909 of {'Idris.Prelude.Types.Left', E1499} -> (fun (V8910) -> {'Idris.Prelude.Types.Left', V8910} end(E1499)); {'Idris.Prelude.Types.Right', E1500} -> (fun (V8911) -> case V8911 of {'Idris.Compiler.CompileExpr.User', E1501, E1502} -> (fun (V8912, V8913) -> begin (V8915 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8914) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8901, V8914)) end, V8913))(V8870))), case V8915 of {'Idris.Prelude.Types.Left', E1503} -> (fun (V8916) -> {'Idris.Prelude.Types.Left', V8916} end(E1503)); {'Idris.Prelude.Types.Right', E1504} -> (fun (V8917) -> begin (V8919 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8918) -> ('un--nfToCFType'(V0, V8865, V2, V8918)) end, V8917))(V8870))), case V8919 of {'Idris.Prelude.Types.Left', E1505} -> (fun (V8920) -> {'Idris.Prelude.Types.Left', V8920} end(E1505)); {'Idris.Prelude.Types.Right', E1506} -> (fun (V8921) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V8908, V8921}} end(E1506)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1504)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1501, E1502)); {'Idris.Compiler.CompileExpr.Struct', E1507, E1508} -> (fun (V8922, V8923) -> begin (V8934 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V8924) -> case V8924 of {'Idris.Builtin.MkPair', E1509, E1510} -> (fun (V8925, V8926) -> fun (V8927) -> begin (V8928 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8901, V8926))(V8927))), case V8928 of {'Idris.Prelude.Types.Left', E1511} -> (fun (V8929) -> {'Idris.Prelude.Types.Left', V8929} end(E1511)); {'Idris.Prelude.Types.Right', E1512} -> (fun (V8930) -> begin (V8931 = (('un--nfToCFType'(V0, V8865, 0, V8930))(V8927))), case V8931 of {'Idris.Prelude.Types.Left', E1513} -> (fun (V8932) -> {'Idris.Prelude.Types.Left', V8932} end(E1513)); {'Idris.Prelude.Types.Right', E1514} -> (fun (V8933) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V8925, V8933}} end(E1514)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1512)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1509, E1510)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V8923))(V8870))), case V8934 of {'Idris.Prelude.Types.Left', E1515} -> (fun (V8935) -> {'Idris.Prelude.Types.Left', V8935} end(E1515)); {'Idris.Prelude.Types.Right', E1516} -> (fun (V8936) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V8922, V8936}} end(E1516)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1507, E1508)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1517} -> (fun (V8937) -> begin (V8938 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V8901, V8937))(V8870))), case V8938 of {'Idris.Prelude.Types.Left', E1518} -> (fun (V8939) -> {'Idris.Prelude.Types.Left', V8939} end(E1518)); {'Idris.Prelude.Types.Right', E1519} -> (fun (V8940) -> begin (V8941 = (('un--nfToCFType'(V0, V8865, V2, V8940))(V8870))), case V8941 of {'Idris.Prelude.Types.Left', E1520} -> (fun (V8942) -> {'Idris.Prelude.Types.Left', V8942} end(E1520)); {'Idris.Prelude.Types.Right', E1521} -> (fun (V8943) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V8943}} end(E1521)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1519)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1517)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1500)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1498)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1496)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1490, E1491, E1492, E1493, E1494)); {'Idris.Core.Value.NType', E1522} -> (fun (V8944) -> fun (V8945) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1522)); {'Idris.Core.Value.NErased', E1523, E1524} -> (fun (V8946, V8947) -> fun (V8948) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1523, E1524)); _ -> fun (V8949) -> begin (V8978 = begin (V8977 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V8950) -> fun (V8951) -> fun (V8952) -> fun (V8953) -> fun (V8954) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V8952, V8953, V8954)) end end end end end, fun (V8955) -> fun (V8956) -> fun (V8957) -> V8956 end end end, fun (V8958) -> fun (V8959) -> fun (V8960) -> fun (V8961) -> fun (V8962) -> begin (V8963 = (V8960(V8962))), begin (V8964 = (V8961(V8962))), (V8963(V8964)) end end end end end end end}, fun (V8965) -> fun (V8966) -> fun (V8967) -> fun (V8968) -> fun (V8969) -> begin (V8970 = (V8967(V8969))), ((V8968(V8970))(V8969)) end end end end end end, fun (V8971) -> fun (V8972) -> fun (V8973) -> begin (V8974 = (V8972(V8973))), (V8974(V8973)) end end end end}, fun (V8975) -> fun (V8976) -> V8976 end end}, V0))(V8949))), {'Idris.Prelude.Types.Right', V8977} end), case V8978 of {'Idris.Prelude.Types.Left', E1484} -> (fun (V8979) -> {'Idris.Prelude.Types.Left', V8979} end(E1484)); {'Idris.Prelude.Types.Right', E1485} -> (fun (V8980) -> begin (V8981 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V8980, {'Idris.Core.Env.Nil'}, V3, V8949))), case V8981 of {'Idris.Prelude.Types.Left', E1486} -> (fun (V8982) -> {'Idris.Prelude.Types.Left', V8982} end(E1486)); {'Idris.Prelude.Types.Right', E1487} -> (fun (V8983) -> begin (V8988 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V8984) -> fun (V8985) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V8984, V8985)) end end, fun (V8986) -> fun (V8987) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V8986, V8987)) end end}, V8983, V8949))), case V8988 of {'Idris.Prelude.Types.Left', E1488} -> (fun (V8989) -> {'Idris.Prelude.Types.Left', V8989} end(E1488)); {'Idris.Prelude.Types.Right', E1489} -> (fun (V8990) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V8990))))}, V8949)) end(E1489)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1487)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1485)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end end(E1482, E1483)); _ -> case V3 of {'Idris.Core.Value.NPrimVal', E1296, E1297} -> (fun (V8991, V8992) -> case V8992 of {'Idris.Core.TT.DoubleType'} -> (fun () -> fun (V8993) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFDouble'}} end end()); {'Idris.Core.TT.CharType'} -> (fun () -> fun (V8994) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFChar'}} end end()); {'Idris.Core.TT.WorldType'} -> (fun () -> fun (V8995) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFWorld'}} end end()); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E1380, E1381, E1382, E1383} -> (fun (V8996, V8997, V8998, V8999) -> case V8998 of {'Idris.Core.TT.Pi', E1425, E1426, E1427, E1428} -> (fun (V9000, V9001, V9002, V9003) -> fun (V9004) -> begin (V9033 = begin (V9032 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9005) -> fun (V9006) -> fun (V9007) -> fun (V9008) -> fun (V9009) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9007, V9008, V9009)) end end end end end, fun (V9010) -> fun (V9011) -> fun (V9012) -> V9011 end end end, fun (V9013) -> fun (V9014) -> fun (V9015) -> fun (V9016) -> fun (V9017) -> begin (V9018 = (V9015(V9017))), begin (V9019 = (V9016(V9017))), (V9018(V9019)) end end end end end end end}, fun (V9020) -> fun (V9021) -> fun (V9022) -> fun (V9023) -> fun (V9024) -> begin (V9025 = (V9022(V9024))), ((V9023(V9025))(V9024)) end end end end end end, fun (V9026) -> fun (V9027) -> fun (V9028) -> begin (V9029 = (V9027(V9028))), (V9029(V9028)) end end end end}, fun (V9030) -> fun (V9031) -> V9031 end end}, V0))(V9004))), {'Idris.Prelude.Types.Right', V9032} end), case V9033 of {'Idris.Prelude.Types.Left', E1429} -> (fun (V9034) -> {'Idris.Prelude.Types.Left', V9034} end(E1429)); {'Idris.Prelude.Types.Right', E1430} -> (fun (V9035) -> begin (V9036 = (('un--nfToCFType'(V0, V8996, 1, V9003))(V9004))), case V9036 of {'Idris.Prelude.Types.Left', E1431} -> (fun (V9037) -> {'Idris.Prelude.Types.Left', V9037} end(E1431)); {'Idris.Prelude.Types.Right', E1432} -> (fun (V9038) -> begin (V9039 = (((V8999(V9035))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V8996, 1}))))(V9004))), case V9039 of {'Idris.Prelude.Types.Left', E1433} -> (fun (V9040) -> {'Idris.Prelude.Types.Left', V9040} end(E1433)); {'Idris.Prelude.Types.Right', E1434} -> (fun (V9041) -> begin (V9042 = (('un--nfToCFType'(V0, V8996, 1, V9041))(V9004))), case V9042 of {'Idris.Prelude.Types.Left', E1435} -> (fun (V9043) -> {'Idris.Prelude.Types.Left', V9043} end(E1435)); {'Idris.Prelude.Types.Right', E1436} -> (fun (V9044) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V9038, V9044}} end(E1436)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1434)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1432)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1430)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1425, E1426, E1427, E1428)); _ -> case V3 of {'Idris.Core.Value.NTCon', E1390, E1391, E1392, E1393, E1394} -> (fun (V9045, V9046, V9047, V9048, V9049) -> fun (V9050) -> begin (V9079 = begin (V9078 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9051) -> fun (V9052) -> fun (V9053) -> fun (V9054) -> fun (V9055) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9053, V9054, V9055)) end end end end end, fun (V9056) -> fun (V9057) -> fun (V9058) -> V9057 end end end, fun (V9059) -> fun (V9060) -> fun (V9061) -> fun (V9062) -> fun (V9063) -> begin (V9064 = (V9061(V9063))), begin (V9065 = (V9062(V9063))), (V9064(V9065)) end end end end end end end}, fun (V9066) -> fun (V9067) -> fun (V9068) -> fun (V9069) -> fun (V9070) -> begin (V9071 = (V9068(V9070))), ((V9069(V9071))(V9070)) end end end end end end, fun (V9072) -> fun (V9073) -> fun (V9074) -> begin (V9075 = (V9073(V9074))), (V9075(V9074)) end end end end}, fun (V9076) -> fun (V9077) -> V9077 end end}, V0))(V9050))), {'Idris.Prelude.Types.Right', V9078} end), case V9079 of {'Idris.Prelude.Types.Left', E1395} -> (fun (V9080) -> {'Idris.Prelude.Types.Left', V9080} end(E1395)); {'Idris.Prelude.Types.Right', E1396} -> (fun (V9081) -> begin (V9086 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V9082) -> fun (V9083) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V9082, V9083)) end end, fun (V9084) -> fun (V9085) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V9084, V9085)) end end}, V9046, V9050))), case V9086 of {'Idris.Prelude.Types.Left', E1397} -> (fun (V9087) -> {'Idris.Prelude.Types.Left', V9087} end(E1397)); {'Idris.Prelude.Types.Right', E1398} -> (fun (V9088) -> begin (V9089 = (('un--getNArgs'(V0, V9081, V9088, V9049))(V9050))), case V9089 of {'Idris.Prelude.Types.Left', E1399} -> (fun (V9090) -> {'Idris.Prelude.Types.Left', V9090} end(E1399)); {'Idris.Prelude.Types.Right', E1400} -> (fun (V9091) -> case V9091 of {'Idris.Compiler.CompileExpr.User', E1401, E1402} -> (fun (V9092, V9093) -> begin (V9095 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9094) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9081, V9094)) end, V9093))(V9050))), case V9095 of {'Idris.Prelude.Types.Left', E1403} -> (fun (V9096) -> {'Idris.Prelude.Types.Left', V9096} end(E1403)); {'Idris.Prelude.Types.Right', E1404} -> (fun (V9097) -> begin (V9099 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9098) -> ('un--nfToCFType'(V0, V9045, V2, V9098)) end, V9097))(V9050))), case V9099 of {'Idris.Prelude.Types.Left', E1405} -> (fun (V9100) -> {'Idris.Prelude.Types.Left', V9100} end(E1405)); {'Idris.Prelude.Types.Right', E1406} -> (fun (V9101) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V9088, V9101}} end(E1406)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1404)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1401, E1402)); {'Idris.Compiler.CompileExpr.Struct', E1407, E1408} -> (fun (V9102, V9103) -> begin (V9114 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9104) -> case V9104 of {'Idris.Builtin.MkPair', E1409, E1410} -> (fun (V9105, V9106) -> fun (V9107) -> begin (V9108 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9081, V9106))(V9107))), case V9108 of {'Idris.Prelude.Types.Left', E1411} -> (fun (V9109) -> {'Idris.Prelude.Types.Left', V9109} end(E1411)); {'Idris.Prelude.Types.Right', E1412} -> (fun (V9110) -> begin (V9111 = (('un--nfToCFType'(V0, V9045, 0, V9110))(V9107))), case V9111 of {'Idris.Prelude.Types.Left', E1413} -> (fun (V9112) -> {'Idris.Prelude.Types.Left', V9112} end(E1413)); {'Idris.Prelude.Types.Right', E1414} -> (fun (V9113) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V9105, V9113}} end(E1414)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1412)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1409, E1410)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V9103))(V9050))), case V9114 of {'Idris.Prelude.Types.Left', E1415} -> (fun (V9115) -> {'Idris.Prelude.Types.Left', V9115} end(E1415)); {'Idris.Prelude.Types.Right', E1416} -> (fun (V9116) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V9102, V9116}} end(E1416)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1407, E1408)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1417} -> (fun (V9117) -> begin (V9118 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9081, V9117))(V9050))), case V9118 of {'Idris.Prelude.Types.Left', E1418} -> (fun (V9119) -> {'Idris.Prelude.Types.Left', V9119} end(E1418)); {'Idris.Prelude.Types.Right', E1419} -> (fun (V9120) -> begin (V9121 = (('un--nfToCFType'(V0, V9045, V2, V9120))(V9050))), case V9121 of {'Idris.Prelude.Types.Left', E1420} -> (fun (V9122) -> {'Idris.Prelude.Types.Left', V9122} end(E1420)); {'Idris.Prelude.Types.Right', E1421} -> (fun (V9123) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V9123}} end(E1421)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1419)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1417)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1400)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1398)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1396)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1390, E1391, E1392, E1393, E1394)); {'Idris.Core.Value.NType', E1422} -> (fun (V9124) -> fun (V9125) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1422)); {'Idris.Core.Value.NErased', E1423, E1424} -> (fun (V9126, V9127) -> fun (V9128) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1423, E1424)); _ -> fun (V9129) -> begin (V9158 = begin (V9157 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9130) -> fun (V9131) -> fun (V9132) -> fun (V9133) -> fun (V9134) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9132, V9133, V9134)) end end end end end, fun (V9135) -> fun (V9136) -> fun (V9137) -> V9136 end end end, fun (V9138) -> fun (V9139) -> fun (V9140) -> fun (V9141) -> fun (V9142) -> begin (V9143 = (V9140(V9142))), begin (V9144 = (V9141(V9142))), (V9143(V9144)) end end end end end end end}, fun (V9145) -> fun (V9146) -> fun (V9147) -> fun (V9148) -> fun (V9149) -> begin (V9150 = (V9147(V9149))), ((V9148(V9150))(V9149)) end end end end end end, fun (V9151) -> fun (V9152) -> fun (V9153) -> begin (V9154 = (V9152(V9153))), (V9154(V9153)) end end end end}, fun (V9155) -> fun (V9156) -> V9156 end end}, V0))(V9129))), {'Idris.Prelude.Types.Right', V9157} end), case V9158 of {'Idris.Prelude.Types.Left', E1384} -> (fun (V9159) -> {'Idris.Prelude.Types.Left', V9159} end(E1384)); {'Idris.Prelude.Types.Right', E1385} -> (fun (V9160) -> begin (V9161 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V9160, {'Idris.Core.Env.Nil'}, V3, V9129))), case V9161 of {'Idris.Prelude.Types.Left', E1386} -> (fun (V9162) -> {'Idris.Prelude.Types.Left', V9162} end(E1386)); {'Idris.Prelude.Types.Right', E1387} -> (fun (V9163) -> begin (V9168 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V9164) -> fun (V9165) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V9164, V9165)) end end, fun (V9166) -> fun (V9167) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V9166, V9167)) end end}, V9163, V9129))), case V9168 of {'Idris.Prelude.Types.Left', E1388} -> (fun (V9169) -> {'Idris.Prelude.Types.Left', V9169} end(E1388)); {'Idris.Prelude.Types.Right', E1389} -> (fun (V9170) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V9170))))}, V9129)) end(E1389)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1387)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1385)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E1380, E1381, E1382, E1383)); _ -> case V3 of {'Idris.Core.Value.NTCon', E1345, E1346, E1347, E1348, E1349} -> (fun (V9171, V9172, V9173, V9174, V9175) -> fun (V9176) -> begin (V9205 = begin (V9204 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9177) -> fun (V9178) -> fun (V9179) -> fun (V9180) -> fun (V9181) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9179, V9180, V9181)) end end end end end, fun (V9182) -> fun (V9183) -> fun (V9184) -> V9183 end end end, fun (V9185) -> fun (V9186) -> fun (V9187) -> fun (V9188) -> fun (V9189) -> begin (V9190 = (V9187(V9189))), begin (V9191 = (V9188(V9189))), (V9190(V9191)) end end end end end end end}, fun (V9192) -> fun (V9193) -> fun (V9194) -> fun (V9195) -> fun (V9196) -> begin (V9197 = (V9194(V9196))), ((V9195(V9197))(V9196)) end end end end end end, fun (V9198) -> fun (V9199) -> fun (V9200) -> begin (V9201 = (V9199(V9200))), (V9201(V9200)) end end end end}, fun (V9202) -> fun (V9203) -> V9203 end end}, V0))(V9176))), {'Idris.Prelude.Types.Right', V9204} end), case V9205 of {'Idris.Prelude.Types.Left', E1350} -> (fun (V9206) -> {'Idris.Prelude.Types.Left', V9206} end(E1350)); {'Idris.Prelude.Types.Right', E1351} -> (fun (V9207) -> begin (V9212 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V9208) -> fun (V9209) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V9208, V9209)) end end, fun (V9210) -> fun (V9211) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V9210, V9211)) end end}, V9172, V9176))), case V9212 of {'Idris.Prelude.Types.Left', E1352} -> (fun (V9213) -> {'Idris.Prelude.Types.Left', V9213} end(E1352)); {'Idris.Prelude.Types.Right', E1353} -> (fun (V9214) -> begin (V9215 = (('un--getNArgs'(V0, V9207, V9214, V9175))(V9176))), case V9215 of {'Idris.Prelude.Types.Left', E1354} -> (fun (V9216) -> {'Idris.Prelude.Types.Left', V9216} end(E1354)); {'Idris.Prelude.Types.Right', E1355} -> (fun (V9217) -> case V9217 of {'Idris.Compiler.CompileExpr.User', E1356, E1357} -> (fun (V9218, V9219) -> begin (V9221 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9220) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9207, V9220)) end, V9219))(V9176))), case V9221 of {'Idris.Prelude.Types.Left', E1358} -> (fun (V9222) -> {'Idris.Prelude.Types.Left', V9222} end(E1358)); {'Idris.Prelude.Types.Right', E1359} -> (fun (V9223) -> begin (V9225 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9224) -> ('un--nfToCFType'(V0, V9171, V2, V9224)) end, V9223))(V9176))), case V9225 of {'Idris.Prelude.Types.Left', E1360} -> (fun (V9226) -> {'Idris.Prelude.Types.Left', V9226} end(E1360)); {'Idris.Prelude.Types.Right', E1361} -> (fun (V9227) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V9214, V9227}} end(E1361)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1359)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1356, E1357)); {'Idris.Compiler.CompileExpr.Struct', E1362, E1363} -> (fun (V9228, V9229) -> begin (V9240 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9230) -> case V9230 of {'Idris.Builtin.MkPair', E1364, E1365} -> (fun (V9231, V9232) -> fun (V9233) -> begin (V9234 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9207, V9232))(V9233))), case V9234 of {'Idris.Prelude.Types.Left', E1366} -> (fun (V9235) -> {'Idris.Prelude.Types.Left', V9235} end(E1366)); {'Idris.Prelude.Types.Right', E1367} -> (fun (V9236) -> begin (V9237 = (('un--nfToCFType'(V0, V9171, 0, V9236))(V9233))), case V9237 of {'Idris.Prelude.Types.Left', E1368} -> (fun (V9238) -> {'Idris.Prelude.Types.Left', V9238} end(E1368)); {'Idris.Prelude.Types.Right', E1369} -> (fun (V9239) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V9231, V9239}} end(E1369)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1367)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1364, E1365)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V9229))(V9176))), case V9240 of {'Idris.Prelude.Types.Left', E1370} -> (fun (V9241) -> {'Idris.Prelude.Types.Left', V9241} end(E1370)); {'Idris.Prelude.Types.Right', E1371} -> (fun (V9242) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V9228, V9242}} end(E1371)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1362, E1363)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1372} -> (fun (V9243) -> begin (V9244 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9207, V9243))(V9176))), case V9244 of {'Idris.Prelude.Types.Left', E1373} -> (fun (V9245) -> {'Idris.Prelude.Types.Left', V9245} end(E1373)); {'Idris.Prelude.Types.Right', E1374} -> (fun (V9246) -> begin (V9247 = (('un--nfToCFType'(V0, V9171, V2, V9246))(V9176))), case V9247 of {'Idris.Prelude.Types.Left', E1375} -> (fun (V9248) -> {'Idris.Prelude.Types.Left', V9248} end(E1375)); {'Idris.Prelude.Types.Right', E1376} -> (fun (V9249) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V9249}} end(E1376)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1374)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1372)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1355)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1353)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1351)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1345, E1346, E1347, E1348, E1349)); {'Idris.Core.Value.NType', E1377} -> (fun (V9250) -> fun (V9251) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1377)); {'Idris.Core.Value.NErased', E1378, E1379} -> (fun (V9252, V9253) -> fun (V9254) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1378, E1379)); _ -> fun (V9255) -> begin (V9284 = begin (V9283 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9256) -> fun (V9257) -> fun (V9258) -> fun (V9259) -> fun (V9260) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9258, V9259, V9260)) end end end end end, fun (V9261) -> fun (V9262) -> fun (V9263) -> V9262 end end end, fun (V9264) -> fun (V9265) -> fun (V9266) -> fun (V9267) -> fun (V9268) -> begin (V9269 = (V9266(V9268))), begin (V9270 = (V9267(V9268))), (V9269(V9270)) end end end end end end end}, fun (V9271) -> fun (V9272) -> fun (V9273) -> fun (V9274) -> fun (V9275) -> begin (V9276 = (V9273(V9275))), ((V9274(V9276))(V9275)) end end end end end end, fun (V9277) -> fun (V9278) -> fun (V9279) -> begin (V9280 = (V9278(V9279))), (V9280(V9279)) end end end end}, fun (V9281) -> fun (V9282) -> V9282 end end}, V0))(V9255))), {'Idris.Prelude.Types.Right', V9283} end), case V9284 of {'Idris.Prelude.Types.Left', E1339} -> (fun (V9285) -> {'Idris.Prelude.Types.Left', V9285} end(E1339)); {'Idris.Prelude.Types.Right', E1340} -> (fun (V9286) -> begin (V9287 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V9286, {'Idris.Core.Env.Nil'}, V3, V9255))), case V9287 of {'Idris.Prelude.Types.Left', E1341} -> (fun (V9288) -> {'Idris.Prelude.Types.Left', V9288} end(E1341)); {'Idris.Prelude.Types.Right', E1342} -> (fun (V9289) -> begin (V9294 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V9290) -> fun (V9291) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V9290, V9291)) end end, fun (V9292) -> fun (V9293) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V9292, V9293)) end end}, V9289, V9255))), case V9294 of {'Idris.Prelude.Types.Left', E1343} -> (fun (V9295) -> {'Idris.Prelude.Types.Left', V9295} end(E1343)); {'Idris.Prelude.Types.Right', E1344} -> (fun (V9296) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V9296))))}, V9255)) end(E1344)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1342)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1340)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E1478, E1479, E1480, E1481} -> (fun (V9297, V9298, V9299, V9300) -> fun (V9301) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V9297, <<"Function types not allowed in a foreign struct"/utf8>>}, V9301)) end end(E1478, E1479, E1480, E1481)); _ -> case V3 of {'Idris.Core.Value.NTCon', E1443, E1444, E1445, E1446, E1447} -> (fun (V9302, V9303, V9304, V9305, V9306) -> fun (V9307) -> begin (V9336 = begin (V9335 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9308) -> fun (V9309) -> fun (V9310) -> fun (V9311) -> fun (V9312) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9310, V9311, V9312)) end end end end end, fun (V9313) -> fun (V9314) -> fun (V9315) -> V9314 end end end, fun (V9316) -> fun (V9317) -> fun (V9318) -> fun (V9319) -> fun (V9320) -> begin (V9321 = (V9318(V9320))), begin (V9322 = (V9319(V9320))), (V9321(V9322)) end end end end end end end}, fun (V9323) -> fun (V9324) -> fun (V9325) -> fun (V9326) -> fun (V9327) -> begin (V9328 = (V9325(V9327))), ((V9326(V9328))(V9327)) end end end end end end, fun (V9329) -> fun (V9330) -> fun (V9331) -> begin (V9332 = (V9330(V9331))), (V9332(V9331)) end end end end}, fun (V9333) -> fun (V9334) -> V9334 end end}, V0))(V9307))), {'Idris.Prelude.Types.Right', V9335} end), case V9336 of {'Idris.Prelude.Types.Left', E1448} -> (fun (V9337) -> {'Idris.Prelude.Types.Left', V9337} end(E1448)); {'Idris.Prelude.Types.Right', E1449} -> (fun (V9338) -> begin (V9343 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V9339) -> fun (V9340) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V9339, V9340)) end end, fun (V9341) -> fun (V9342) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V9341, V9342)) end end}, V9303, V9307))), case V9343 of {'Idris.Prelude.Types.Left', E1450} -> (fun (V9344) -> {'Idris.Prelude.Types.Left', V9344} end(E1450)); {'Idris.Prelude.Types.Right', E1451} -> (fun (V9345) -> begin (V9346 = (('un--getNArgs'(V0, V9338, V9345, V9306))(V9307))), case V9346 of {'Idris.Prelude.Types.Left', E1452} -> (fun (V9347) -> {'Idris.Prelude.Types.Left', V9347} end(E1452)); {'Idris.Prelude.Types.Right', E1453} -> (fun (V9348) -> case V9348 of {'Idris.Compiler.CompileExpr.User', E1454, E1455} -> (fun (V9349, V9350) -> begin (V9352 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9351) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9338, V9351)) end, V9350))(V9307))), case V9352 of {'Idris.Prelude.Types.Left', E1456} -> (fun (V9353) -> {'Idris.Prelude.Types.Left', V9353} end(E1456)); {'Idris.Prelude.Types.Right', E1457} -> (fun (V9354) -> begin (V9356 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9355) -> ('un--nfToCFType'(V0, V9302, V2, V9355)) end, V9354))(V9307))), case V9356 of {'Idris.Prelude.Types.Left', E1458} -> (fun (V9357) -> {'Idris.Prelude.Types.Left', V9357} end(E1458)); {'Idris.Prelude.Types.Right', E1459} -> (fun (V9358) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V9345, V9358}} end(E1459)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1457)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1454, E1455)); {'Idris.Compiler.CompileExpr.Struct', E1460, E1461} -> (fun (V9359, V9360) -> begin (V9371 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9361) -> case V9361 of {'Idris.Builtin.MkPair', E1462, E1463} -> (fun (V9362, V9363) -> fun (V9364) -> begin (V9365 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9338, V9363))(V9364))), case V9365 of {'Idris.Prelude.Types.Left', E1464} -> (fun (V9366) -> {'Idris.Prelude.Types.Left', V9366} end(E1464)); {'Idris.Prelude.Types.Right', E1465} -> (fun (V9367) -> begin (V9368 = (('un--nfToCFType'(V0, V9302, 0, V9367))(V9364))), case V9368 of {'Idris.Prelude.Types.Left', E1466} -> (fun (V9369) -> {'Idris.Prelude.Types.Left', V9369} end(E1466)); {'Idris.Prelude.Types.Right', E1467} -> (fun (V9370) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V9362, V9370}} end(E1467)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1465)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1462, E1463)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V9360))(V9307))), case V9371 of {'Idris.Prelude.Types.Left', E1468} -> (fun (V9372) -> {'Idris.Prelude.Types.Left', V9372} end(E1468)); {'Idris.Prelude.Types.Right', E1469} -> (fun (V9373) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V9359, V9373}} end(E1469)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1460, E1461)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1470} -> (fun (V9374) -> begin (V9375 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9338, V9374))(V9307))), case V9375 of {'Idris.Prelude.Types.Left', E1471} -> (fun (V9376) -> {'Idris.Prelude.Types.Left', V9376} end(E1471)); {'Idris.Prelude.Types.Right', E1472} -> (fun (V9377) -> begin (V9378 = (('un--nfToCFType'(V0, V9302, V2, V9377))(V9307))), case V9378 of {'Idris.Prelude.Types.Left', E1473} -> (fun (V9379) -> {'Idris.Prelude.Types.Left', V9379} end(E1473)); {'Idris.Prelude.Types.Right', E1474} -> (fun (V9380) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V9380}} end(E1474)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1472)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1470)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1453)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1451)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1449)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1443, E1444, E1445, E1446, E1447)); {'Idris.Core.Value.NType', E1475} -> (fun (V9381) -> fun (V9382) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1475)); {'Idris.Core.Value.NErased', E1476, E1477} -> (fun (V9383, V9384) -> fun (V9385) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1476, E1477)); _ -> fun (V9386) -> begin (V9415 = begin (V9414 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9387) -> fun (V9388) -> fun (V9389) -> fun (V9390) -> fun (V9391) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9389, V9390, V9391)) end end end end end, fun (V9392) -> fun (V9393) -> fun (V9394) -> V9393 end end end, fun (V9395) -> fun (V9396) -> fun (V9397) -> fun (V9398) -> fun (V9399) -> begin (V9400 = (V9397(V9399))), begin (V9401 = (V9398(V9399))), (V9400(V9401)) end end end end end end end}, fun (V9402) -> fun (V9403) -> fun (V9404) -> fun (V9405) -> fun (V9406) -> begin (V9407 = (V9404(V9406))), ((V9405(V9407))(V9406)) end end end end end end, fun (V9408) -> fun (V9409) -> fun (V9410) -> begin (V9411 = (V9409(V9410))), (V9411(V9410)) end end end end}, fun (V9412) -> fun (V9413) -> V9413 end end}, V0))(V9386))), {'Idris.Prelude.Types.Right', V9414} end), case V9415 of {'Idris.Prelude.Types.Left', E1437} -> (fun (V9416) -> {'Idris.Prelude.Types.Left', V9416} end(E1437)); {'Idris.Prelude.Types.Right', E1438} -> (fun (V9417) -> begin (V9418 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V9417, {'Idris.Core.Env.Nil'}, V3, V9386))), case V9418 of {'Idris.Prelude.Types.Left', E1439} -> (fun (V9419) -> {'Idris.Prelude.Types.Left', V9419} end(E1439)); {'Idris.Prelude.Types.Right', E1440} -> (fun (V9420) -> begin (V9425 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V9421) -> fun (V9422) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V9421, V9422)) end end, fun (V9423) -> fun (V9424) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V9423, V9424)) end end}, V9420, V9386))), case V9425 of {'Idris.Prelude.Types.Left', E1441} -> (fun (V9426) -> {'Idris.Prelude.Types.Left', V9426} end(E1441)); {'Idris.Prelude.Types.Right', E1442} -> (fun (V9427) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V9427))))}, V9386)) end(E1442)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1440)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1438)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E1304, E1305, E1306, E1307, E1308} -> (fun (V9428, V9429, V9430, V9431, V9432) -> fun (V9433) -> begin (V9462 = begin (V9461 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9434) -> fun (V9435) -> fun (V9436) -> fun (V9437) -> fun (V9438) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9436, V9437, V9438)) end end end end end, fun (V9439) -> fun (V9440) -> fun (V9441) -> V9440 end end end, fun (V9442) -> fun (V9443) -> fun (V9444) -> fun (V9445) -> fun (V9446) -> begin (V9447 = (V9444(V9446))), begin (V9448 = (V9445(V9446))), (V9447(V9448)) end end end end end end end}, fun (V9449) -> fun (V9450) -> fun (V9451) -> fun (V9452) -> fun (V9453) -> begin (V9454 = (V9451(V9453))), ((V9452(V9454))(V9453)) end end end end end end, fun (V9455) -> fun (V9456) -> fun (V9457) -> begin (V9458 = (V9456(V9457))), (V9458(V9457)) end end end end}, fun (V9459) -> fun (V9460) -> V9460 end end}, V0))(V9433))), {'Idris.Prelude.Types.Right', V9461} end), case V9462 of {'Idris.Prelude.Types.Left', E1309} -> (fun (V9463) -> {'Idris.Prelude.Types.Left', V9463} end(E1309)); {'Idris.Prelude.Types.Right', E1310} -> (fun (V9464) -> begin (V9469 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V9465) -> fun (V9466) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V9465, V9466)) end end, fun (V9467) -> fun (V9468) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V9467, V9468)) end end}, V9429, V9433))), case V9469 of {'Idris.Prelude.Types.Left', E1311} -> (fun (V9470) -> {'Idris.Prelude.Types.Left', V9470} end(E1311)); {'Idris.Prelude.Types.Right', E1312} -> (fun (V9471) -> begin (V9472 = (('un--getNArgs'(V0, V9464, V9471, V9432))(V9433))), case V9472 of {'Idris.Prelude.Types.Left', E1313} -> (fun (V9473) -> {'Idris.Prelude.Types.Left', V9473} end(E1313)); {'Idris.Prelude.Types.Right', E1314} -> (fun (V9474) -> case V9474 of {'Idris.Compiler.CompileExpr.User', E1315, E1316} -> (fun (V9475, V9476) -> begin (V9478 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9477) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9464, V9477)) end, V9476))(V9433))), case V9478 of {'Idris.Prelude.Types.Left', E1317} -> (fun (V9479) -> {'Idris.Prelude.Types.Left', V9479} end(E1317)); {'Idris.Prelude.Types.Right', E1318} -> (fun (V9480) -> begin (V9482 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9481) -> ('un--nfToCFType'(V0, V9428, V2, V9481)) end, V9480))(V9433))), case V9482 of {'Idris.Prelude.Types.Left', E1319} -> (fun (V9483) -> {'Idris.Prelude.Types.Left', V9483} end(E1319)); {'Idris.Prelude.Types.Right', E1320} -> (fun (V9484) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V9471, V9484}} end(E1320)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1318)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1315, E1316)); {'Idris.Compiler.CompileExpr.Struct', E1321, E1322} -> (fun (V9485, V9486) -> begin (V9497 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9487) -> case V9487 of {'Idris.Builtin.MkPair', E1323, E1324} -> (fun (V9488, V9489) -> fun (V9490) -> begin (V9491 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9464, V9489))(V9490))), case V9491 of {'Idris.Prelude.Types.Left', E1325} -> (fun (V9492) -> {'Idris.Prelude.Types.Left', V9492} end(E1325)); {'Idris.Prelude.Types.Right', E1326} -> (fun (V9493) -> begin (V9494 = (('un--nfToCFType'(V0, V9428, 0, V9493))(V9490))), case V9494 of {'Idris.Prelude.Types.Left', E1327} -> (fun (V9495) -> {'Idris.Prelude.Types.Left', V9495} end(E1327)); {'Idris.Prelude.Types.Right', E1328} -> (fun (V9496) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V9488, V9496}} end(E1328)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1326)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1323, E1324)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V9486))(V9433))), case V9497 of {'Idris.Prelude.Types.Left', E1329} -> (fun (V9498) -> {'Idris.Prelude.Types.Left', V9498} end(E1329)); {'Idris.Prelude.Types.Right', E1330} -> (fun (V9499) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V9485, V9499}} end(E1330)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1321, E1322)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1331} -> (fun (V9500) -> begin (V9501 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9464, V9500))(V9433))), case V9501 of {'Idris.Prelude.Types.Left', E1332} -> (fun (V9502) -> {'Idris.Prelude.Types.Left', V9502} end(E1332)); {'Idris.Prelude.Types.Right', E1333} -> (fun (V9503) -> begin (V9504 = (('un--nfToCFType'(V0, V9428, V2, V9503))(V9433))), case V9504 of {'Idris.Prelude.Types.Left', E1334} -> (fun (V9505) -> {'Idris.Prelude.Types.Left', V9505} end(E1334)); {'Idris.Prelude.Types.Right', E1335} -> (fun (V9506) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V9506}} end(E1335)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1333)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1331)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1314)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1312)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1310)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1304, E1305, E1306, E1307, E1308)); {'Idris.Core.Value.NType', E1336} -> (fun (V9507) -> fun (V9508) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1336)); {'Idris.Core.Value.NErased', E1337, E1338} -> (fun (V9509, V9510) -> fun (V9511) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1337, E1338)); _ -> fun (V9512) -> begin (V9541 = begin (V9540 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9513) -> fun (V9514) -> fun (V9515) -> fun (V9516) -> fun (V9517) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9515, V9516, V9517)) end end end end end, fun (V9518) -> fun (V9519) -> fun (V9520) -> V9519 end end end, fun (V9521) -> fun (V9522) -> fun (V9523) -> fun (V9524) -> fun (V9525) -> begin (V9526 = (V9523(V9525))), begin (V9527 = (V9524(V9525))), (V9526(V9527)) end end end end end end end}, fun (V9528) -> fun (V9529) -> fun (V9530) -> fun (V9531) -> fun (V9532) -> begin (V9533 = (V9530(V9532))), ((V9531(V9533))(V9532)) end end end end end end, fun (V9534) -> fun (V9535) -> fun (V9536) -> begin (V9537 = (V9535(V9536))), (V9537(V9536)) end end end end}, fun (V9538) -> fun (V9539) -> V9539 end end}, V0))(V9512))), {'Idris.Prelude.Types.Right', V9540} end), case V9541 of {'Idris.Prelude.Types.Left', E1298} -> (fun (V9542) -> {'Idris.Prelude.Types.Left', V9542} end(E1298)); {'Idris.Prelude.Types.Right', E1299} -> (fun (V9543) -> begin (V9544 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V9543, {'Idris.Core.Env.Nil'}, V3, V9512))), case V9544 of {'Idris.Prelude.Types.Left', E1300} -> (fun (V9545) -> {'Idris.Prelude.Types.Left', V9545} end(E1300)); {'Idris.Prelude.Types.Right', E1301} -> (fun (V9546) -> begin (V9551 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V9547) -> fun (V9548) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V9547, V9548)) end end, fun (V9549) -> fun (V9550) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V9549, V9550)) end end}, V9546, V9512))), case V9551 of {'Idris.Prelude.Types.Left', E1302} -> (fun (V9552) -> {'Idris.Prelude.Types.Left', V9552} end(E1302)); {'Idris.Prelude.Types.Right', E1303} -> (fun (V9553) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V9553))))}, V9512)) end(E1303)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1301)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1299)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end(E1296, E1297)); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E1194, E1195, E1196, E1197} -> (fun (V9554, V9555, V9556, V9557) -> case V9556 of {'Idris.Core.TT.Pi', E1239, E1240, E1241, E1242} -> (fun (V9558, V9559, V9560, V9561) -> fun (V9562) -> begin (V9591 = begin (V9590 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9563) -> fun (V9564) -> fun (V9565) -> fun (V9566) -> fun (V9567) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9565, V9566, V9567)) end end end end end, fun (V9568) -> fun (V9569) -> fun (V9570) -> V9569 end end end, fun (V9571) -> fun (V9572) -> fun (V9573) -> fun (V9574) -> fun (V9575) -> begin (V9576 = (V9573(V9575))), begin (V9577 = (V9574(V9575))), (V9576(V9577)) end end end end end end end}, fun (V9578) -> fun (V9579) -> fun (V9580) -> fun (V9581) -> fun (V9582) -> begin (V9583 = (V9580(V9582))), ((V9581(V9583))(V9582)) end end end end end end, fun (V9584) -> fun (V9585) -> fun (V9586) -> begin (V9587 = (V9585(V9586))), (V9587(V9586)) end end end end}, fun (V9588) -> fun (V9589) -> V9589 end end}, V0))(V9562))), {'Idris.Prelude.Types.Right', V9590} end), case V9591 of {'Idris.Prelude.Types.Left', E1243} -> (fun (V9592) -> {'Idris.Prelude.Types.Left', V9592} end(E1243)); {'Idris.Prelude.Types.Right', E1244} -> (fun (V9593) -> begin (V9594 = (('un--nfToCFType'(V0, V9554, 1, V9561))(V9562))), case V9594 of {'Idris.Prelude.Types.Left', E1245} -> (fun (V9595) -> {'Idris.Prelude.Types.Left', V9595} end(E1245)); {'Idris.Prelude.Types.Right', E1246} -> (fun (V9596) -> begin (V9597 = (((V9557(V9593))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V9554, 1}))))(V9562))), case V9597 of {'Idris.Prelude.Types.Left', E1247} -> (fun (V9598) -> {'Idris.Prelude.Types.Left', V9598} end(E1247)); {'Idris.Prelude.Types.Right', E1248} -> (fun (V9599) -> begin (V9600 = (('un--nfToCFType'(V0, V9554, 1, V9599))(V9562))), case V9600 of {'Idris.Prelude.Types.Left', E1249} -> (fun (V9601) -> {'Idris.Prelude.Types.Left', V9601} end(E1249)); {'Idris.Prelude.Types.Right', E1250} -> (fun (V9602) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V9596, V9602}} end(E1250)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1248)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1246)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1244)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1239, E1240, E1241, E1242)); _ -> case V3 of {'Idris.Core.Value.NTCon', E1204, E1205, E1206, E1207, E1208} -> (fun (V9603, V9604, V9605, V9606, V9607) -> fun (V9608) -> begin (V9637 = begin (V9636 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9609) -> fun (V9610) -> fun (V9611) -> fun (V9612) -> fun (V9613) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9611, V9612, V9613)) end end end end end, fun (V9614) -> fun (V9615) -> fun (V9616) -> V9615 end end end, fun (V9617) -> fun (V9618) -> fun (V9619) -> fun (V9620) -> fun (V9621) -> begin (V9622 = (V9619(V9621))), begin (V9623 = (V9620(V9621))), (V9622(V9623)) end end end end end end end}, fun (V9624) -> fun (V9625) -> fun (V9626) -> fun (V9627) -> fun (V9628) -> begin (V9629 = (V9626(V9628))), ((V9627(V9629))(V9628)) end end end end end end, fun (V9630) -> fun (V9631) -> fun (V9632) -> begin (V9633 = (V9631(V9632))), (V9633(V9632)) end end end end}, fun (V9634) -> fun (V9635) -> V9635 end end}, V0))(V9608))), {'Idris.Prelude.Types.Right', V9636} end), case V9637 of {'Idris.Prelude.Types.Left', E1209} -> (fun (V9638) -> {'Idris.Prelude.Types.Left', V9638} end(E1209)); {'Idris.Prelude.Types.Right', E1210} -> (fun (V9639) -> begin (V9644 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V9640) -> fun (V9641) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V9640, V9641)) end end, fun (V9642) -> fun (V9643) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V9642, V9643)) end end}, V9604, V9608))), case V9644 of {'Idris.Prelude.Types.Left', E1211} -> (fun (V9645) -> {'Idris.Prelude.Types.Left', V9645} end(E1211)); {'Idris.Prelude.Types.Right', E1212} -> (fun (V9646) -> begin (V9647 = (('un--getNArgs'(V0, V9639, V9646, V9607))(V9608))), case V9647 of {'Idris.Prelude.Types.Left', E1213} -> (fun (V9648) -> {'Idris.Prelude.Types.Left', V9648} end(E1213)); {'Idris.Prelude.Types.Right', E1214} -> (fun (V9649) -> case V9649 of {'Idris.Compiler.CompileExpr.User', E1215, E1216} -> (fun (V9650, V9651) -> begin (V9653 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9652) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9639, V9652)) end, V9651))(V9608))), case V9653 of {'Idris.Prelude.Types.Left', E1217} -> (fun (V9654) -> {'Idris.Prelude.Types.Left', V9654} end(E1217)); {'Idris.Prelude.Types.Right', E1218} -> (fun (V9655) -> begin (V9657 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9656) -> ('un--nfToCFType'(V0, V9603, V2, V9656)) end, V9655))(V9608))), case V9657 of {'Idris.Prelude.Types.Left', E1219} -> (fun (V9658) -> {'Idris.Prelude.Types.Left', V9658} end(E1219)); {'Idris.Prelude.Types.Right', E1220} -> (fun (V9659) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V9646, V9659}} end(E1220)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1218)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1215, E1216)); {'Idris.Compiler.CompileExpr.Struct', E1221, E1222} -> (fun (V9660, V9661) -> begin (V9672 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9662) -> case V9662 of {'Idris.Builtin.MkPair', E1223, E1224} -> (fun (V9663, V9664) -> fun (V9665) -> begin (V9666 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9639, V9664))(V9665))), case V9666 of {'Idris.Prelude.Types.Left', E1225} -> (fun (V9667) -> {'Idris.Prelude.Types.Left', V9667} end(E1225)); {'Idris.Prelude.Types.Right', E1226} -> (fun (V9668) -> begin (V9669 = (('un--nfToCFType'(V0, V9603, 0, V9668))(V9665))), case V9669 of {'Idris.Prelude.Types.Left', E1227} -> (fun (V9670) -> {'Idris.Prelude.Types.Left', V9670} end(E1227)); {'Idris.Prelude.Types.Right', E1228} -> (fun (V9671) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V9663, V9671}} end(E1228)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1226)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1223, E1224)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V9661))(V9608))), case V9672 of {'Idris.Prelude.Types.Left', E1229} -> (fun (V9673) -> {'Idris.Prelude.Types.Left', V9673} end(E1229)); {'Idris.Prelude.Types.Right', E1230} -> (fun (V9674) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V9660, V9674}} end(E1230)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1221, E1222)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1231} -> (fun (V9675) -> begin (V9676 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9639, V9675))(V9608))), case V9676 of {'Idris.Prelude.Types.Left', E1232} -> (fun (V9677) -> {'Idris.Prelude.Types.Left', V9677} end(E1232)); {'Idris.Prelude.Types.Right', E1233} -> (fun (V9678) -> begin (V9679 = (('un--nfToCFType'(V0, V9603, V2, V9678))(V9608))), case V9679 of {'Idris.Prelude.Types.Left', E1234} -> (fun (V9680) -> {'Idris.Prelude.Types.Left', V9680} end(E1234)); {'Idris.Prelude.Types.Right', E1235} -> (fun (V9681) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V9681}} end(E1235)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1233)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1231)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1214)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1212)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1210)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1204, E1205, E1206, E1207, E1208)); {'Idris.Core.Value.NType', E1236} -> (fun (V9682) -> fun (V9683) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1236)); {'Idris.Core.Value.NErased', E1237, E1238} -> (fun (V9684, V9685) -> fun (V9686) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1237, E1238)); _ -> fun (V9687) -> begin (V9716 = begin (V9715 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9688) -> fun (V9689) -> fun (V9690) -> fun (V9691) -> fun (V9692) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9690, V9691, V9692)) end end end end end, fun (V9693) -> fun (V9694) -> fun (V9695) -> V9694 end end end, fun (V9696) -> fun (V9697) -> fun (V9698) -> fun (V9699) -> fun (V9700) -> begin (V9701 = (V9698(V9700))), begin (V9702 = (V9699(V9700))), (V9701(V9702)) end end end end end end end}, fun (V9703) -> fun (V9704) -> fun (V9705) -> fun (V9706) -> fun (V9707) -> begin (V9708 = (V9705(V9707))), ((V9706(V9708))(V9707)) end end end end end end, fun (V9709) -> fun (V9710) -> fun (V9711) -> begin (V9712 = (V9710(V9711))), (V9712(V9711)) end end end end}, fun (V9713) -> fun (V9714) -> V9714 end end}, V0))(V9687))), {'Idris.Prelude.Types.Right', V9715} end), case V9716 of {'Idris.Prelude.Types.Left', E1198} -> (fun (V9717) -> {'Idris.Prelude.Types.Left', V9717} end(E1198)); {'Idris.Prelude.Types.Right', E1199} -> (fun (V9718) -> begin (V9719 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V9718, {'Idris.Core.Env.Nil'}, V3, V9687))), case V9719 of {'Idris.Prelude.Types.Left', E1200} -> (fun (V9720) -> {'Idris.Prelude.Types.Left', V9720} end(E1200)); {'Idris.Prelude.Types.Right', E1201} -> (fun (V9721) -> begin (V9726 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V9722) -> fun (V9723) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V9722, V9723)) end end, fun (V9724) -> fun (V9725) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V9724, V9725)) end end}, V9721, V9687))), case V9726 of {'Idris.Prelude.Types.Left', E1202} -> (fun (V9727) -> {'Idris.Prelude.Types.Left', V9727} end(E1202)); {'Idris.Prelude.Types.Right', E1203} -> (fun (V9728) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V9728))))}, V9687)) end(E1203)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1201)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1199)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E1194, E1195, E1196, E1197)); _ -> case V3 of {'Idris.Core.Value.NTCon', E1159, E1160, E1161, E1162, E1163} -> (fun (V9729, V9730, V9731, V9732, V9733) -> fun (V9734) -> begin (V9763 = begin (V9762 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9735) -> fun (V9736) -> fun (V9737) -> fun (V9738) -> fun (V9739) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9737, V9738, V9739)) end end end end end, fun (V9740) -> fun (V9741) -> fun (V9742) -> V9741 end end end, fun (V9743) -> fun (V9744) -> fun (V9745) -> fun (V9746) -> fun (V9747) -> begin (V9748 = (V9745(V9747))), begin (V9749 = (V9746(V9747))), (V9748(V9749)) end end end end end end end}, fun (V9750) -> fun (V9751) -> fun (V9752) -> fun (V9753) -> fun (V9754) -> begin (V9755 = (V9752(V9754))), ((V9753(V9755))(V9754)) end end end end end end, fun (V9756) -> fun (V9757) -> fun (V9758) -> begin (V9759 = (V9757(V9758))), (V9759(V9758)) end end end end}, fun (V9760) -> fun (V9761) -> V9761 end end}, V0))(V9734))), {'Idris.Prelude.Types.Right', V9762} end), case V9763 of {'Idris.Prelude.Types.Left', E1164} -> (fun (V9764) -> {'Idris.Prelude.Types.Left', V9764} end(E1164)); {'Idris.Prelude.Types.Right', E1165} -> (fun (V9765) -> begin (V9770 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V9766) -> fun (V9767) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V9766, V9767)) end end, fun (V9768) -> fun (V9769) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V9768, V9769)) end end}, V9730, V9734))), case V9770 of {'Idris.Prelude.Types.Left', E1166} -> (fun (V9771) -> {'Idris.Prelude.Types.Left', V9771} end(E1166)); {'Idris.Prelude.Types.Right', E1167} -> (fun (V9772) -> begin (V9773 = (('un--getNArgs'(V0, V9765, V9772, V9733))(V9734))), case V9773 of {'Idris.Prelude.Types.Left', E1168} -> (fun (V9774) -> {'Idris.Prelude.Types.Left', V9774} end(E1168)); {'Idris.Prelude.Types.Right', E1169} -> (fun (V9775) -> case V9775 of {'Idris.Compiler.CompileExpr.User', E1170, E1171} -> (fun (V9776, V9777) -> begin (V9779 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9778) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9765, V9778)) end, V9777))(V9734))), case V9779 of {'Idris.Prelude.Types.Left', E1172} -> (fun (V9780) -> {'Idris.Prelude.Types.Left', V9780} end(E1172)); {'Idris.Prelude.Types.Right', E1173} -> (fun (V9781) -> begin (V9783 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9782) -> ('un--nfToCFType'(V0, V9729, V2, V9782)) end, V9781))(V9734))), case V9783 of {'Idris.Prelude.Types.Left', E1174} -> (fun (V9784) -> {'Idris.Prelude.Types.Left', V9784} end(E1174)); {'Idris.Prelude.Types.Right', E1175} -> (fun (V9785) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V9772, V9785}} end(E1175)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1173)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1170, E1171)); {'Idris.Compiler.CompileExpr.Struct', E1176, E1177} -> (fun (V9786, V9787) -> begin (V9798 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9788) -> case V9788 of {'Idris.Builtin.MkPair', E1178, E1179} -> (fun (V9789, V9790) -> fun (V9791) -> begin (V9792 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9765, V9790))(V9791))), case V9792 of {'Idris.Prelude.Types.Left', E1180} -> (fun (V9793) -> {'Idris.Prelude.Types.Left', V9793} end(E1180)); {'Idris.Prelude.Types.Right', E1181} -> (fun (V9794) -> begin (V9795 = (('un--nfToCFType'(V0, V9729, 0, V9794))(V9791))), case V9795 of {'Idris.Prelude.Types.Left', E1182} -> (fun (V9796) -> {'Idris.Prelude.Types.Left', V9796} end(E1182)); {'Idris.Prelude.Types.Right', E1183} -> (fun (V9797) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V9789, V9797}} end(E1183)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1181)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1178, E1179)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V9787))(V9734))), case V9798 of {'Idris.Prelude.Types.Left', E1184} -> (fun (V9799) -> {'Idris.Prelude.Types.Left', V9799} end(E1184)); {'Idris.Prelude.Types.Right', E1185} -> (fun (V9800) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V9786, V9800}} end(E1185)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1176, E1177)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1186} -> (fun (V9801) -> begin (V9802 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9765, V9801))(V9734))), case V9802 of {'Idris.Prelude.Types.Left', E1187} -> (fun (V9803) -> {'Idris.Prelude.Types.Left', V9803} end(E1187)); {'Idris.Prelude.Types.Right', E1188} -> (fun (V9804) -> begin (V9805 = (('un--nfToCFType'(V0, V9729, V2, V9804))(V9734))), case V9805 of {'Idris.Prelude.Types.Left', E1189} -> (fun (V9806) -> {'Idris.Prelude.Types.Left', V9806} end(E1189)); {'Idris.Prelude.Types.Right', E1190} -> (fun (V9807) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V9807}} end(E1190)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1188)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1186)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1169)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1167)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1165)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1159, E1160, E1161, E1162, E1163)); {'Idris.Core.Value.NType', E1191} -> (fun (V9808) -> fun (V9809) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1191)); {'Idris.Core.Value.NErased', E1192, E1193} -> (fun (V9810, V9811) -> fun (V9812) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1192, E1193)); _ -> fun (V9813) -> begin (V9842 = begin (V9841 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9814) -> fun (V9815) -> fun (V9816) -> fun (V9817) -> fun (V9818) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9816, V9817, V9818)) end end end end end, fun (V9819) -> fun (V9820) -> fun (V9821) -> V9820 end end end, fun (V9822) -> fun (V9823) -> fun (V9824) -> fun (V9825) -> fun (V9826) -> begin (V9827 = (V9824(V9826))), begin (V9828 = (V9825(V9826))), (V9827(V9828)) end end end end end end end}, fun (V9829) -> fun (V9830) -> fun (V9831) -> fun (V9832) -> fun (V9833) -> begin (V9834 = (V9831(V9833))), ((V9832(V9834))(V9833)) end end end end end end, fun (V9835) -> fun (V9836) -> fun (V9837) -> begin (V9838 = (V9836(V9837))), (V9838(V9837)) end end end end}, fun (V9839) -> fun (V9840) -> V9840 end end}, V0))(V9813))), {'Idris.Prelude.Types.Right', V9841} end), case V9842 of {'Idris.Prelude.Types.Left', E1153} -> (fun (V9843) -> {'Idris.Prelude.Types.Left', V9843} end(E1153)); {'Idris.Prelude.Types.Right', E1154} -> (fun (V9844) -> begin (V9845 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V9844, {'Idris.Core.Env.Nil'}, V3, V9813))), case V9845 of {'Idris.Prelude.Types.Left', E1155} -> (fun (V9846) -> {'Idris.Prelude.Types.Left', V9846} end(E1155)); {'Idris.Prelude.Types.Right', E1156} -> (fun (V9847) -> begin (V9852 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V9848) -> fun (V9849) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V9848, V9849)) end end, fun (V9850) -> fun (V9851) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V9850, V9851)) end end}, V9847, V9813))), case V9852 of {'Idris.Prelude.Types.Left', E1157} -> (fun (V9853) -> {'Idris.Prelude.Types.Left', V9853} end(E1157)); {'Idris.Prelude.Types.Right', E1158} -> (fun (V9854) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V9854))))}, V9813)) end(E1158)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1156)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1154)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E1292, E1293, E1294, E1295} -> (fun (V9855, V9856, V9857, V9858) -> fun (V9859) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V9855, <<"Function types not allowed in a foreign struct"/utf8>>}, V9859)) end end(E1292, E1293, E1294, E1295)); _ -> case V3 of {'Idris.Core.Value.NTCon', E1257, E1258, E1259, E1260, E1261} -> (fun (V9860, V9861, V9862, V9863, V9864) -> fun (V9865) -> begin (V9894 = begin (V9893 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9866) -> fun (V9867) -> fun (V9868) -> fun (V9869) -> fun (V9870) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9868, V9869, V9870)) end end end end end, fun (V9871) -> fun (V9872) -> fun (V9873) -> V9872 end end end, fun (V9874) -> fun (V9875) -> fun (V9876) -> fun (V9877) -> fun (V9878) -> begin (V9879 = (V9876(V9878))), begin (V9880 = (V9877(V9878))), (V9879(V9880)) end end end end end end end}, fun (V9881) -> fun (V9882) -> fun (V9883) -> fun (V9884) -> fun (V9885) -> begin (V9886 = (V9883(V9885))), ((V9884(V9886))(V9885)) end end end end end end, fun (V9887) -> fun (V9888) -> fun (V9889) -> begin (V9890 = (V9888(V9889))), (V9890(V9889)) end end end end}, fun (V9891) -> fun (V9892) -> V9892 end end}, V0))(V9865))), {'Idris.Prelude.Types.Right', V9893} end), case V9894 of {'Idris.Prelude.Types.Left', E1262} -> (fun (V9895) -> {'Idris.Prelude.Types.Left', V9895} end(E1262)); {'Idris.Prelude.Types.Right', E1263} -> (fun (V9896) -> begin (V9901 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V9897) -> fun (V9898) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V9897, V9898)) end end, fun (V9899) -> fun (V9900) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V9899, V9900)) end end}, V9861, V9865))), case V9901 of {'Idris.Prelude.Types.Left', E1264} -> (fun (V9902) -> {'Idris.Prelude.Types.Left', V9902} end(E1264)); {'Idris.Prelude.Types.Right', E1265} -> (fun (V9903) -> begin (V9904 = (('un--getNArgs'(V0, V9896, V9903, V9864))(V9865))), case V9904 of {'Idris.Prelude.Types.Left', E1266} -> (fun (V9905) -> {'Idris.Prelude.Types.Left', V9905} end(E1266)); {'Idris.Prelude.Types.Right', E1267} -> (fun (V9906) -> case V9906 of {'Idris.Compiler.CompileExpr.User', E1268, E1269} -> (fun (V9907, V9908) -> begin (V9910 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9909) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9896, V9909)) end, V9908))(V9865))), case V9910 of {'Idris.Prelude.Types.Left', E1270} -> (fun (V9911) -> {'Idris.Prelude.Types.Left', V9911} end(E1270)); {'Idris.Prelude.Types.Right', E1271} -> (fun (V9912) -> begin (V9914 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9913) -> ('un--nfToCFType'(V0, V9860, V2, V9913)) end, V9912))(V9865))), case V9914 of {'Idris.Prelude.Types.Left', E1272} -> (fun (V9915) -> {'Idris.Prelude.Types.Left', V9915} end(E1272)); {'Idris.Prelude.Types.Right', E1273} -> (fun (V9916) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V9903, V9916}} end(E1273)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1271)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1268, E1269)); {'Idris.Compiler.CompileExpr.Struct', E1274, E1275} -> (fun (V9917, V9918) -> begin (V9929 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V9919) -> case V9919 of {'Idris.Builtin.MkPair', E1276, E1277} -> (fun (V9920, V9921) -> fun (V9922) -> begin (V9923 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9896, V9921))(V9922))), case V9923 of {'Idris.Prelude.Types.Left', E1278} -> (fun (V9924) -> {'Idris.Prelude.Types.Left', V9924} end(E1278)); {'Idris.Prelude.Types.Right', E1279} -> (fun (V9925) -> begin (V9926 = (('un--nfToCFType'(V0, V9860, 0, V9925))(V9922))), case V9926 of {'Idris.Prelude.Types.Left', E1280} -> (fun (V9927) -> {'Idris.Prelude.Types.Left', V9927} end(E1280)); {'Idris.Prelude.Types.Right', E1281} -> (fun (V9928) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V9920, V9928}} end(E1281)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1279)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1276, E1277)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V9918))(V9865))), case V9929 of {'Idris.Prelude.Types.Left', E1282} -> (fun (V9930) -> {'Idris.Prelude.Types.Left', V9930} end(E1282)); {'Idris.Prelude.Types.Right', E1283} -> (fun (V9931) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V9917, V9931}} end(E1283)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1274, E1275)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1284} -> (fun (V9932) -> begin (V9933 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V9896, V9932))(V9865))), case V9933 of {'Idris.Prelude.Types.Left', E1285} -> (fun (V9934) -> {'Idris.Prelude.Types.Left', V9934} end(E1285)); {'Idris.Prelude.Types.Right', E1286} -> (fun (V9935) -> begin (V9936 = (('un--nfToCFType'(V0, V9860, V2, V9935))(V9865))), case V9936 of {'Idris.Prelude.Types.Left', E1287} -> (fun (V9937) -> {'Idris.Prelude.Types.Left', V9937} end(E1287)); {'Idris.Prelude.Types.Right', E1288} -> (fun (V9938) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V9938}} end(E1288)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1286)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1284)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1267)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1265)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1263)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1257, E1258, E1259, E1260, E1261)); {'Idris.Core.Value.NType', E1289} -> (fun (V9939) -> fun (V9940) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1289)); {'Idris.Core.Value.NErased', E1290, E1291} -> (fun (V9941, V9942) -> fun (V9943) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1290, E1291)); _ -> fun (V9944) -> begin (V9973 = begin (V9972 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9945) -> fun (V9946) -> fun (V9947) -> fun (V9948) -> fun (V9949) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9947, V9948, V9949)) end end end end end, fun (V9950) -> fun (V9951) -> fun (V9952) -> V9951 end end end, fun (V9953) -> fun (V9954) -> fun (V9955) -> fun (V9956) -> fun (V9957) -> begin (V9958 = (V9955(V9957))), begin (V9959 = (V9956(V9957))), (V9958(V9959)) end end end end end end end}, fun (V9960) -> fun (V9961) -> fun (V9962) -> fun (V9963) -> fun (V9964) -> begin (V9965 = (V9962(V9964))), ((V9963(V9965))(V9964)) end end end end end end, fun (V9966) -> fun (V9967) -> fun (V9968) -> begin (V9969 = (V9967(V9968))), (V9969(V9968)) end end end end}, fun (V9970) -> fun (V9971) -> V9971 end end}, V0))(V9944))), {'Idris.Prelude.Types.Right', V9972} end), case V9973 of {'Idris.Prelude.Types.Left', E1251} -> (fun (V9974) -> {'Idris.Prelude.Types.Left', V9974} end(E1251)); {'Idris.Prelude.Types.Right', E1252} -> (fun (V9975) -> begin (V9976 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V9975, {'Idris.Core.Env.Nil'}, V3, V9944))), case V9976 of {'Idris.Prelude.Types.Left', E1253} -> (fun (V9977) -> {'Idris.Prelude.Types.Left', V9977} end(E1253)); {'Idris.Prelude.Types.Right', E1254} -> (fun (V9978) -> begin (V9983 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V9979) -> fun (V9980) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V9979, V9980)) end end, fun (V9981) -> fun (V9982) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V9981, V9982)) end end}, V9978, V9944))), case V9983 of {'Idris.Prelude.Types.Left', E1255} -> (fun (V9984) -> {'Idris.Prelude.Types.Left', V9984} end(E1255)); {'Idris.Prelude.Types.Right', E1256} -> (fun (V9985) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V9985))))}, V9944)) end(E1256)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1254)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1252)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E1118, E1119, E1120, E1121, E1122} -> (fun (V9986, V9987, V9988, V9989, V9990) -> fun (V9991) -> begin (V10020 = begin (V10019 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V9992) -> fun (V9993) -> fun (V9994) -> fun (V9995) -> fun (V9996) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V9994, V9995, V9996)) end end end end end, fun (V9997) -> fun (V9998) -> fun (V9999) -> V9998 end end end, fun (V10000) -> fun (V10001) -> fun (V10002) -> fun (V10003) -> fun (V10004) -> begin (V10005 = (V10002(V10004))), begin (V10006 = (V10003(V10004))), (V10005(V10006)) end end end end end end end}, fun (V10007) -> fun (V10008) -> fun (V10009) -> fun (V10010) -> fun (V10011) -> begin (V10012 = (V10009(V10011))), ((V10010(V10012))(V10011)) end end end end end end, fun (V10013) -> fun (V10014) -> fun (V10015) -> begin (V10016 = (V10014(V10015))), (V10016(V10015)) end end end end}, fun (V10017) -> fun (V10018) -> V10018 end end}, V0))(V9991))), {'Idris.Prelude.Types.Right', V10019} end), case V10020 of {'Idris.Prelude.Types.Left', E1123} -> (fun (V10021) -> {'Idris.Prelude.Types.Left', V10021} end(E1123)); {'Idris.Prelude.Types.Right', E1124} -> (fun (V10022) -> begin (V10027 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V10023) -> fun (V10024) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V10023, V10024)) end end, fun (V10025) -> fun (V10026) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V10025, V10026)) end end}, V9987, V9991))), case V10027 of {'Idris.Prelude.Types.Left', E1125} -> (fun (V10028) -> {'Idris.Prelude.Types.Left', V10028} end(E1125)); {'Idris.Prelude.Types.Right', E1126} -> (fun (V10029) -> begin (V10030 = (('un--getNArgs'(V0, V10022, V10029, V9990))(V9991))), case V10030 of {'Idris.Prelude.Types.Left', E1127} -> (fun (V10031) -> {'Idris.Prelude.Types.Left', V10031} end(E1127)); {'Idris.Prelude.Types.Right', E1128} -> (fun (V10032) -> case V10032 of {'Idris.Compiler.CompileExpr.User', E1129, E1130} -> (fun (V10033, V10034) -> begin (V10036 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10035) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10022, V10035)) end, V10034))(V9991))), case V10036 of {'Idris.Prelude.Types.Left', E1131} -> (fun (V10037) -> {'Idris.Prelude.Types.Left', V10037} end(E1131)); {'Idris.Prelude.Types.Right', E1132} -> (fun (V10038) -> begin (V10040 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10039) -> ('un--nfToCFType'(V0, V9986, V2, V10039)) end, V10038))(V9991))), case V10040 of {'Idris.Prelude.Types.Left', E1133} -> (fun (V10041) -> {'Idris.Prelude.Types.Left', V10041} end(E1133)); {'Idris.Prelude.Types.Right', E1134} -> (fun (V10042) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V10029, V10042}} end(E1134)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1132)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1129, E1130)); {'Idris.Compiler.CompileExpr.Struct', E1135, E1136} -> (fun (V10043, V10044) -> begin (V10055 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10045) -> case V10045 of {'Idris.Builtin.MkPair', E1137, E1138} -> (fun (V10046, V10047) -> fun (V10048) -> begin (V10049 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10022, V10047))(V10048))), case V10049 of {'Idris.Prelude.Types.Left', E1139} -> (fun (V10050) -> {'Idris.Prelude.Types.Left', V10050} end(E1139)); {'Idris.Prelude.Types.Right', E1140} -> (fun (V10051) -> begin (V10052 = (('un--nfToCFType'(V0, V9986, 0, V10051))(V10048))), case V10052 of {'Idris.Prelude.Types.Left', E1141} -> (fun (V10053) -> {'Idris.Prelude.Types.Left', V10053} end(E1141)); {'Idris.Prelude.Types.Right', E1142} -> (fun (V10054) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V10046, V10054}} end(E1142)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1140)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1137, E1138)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V10044))(V9991))), case V10055 of {'Idris.Prelude.Types.Left', E1143} -> (fun (V10056) -> {'Idris.Prelude.Types.Left', V10056} end(E1143)); {'Idris.Prelude.Types.Right', E1144} -> (fun (V10057) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V10043, V10057}} end(E1144)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1135, E1136)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E1145} -> (fun (V10058) -> begin (V10059 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10022, V10058))(V9991))), case V10059 of {'Idris.Prelude.Types.Left', E1146} -> (fun (V10060) -> {'Idris.Prelude.Types.Left', V10060} end(E1146)); {'Idris.Prelude.Types.Right', E1147} -> (fun (V10061) -> begin (V10062 = (('un--nfToCFType'(V0, V9986, V2, V10061))(V9991))), case V10062 of {'Idris.Prelude.Types.Left', E1148} -> (fun (V10063) -> {'Idris.Prelude.Types.Left', V10063} end(E1148)); {'Idris.Prelude.Types.Right', E1149} -> (fun (V10064) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V10064}} end(E1149)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1147)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1145)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E1128)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1126)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1124)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E1118, E1119, E1120, E1121, E1122)); {'Idris.Core.Value.NType', E1150} -> (fun (V10065) -> fun (V10066) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E1150)); {'Idris.Core.Value.NErased', E1151, E1152} -> (fun (V10067, V10068) -> fun (V10069) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E1151, E1152)); _ -> fun (V10070) -> begin (V10099 = begin (V10098 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V10071) -> fun (V10072) -> fun (V10073) -> fun (V10074) -> fun (V10075) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V10073, V10074, V10075)) end end end end end, fun (V10076) -> fun (V10077) -> fun (V10078) -> V10077 end end end, fun (V10079) -> fun (V10080) -> fun (V10081) -> fun (V10082) -> fun (V10083) -> begin (V10084 = (V10081(V10083))), begin (V10085 = (V10082(V10083))), (V10084(V10085)) end end end end end end end}, fun (V10086) -> fun (V10087) -> fun (V10088) -> fun (V10089) -> fun (V10090) -> begin (V10091 = (V10088(V10090))), ((V10089(V10091))(V10090)) end end end end end end, fun (V10092) -> fun (V10093) -> fun (V10094) -> begin (V10095 = (V10093(V10094))), (V10095(V10094)) end end end end}, fun (V10096) -> fun (V10097) -> V10097 end end}, V0))(V10070))), {'Idris.Prelude.Types.Right', V10098} end), case V10099 of {'Idris.Prelude.Types.Left', E1112} -> (fun (V10100) -> {'Idris.Prelude.Types.Left', V10100} end(E1112)); {'Idris.Prelude.Types.Right', E1113} -> (fun (V10101) -> begin (V10102 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V10101, {'Idris.Core.Env.Nil'}, V3, V10070))), case V10102 of {'Idris.Prelude.Types.Left', E1114} -> (fun (V10103) -> {'Idris.Prelude.Types.Left', V10103} end(E1114)); {'Idris.Prelude.Types.Right', E1115} -> (fun (V10104) -> begin (V10109 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V10105) -> fun (V10106) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V10105, V10106)) end end, fun (V10107) -> fun (V10108) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V10107, V10108)) end end}, V10104, V10070))), case V10109 of {'Idris.Prelude.Types.Left', E1116} -> (fun (V10110) -> {'Idris.Prelude.Types.Left', V10110} end(E1116)); {'Idris.Prelude.Types.Right', E1117} -> (fun (V10111) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V10111))))}, V10070)) end(E1117)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1115)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1113)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end; _ -> case V3 of {'Idris.Core.Value.NPrimVal', E184, E185} -> (fun (V10112, V10113) -> case V10113 of {'Idris.Core.TT.DoubleType'} -> (fun () -> fun (V10114) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFDouble'}} end end()); {'Idris.Core.TT.CharType'} -> (fun () -> fun (V10115) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFChar'}} end end()); {'Idris.Core.TT.WorldType'} -> (fun () -> fun (V10116) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFWorld'}} end end()); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E268, E269, E270, E271} -> (fun (V10117, V10118, V10119, V10120) -> case V10119 of {'Idris.Core.TT.Pi', E313, E314, E315, E316} -> (fun (V10121, V10122, V10123, V10124) -> fun (V10125) -> begin (V10154 = begin (V10153 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V10126) -> fun (V10127) -> fun (V10128) -> fun (V10129) -> fun (V10130) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V10128, V10129, V10130)) end end end end end, fun (V10131) -> fun (V10132) -> fun (V10133) -> V10132 end end end, fun (V10134) -> fun (V10135) -> fun (V10136) -> fun (V10137) -> fun (V10138) -> begin (V10139 = (V10136(V10138))), begin (V10140 = (V10137(V10138))), (V10139(V10140)) end end end end end end end}, fun (V10141) -> fun (V10142) -> fun (V10143) -> fun (V10144) -> fun (V10145) -> begin (V10146 = (V10143(V10145))), ((V10144(V10146))(V10145)) end end end end end end, fun (V10147) -> fun (V10148) -> fun (V10149) -> begin (V10150 = (V10148(V10149))), (V10150(V10149)) end end end end}, fun (V10151) -> fun (V10152) -> V10152 end end}, V0))(V10125))), {'Idris.Prelude.Types.Right', V10153} end), case V10154 of {'Idris.Prelude.Types.Left', E317} -> (fun (V10155) -> {'Idris.Prelude.Types.Left', V10155} end(E317)); {'Idris.Prelude.Types.Right', E318} -> (fun (V10156) -> begin (V10157 = (('un--nfToCFType'(V0, V10117, 1, V10124))(V10125))), case V10157 of {'Idris.Prelude.Types.Left', E319} -> (fun (V10158) -> {'Idris.Prelude.Types.Left', V10158} end(E319)); {'Idris.Prelude.Types.Right', E320} -> (fun (V10159) -> begin (V10160 = (((V10120(V10156))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V10117, 1}))))(V10125))), case V10160 of {'Idris.Prelude.Types.Left', E321} -> (fun (V10161) -> {'Idris.Prelude.Types.Left', V10161} end(E321)); {'Idris.Prelude.Types.Right', E322} -> (fun (V10162) -> begin (V10163 = (('un--nfToCFType'(V0, V10117, 1, V10162))(V10125))), case V10163 of {'Idris.Prelude.Types.Left', E323} -> (fun (V10164) -> {'Idris.Prelude.Types.Left', V10164} end(E323)); {'Idris.Prelude.Types.Right', E324} -> (fun (V10165) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V10159, V10165}} end(E324)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E322)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E320)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E318)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E313, E314, E315, E316)); _ -> case V3 of {'Idris.Core.Value.NTCon', E278, E279, E280, E281, E282} -> (fun (V10166, V10167, V10168, V10169, V10170) -> fun (V10171) -> begin (V10200 = begin (V10199 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V10172) -> fun (V10173) -> fun (V10174) -> fun (V10175) -> fun (V10176) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V10174, V10175, V10176)) end end end end end, fun (V10177) -> fun (V10178) -> fun (V10179) -> V10178 end end end, fun (V10180) -> fun (V10181) -> fun (V10182) -> fun (V10183) -> fun (V10184) -> begin (V10185 = (V10182(V10184))), begin (V10186 = (V10183(V10184))), (V10185(V10186)) end end end end end end end}, fun (V10187) -> fun (V10188) -> fun (V10189) -> fun (V10190) -> fun (V10191) -> begin (V10192 = (V10189(V10191))), ((V10190(V10192))(V10191)) end end end end end end, fun (V10193) -> fun (V10194) -> fun (V10195) -> begin (V10196 = (V10194(V10195))), (V10196(V10195)) end end end end}, fun (V10197) -> fun (V10198) -> V10198 end end}, V0))(V10171))), {'Idris.Prelude.Types.Right', V10199} end), case V10200 of {'Idris.Prelude.Types.Left', E283} -> (fun (V10201) -> {'Idris.Prelude.Types.Left', V10201} end(E283)); {'Idris.Prelude.Types.Right', E284} -> (fun (V10202) -> begin (V10207 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V10203) -> fun (V10204) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V10203, V10204)) end end, fun (V10205) -> fun (V10206) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V10205, V10206)) end end}, V10167, V10171))), case V10207 of {'Idris.Prelude.Types.Left', E285} -> (fun (V10208) -> {'Idris.Prelude.Types.Left', V10208} end(E285)); {'Idris.Prelude.Types.Right', E286} -> (fun (V10209) -> begin (V10210 = (('un--getNArgs'(V0, V10202, V10209, V10170))(V10171))), case V10210 of {'Idris.Prelude.Types.Left', E287} -> (fun (V10211) -> {'Idris.Prelude.Types.Left', V10211} end(E287)); {'Idris.Prelude.Types.Right', E288} -> (fun (V10212) -> case V10212 of {'Idris.Compiler.CompileExpr.User', E289, E290} -> (fun (V10213, V10214) -> begin (V10216 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10215) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10202, V10215)) end, V10214))(V10171))), case V10216 of {'Idris.Prelude.Types.Left', E291} -> (fun (V10217) -> {'Idris.Prelude.Types.Left', V10217} end(E291)); {'Idris.Prelude.Types.Right', E292} -> (fun (V10218) -> begin (V10220 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10219) -> ('un--nfToCFType'(V0, V10166, V2, V10219)) end, V10218))(V10171))), case V10220 of {'Idris.Prelude.Types.Left', E293} -> (fun (V10221) -> {'Idris.Prelude.Types.Left', V10221} end(E293)); {'Idris.Prelude.Types.Right', E294} -> (fun (V10222) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V10209, V10222}} end(E294)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E292)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E289, E290)); {'Idris.Compiler.CompileExpr.Struct', E295, E296} -> (fun (V10223, V10224) -> begin (V10235 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10225) -> case V10225 of {'Idris.Builtin.MkPair', E297, E298} -> (fun (V10226, V10227) -> fun (V10228) -> begin (V10229 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10202, V10227))(V10228))), case V10229 of {'Idris.Prelude.Types.Left', E299} -> (fun (V10230) -> {'Idris.Prelude.Types.Left', V10230} end(E299)); {'Idris.Prelude.Types.Right', E300} -> (fun (V10231) -> begin (V10232 = (('un--nfToCFType'(V0, V10166, 0, V10231))(V10228))), case V10232 of {'Idris.Prelude.Types.Left', E301} -> (fun (V10233) -> {'Idris.Prelude.Types.Left', V10233} end(E301)); {'Idris.Prelude.Types.Right', E302} -> (fun (V10234) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V10226, V10234}} end(E302)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E300)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E297, E298)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V10224))(V10171))), case V10235 of {'Idris.Prelude.Types.Left', E303} -> (fun (V10236) -> {'Idris.Prelude.Types.Left', V10236} end(E303)); {'Idris.Prelude.Types.Right', E304} -> (fun (V10237) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V10223, V10237}} end(E304)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E295, E296)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E305} -> (fun (V10238) -> begin (V10239 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10202, V10238))(V10171))), case V10239 of {'Idris.Prelude.Types.Left', E306} -> (fun (V10240) -> {'Idris.Prelude.Types.Left', V10240} end(E306)); {'Idris.Prelude.Types.Right', E307} -> (fun (V10241) -> begin (V10242 = (('un--nfToCFType'(V0, V10166, V2, V10241))(V10171))), case V10242 of {'Idris.Prelude.Types.Left', E308} -> (fun (V10243) -> {'Idris.Prelude.Types.Left', V10243} end(E308)); {'Idris.Prelude.Types.Right', E309} -> (fun (V10244) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V10244}} end(E309)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E307)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E305)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E288)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E286)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E284)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E278, E279, E280, E281, E282)); {'Idris.Core.Value.NType', E310} -> (fun (V10245) -> fun (V10246) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E310)); {'Idris.Core.Value.NErased', E311, E312} -> (fun (V10247, V10248) -> fun (V10249) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E311, E312)); _ -> fun (V10250) -> begin (V10279 = begin (V10278 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V10251) -> fun (V10252) -> fun (V10253) -> fun (V10254) -> fun (V10255) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V10253, V10254, V10255)) end end end end end, fun (V10256) -> fun (V10257) -> fun (V10258) -> V10257 end end end, fun (V10259) -> fun (V10260) -> fun (V10261) -> fun (V10262) -> fun (V10263) -> begin (V10264 = (V10261(V10263))), begin (V10265 = (V10262(V10263))), (V10264(V10265)) end end end end end end end}, fun (V10266) -> fun (V10267) -> fun (V10268) -> fun (V10269) -> fun (V10270) -> begin (V10271 = (V10268(V10270))), ((V10269(V10271))(V10270)) end end end end end end, fun (V10272) -> fun (V10273) -> fun (V10274) -> begin (V10275 = (V10273(V10274))), (V10275(V10274)) end end end end}, fun (V10276) -> fun (V10277) -> V10277 end end}, V0))(V10250))), {'Idris.Prelude.Types.Right', V10278} end), case V10279 of {'Idris.Prelude.Types.Left', E272} -> (fun (V10280) -> {'Idris.Prelude.Types.Left', V10280} end(E272)); {'Idris.Prelude.Types.Right', E273} -> (fun (V10281) -> begin (V10282 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V10281, {'Idris.Core.Env.Nil'}, V3, V10250))), case V10282 of {'Idris.Prelude.Types.Left', E274} -> (fun (V10283) -> {'Idris.Prelude.Types.Left', V10283} end(E274)); {'Idris.Prelude.Types.Right', E275} -> (fun (V10284) -> begin (V10289 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V10285) -> fun (V10286) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V10285, V10286)) end end, fun (V10287) -> fun (V10288) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V10287, V10288)) end end}, V10284, V10250))), case V10289 of {'Idris.Prelude.Types.Left', E276} -> (fun (V10290) -> {'Idris.Prelude.Types.Left', V10290} end(E276)); {'Idris.Prelude.Types.Right', E277} -> (fun (V10291) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V10291))))}, V10250)) end(E277)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E275)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E273)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E268, E269, E270, E271)); _ -> case V3 of {'Idris.Core.Value.NTCon', E233, E234, E235, E236, E237} -> (fun (V10292, V10293, V10294, V10295, V10296) -> fun (V10297) -> begin (V10326 = begin (V10325 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V10298) -> fun (V10299) -> fun (V10300) -> fun (V10301) -> fun (V10302) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V10300, V10301, V10302)) end end end end end, fun (V10303) -> fun (V10304) -> fun (V10305) -> V10304 end end end, fun (V10306) -> fun (V10307) -> fun (V10308) -> fun (V10309) -> fun (V10310) -> begin (V10311 = (V10308(V10310))), begin (V10312 = (V10309(V10310))), (V10311(V10312)) end end end end end end end}, fun (V10313) -> fun (V10314) -> fun (V10315) -> fun (V10316) -> fun (V10317) -> begin (V10318 = (V10315(V10317))), ((V10316(V10318))(V10317)) end end end end end end, fun (V10319) -> fun (V10320) -> fun (V10321) -> begin (V10322 = (V10320(V10321))), (V10322(V10321)) end end end end}, fun (V10323) -> fun (V10324) -> V10324 end end}, V0))(V10297))), {'Idris.Prelude.Types.Right', V10325} end), case V10326 of {'Idris.Prelude.Types.Left', E238} -> (fun (V10327) -> {'Idris.Prelude.Types.Left', V10327} end(E238)); {'Idris.Prelude.Types.Right', E239} -> (fun (V10328) -> begin (V10333 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V10329) -> fun (V10330) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V10329, V10330)) end end, fun (V10331) -> fun (V10332) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V10331, V10332)) end end}, V10293, V10297))), case V10333 of {'Idris.Prelude.Types.Left', E240} -> (fun (V10334) -> {'Idris.Prelude.Types.Left', V10334} end(E240)); {'Idris.Prelude.Types.Right', E241} -> (fun (V10335) -> begin (V10336 = (('un--getNArgs'(V0, V10328, V10335, V10296))(V10297))), case V10336 of {'Idris.Prelude.Types.Left', E242} -> (fun (V10337) -> {'Idris.Prelude.Types.Left', V10337} end(E242)); {'Idris.Prelude.Types.Right', E243} -> (fun (V10338) -> case V10338 of {'Idris.Compiler.CompileExpr.User', E244, E245} -> (fun (V10339, V10340) -> begin (V10342 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10341) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10328, V10341)) end, V10340))(V10297))), case V10342 of {'Idris.Prelude.Types.Left', E246} -> (fun (V10343) -> {'Idris.Prelude.Types.Left', V10343} end(E246)); {'Idris.Prelude.Types.Right', E247} -> (fun (V10344) -> begin (V10346 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10345) -> ('un--nfToCFType'(V0, V10292, V2, V10345)) end, V10344))(V10297))), case V10346 of {'Idris.Prelude.Types.Left', E248} -> (fun (V10347) -> {'Idris.Prelude.Types.Left', V10347} end(E248)); {'Idris.Prelude.Types.Right', E249} -> (fun (V10348) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V10335, V10348}} end(E249)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E247)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E244, E245)); {'Idris.Compiler.CompileExpr.Struct', E250, E251} -> (fun (V10349, V10350) -> begin (V10361 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10351) -> case V10351 of {'Idris.Builtin.MkPair', E252, E253} -> (fun (V10352, V10353) -> fun (V10354) -> begin (V10355 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10328, V10353))(V10354))), case V10355 of {'Idris.Prelude.Types.Left', E254} -> (fun (V10356) -> {'Idris.Prelude.Types.Left', V10356} end(E254)); {'Idris.Prelude.Types.Right', E255} -> (fun (V10357) -> begin (V10358 = (('un--nfToCFType'(V0, V10292, 0, V10357))(V10354))), case V10358 of {'Idris.Prelude.Types.Left', E256} -> (fun (V10359) -> {'Idris.Prelude.Types.Left', V10359} end(E256)); {'Idris.Prelude.Types.Right', E257} -> (fun (V10360) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V10352, V10360}} end(E257)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E255)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E252, E253)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V10350))(V10297))), case V10361 of {'Idris.Prelude.Types.Left', E258} -> (fun (V10362) -> {'Idris.Prelude.Types.Left', V10362} end(E258)); {'Idris.Prelude.Types.Right', E259} -> (fun (V10363) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V10349, V10363}} end(E259)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E250, E251)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E260} -> (fun (V10364) -> begin (V10365 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10328, V10364))(V10297))), case V10365 of {'Idris.Prelude.Types.Left', E261} -> (fun (V10366) -> {'Idris.Prelude.Types.Left', V10366} end(E261)); {'Idris.Prelude.Types.Right', E262} -> (fun (V10367) -> begin (V10368 = (('un--nfToCFType'(V0, V10292, V2, V10367))(V10297))), case V10368 of {'Idris.Prelude.Types.Left', E263} -> (fun (V10369) -> {'Idris.Prelude.Types.Left', V10369} end(E263)); {'Idris.Prelude.Types.Right', E264} -> (fun (V10370) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V10370}} end(E264)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E262)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E260)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E243)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E241)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E239)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E233, E234, E235, E236, E237)); {'Idris.Core.Value.NType', E265} -> (fun (V10371) -> fun (V10372) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E265)); {'Idris.Core.Value.NErased', E266, E267} -> (fun (V10373, V10374) -> fun (V10375) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E266, E267)); _ -> fun (V10376) -> begin (V10405 = begin (V10404 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V10377) -> fun (V10378) -> fun (V10379) -> fun (V10380) -> fun (V10381) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V10379, V10380, V10381)) end end end end end, fun (V10382) -> fun (V10383) -> fun (V10384) -> V10383 end end end, fun (V10385) -> fun (V10386) -> fun (V10387) -> fun (V10388) -> fun (V10389) -> begin (V10390 = (V10387(V10389))), begin (V10391 = (V10388(V10389))), (V10390(V10391)) end end end end end end end}, fun (V10392) -> fun (V10393) -> fun (V10394) -> fun (V10395) -> fun (V10396) -> begin (V10397 = (V10394(V10396))), ((V10395(V10397))(V10396)) end end end end end end, fun (V10398) -> fun (V10399) -> fun (V10400) -> begin (V10401 = (V10399(V10400))), (V10401(V10400)) end end end end}, fun (V10402) -> fun (V10403) -> V10403 end end}, V0))(V10376))), {'Idris.Prelude.Types.Right', V10404} end), case V10405 of {'Idris.Prelude.Types.Left', E227} -> (fun (V10406) -> {'Idris.Prelude.Types.Left', V10406} end(E227)); {'Idris.Prelude.Types.Right', E228} -> (fun (V10407) -> begin (V10408 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V10407, {'Idris.Core.Env.Nil'}, V3, V10376))), case V10408 of {'Idris.Prelude.Types.Left', E229} -> (fun (V10409) -> {'Idris.Prelude.Types.Left', V10409} end(E229)); {'Idris.Prelude.Types.Right', E230} -> (fun (V10410) -> begin (V10415 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V10411) -> fun (V10412) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V10411, V10412)) end end, fun (V10413) -> fun (V10414) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V10413, V10414)) end end}, V10410, V10376))), case V10415 of {'Idris.Prelude.Types.Left', E231} -> (fun (V10416) -> {'Idris.Prelude.Types.Left', V10416} end(E231)); {'Idris.Prelude.Types.Right', E232} -> (fun (V10417) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V10417))))}, V10376)) end(E232)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E230)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E228)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E366, E367, E368, E369} -> (fun (V10418, V10419, V10420, V10421) -> fun (V10422) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V10418, <<"Function types not allowed in a foreign struct"/utf8>>}, V10422)) end end(E366, E367, E368, E369)); _ -> case V3 of {'Idris.Core.Value.NTCon', E331, E332, E333, E334, E335} -> (fun (V10423, V10424, V10425, V10426, V10427) -> fun (V10428) -> begin (V10457 = begin (V10456 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V10429) -> fun (V10430) -> fun (V10431) -> fun (V10432) -> fun (V10433) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V10431, V10432, V10433)) end end end end end, fun (V10434) -> fun (V10435) -> fun (V10436) -> V10435 end end end, fun (V10437) -> fun (V10438) -> fun (V10439) -> fun (V10440) -> fun (V10441) -> begin (V10442 = (V10439(V10441))), begin (V10443 = (V10440(V10441))), (V10442(V10443)) end end end end end end end}, fun (V10444) -> fun (V10445) -> fun (V10446) -> fun (V10447) -> fun (V10448) -> begin (V10449 = (V10446(V10448))), ((V10447(V10449))(V10448)) end end end end end end, fun (V10450) -> fun (V10451) -> fun (V10452) -> begin (V10453 = (V10451(V10452))), (V10453(V10452)) end end end end}, fun (V10454) -> fun (V10455) -> V10455 end end}, V0))(V10428))), {'Idris.Prelude.Types.Right', V10456} end), case V10457 of {'Idris.Prelude.Types.Left', E336} -> (fun (V10458) -> {'Idris.Prelude.Types.Left', V10458} end(E336)); {'Idris.Prelude.Types.Right', E337} -> (fun (V10459) -> begin (V10464 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V10460) -> fun (V10461) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V10460, V10461)) end end, fun (V10462) -> fun (V10463) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V10462, V10463)) end end}, V10424, V10428))), case V10464 of {'Idris.Prelude.Types.Left', E338} -> (fun (V10465) -> {'Idris.Prelude.Types.Left', V10465} end(E338)); {'Idris.Prelude.Types.Right', E339} -> (fun (V10466) -> begin (V10467 = (('un--getNArgs'(V0, V10459, V10466, V10427))(V10428))), case V10467 of {'Idris.Prelude.Types.Left', E340} -> (fun (V10468) -> {'Idris.Prelude.Types.Left', V10468} end(E340)); {'Idris.Prelude.Types.Right', E341} -> (fun (V10469) -> case V10469 of {'Idris.Compiler.CompileExpr.User', E342, E343} -> (fun (V10470, V10471) -> begin (V10473 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10472) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10459, V10472)) end, V10471))(V10428))), case V10473 of {'Idris.Prelude.Types.Left', E344} -> (fun (V10474) -> {'Idris.Prelude.Types.Left', V10474} end(E344)); {'Idris.Prelude.Types.Right', E345} -> (fun (V10475) -> begin (V10477 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10476) -> ('un--nfToCFType'(V0, V10423, V2, V10476)) end, V10475))(V10428))), case V10477 of {'Idris.Prelude.Types.Left', E346} -> (fun (V10478) -> {'Idris.Prelude.Types.Left', V10478} end(E346)); {'Idris.Prelude.Types.Right', E347} -> (fun (V10479) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V10466, V10479}} end(E347)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E345)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E342, E343)); {'Idris.Compiler.CompileExpr.Struct', E348, E349} -> (fun (V10480, V10481) -> begin (V10492 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10482) -> case V10482 of {'Idris.Builtin.MkPair', E350, E351} -> (fun (V10483, V10484) -> fun (V10485) -> begin (V10486 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10459, V10484))(V10485))), case V10486 of {'Idris.Prelude.Types.Left', E352} -> (fun (V10487) -> {'Idris.Prelude.Types.Left', V10487} end(E352)); {'Idris.Prelude.Types.Right', E353} -> (fun (V10488) -> begin (V10489 = (('un--nfToCFType'(V0, V10423, 0, V10488))(V10485))), case V10489 of {'Idris.Prelude.Types.Left', E354} -> (fun (V10490) -> {'Idris.Prelude.Types.Left', V10490} end(E354)); {'Idris.Prelude.Types.Right', E355} -> (fun (V10491) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V10483, V10491}} end(E355)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E353)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E350, E351)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V10481))(V10428))), case V10492 of {'Idris.Prelude.Types.Left', E356} -> (fun (V10493) -> {'Idris.Prelude.Types.Left', V10493} end(E356)); {'Idris.Prelude.Types.Right', E357} -> (fun (V10494) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V10480, V10494}} end(E357)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E348, E349)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E358} -> (fun (V10495) -> begin (V10496 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10459, V10495))(V10428))), case V10496 of {'Idris.Prelude.Types.Left', E359} -> (fun (V10497) -> {'Idris.Prelude.Types.Left', V10497} end(E359)); {'Idris.Prelude.Types.Right', E360} -> (fun (V10498) -> begin (V10499 = (('un--nfToCFType'(V0, V10423, V2, V10498))(V10428))), case V10499 of {'Idris.Prelude.Types.Left', E361} -> (fun (V10500) -> {'Idris.Prelude.Types.Left', V10500} end(E361)); {'Idris.Prelude.Types.Right', E362} -> (fun (V10501) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V10501}} end(E362)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E360)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E358)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E341)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E339)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E337)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E331, E332, E333, E334, E335)); {'Idris.Core.Value.NType', E363} -> (fun (V10502) -> fun (V10503) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E363)); {'Idris.Core.Value.NErased', E364, E365} -> (fun (V10504, V10505) -> fun (V10506) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E364, E365)); _ -> fun (V10507) -> begin (V10536 = begin (V10535 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V10508) -> fun (V10509) -> fun (V10510) -> fun (V10511) -> fun (V10512) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V10510, V10511, V10512)) end end end end end, fun (V10513) -> fun (V10514) -> fun (V10515) -> V10514 end end end, fun (V10516) -> fun (V10517) -> fun (V10518) -> fun (V10519) -> fun (V10520) -> begin (V10521 = (V10518(V10520))), begin (V10522 = (V10519(V10520))), (V10521(V10522)) end end end end end end end}, fun (V10523) -> fun (V10524) -> fun (V10525) -> fun (V10526) -> fun (V10527) -> begin (V10528 = (V10525(V10527))), ((V10526(V10528))(V10527)) end end end end end end, fun (V10529) -> fun (V10530) -> fun (V10531) -> begin (V10532 = (V10530(V10531))), (V10532(V10531)) end end end end}, fun (V10533) -> fun (V10534) -> V10534 end end}, V0))(V10507))), {'Idris.Prelude.Types.Right', V10535} end), case V10536 of {'Idris.Prelude.Types.Left', E325} -> (fun (V10537) -> {'Idris.Prelude.Types.Left', V10537} end(E325)); {'Idris.Prelude.Types.Right', E326} -> (fun (V10538) -> begin (V10539 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V10538, {'Idris.Core.Env.Nil'}, V3, V10507))), case V10539 of {'Idris.Prelude.Types.Left', E327} -> (fun (V10540) -> {'Idris.Prelude.Types.Left', V10540} end(E327)); {'Idris.Prelude.Types.Right', E328} -> (fun (V10541) -> begin (V10546 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V10542) -> fun (V10543) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V10542, V10543)) end end, fun (V10544) -> fun (V10545) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V10544, V10545)) end end}, V10541, V10507))), case V10546 of {'Idris.Prelude.Types.Left', E329} -> (fun (V10547) -> {'Idris.Prelude.Types.Left', V10547} end(E329)); {'Idris.Prelude.Types.Right', E330} -> (fun (V10548) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V10548))))}, V10507)) end(E330)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E328)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E326)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E192, E193, E194, E195, E196} -> (fun (V10549, V10550, V10551, V10552, V10553) -> fun (V10554) -> begin (V10583 = begin (V10582 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V10555) -> fun (V10556) -> fun (V10557) -> fun (V10558) -> fun (V10559) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V10557, V10558, V10559)) end end end end end, fun (V10560) -> fun (V10561) -> fun (V10562) -> V10561 end end end, fun (V10563) -> fun (V10564) -> fun (V10565) -> fun (V10566) -> fun (V10567) -> begin (V10568 = (V10565(V10567))), begin (V10569 = (V10566(V10567))), (V10568(V10569)) end end end end end end end}, fun (V10570) -> fun (V10571) -> fun (V10572) -> fun (V10573) -> fun (V10574) -> begin (V10575 = (V10572(V10574))), ((V10573(V10575))(V10574)) end end end end end end, fun (V10576) -> fun (V10577) -> fun (V10578) -> begin (V10579 = (V10577(V10578))), (V10579(V10578)) end end end end}, fun (V10580) -> fun (V10581) -> V10581 end end}, V0))(V10554))), {'Idris.Prelude.Types.Right', V10582} end), case V10583 of {'Idris.Prelude.Types.Left', E197} -> (fun (V10584) -> {'Idris.Prelude.Types.Left', V10584} end(E197)); {'Idris.Prelude.Types.Right', E198} -> (fun (V10585) -> begin (V10590 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V10586) -> fun (V10587) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V10586, V10587)) end end, fun (V10588) -> fun (V10589) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V10588, V10589)) end end}, V10550, V10554))), case V10590 of {'Idris.Prelude.Types.Left', E199} -> (fun (V10591) -> {'Idris.Prelude.Types.Left', V10591} end(E199)); {'Idris.Prelude.Types.Right', E200} -> (fun (V10592) -> begin (V10593 = (('un--getNArgs'(V0, V10585, V10592, V10553))(V10554))), case V10593 of {'Idris.Prelude.Types.Left', E201} -> (fun (V10594) -> {'Idris.Prelude.Types.Left', V10594} end(E201)); {'Idris.Prelude.Types.Right', E202} -> (fun (V10595) -> case V10595 of {'Idris.Compiler.CompileExpr.User', E203, E204} -> (fun (V10596, V10597) -> begin (V10599 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10598) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10585, V10598)) end, V10597))(V10554))), case V10599 of {'Idris.Prelude.Types.Left', E205} -> (fun (V10600) -> {'Idris.Prelude.Types.Left', V10600} end(E205)); {'Idris.Prelude.Types.Right', E206} -> (fun (V10601) -> begin (V10603 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10602) -> ('un--nfToCFType'(V0, V10549, V2, V10602)) end, V10601))(V10554))), case V10603 of {'Idris.Prelude.Types.Left', E207} -> (fun (V10604) -> {'Idris.Prelude.Types.Left', V10604} end(E207)); {'Idris.Prelude.Types.Right', E208} -> (fun (V10605) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V10592, V10605}} end(E208)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E206)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E203, E204)); {'Idris.Compiler.CompileExpr.Struct', E209, E210} -> (fun (V10606, V10607) -> begin (V10618 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10608) -> case V10608 of {'Idris.Builtin.MkPair', E211, E212} -> (fun (V10609, V10610) -> fun (V10611) -> begin (V10612 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10585, V10610))(V10611))), case V10612 of {'Idris.Prelude.Types.Left', E213} -> (fun (V10613) -> {'Idris.Prelude.Types.Left', V10613} end(E213)); {'Idris.Prelude.Types.Right', E214} -> (fun (V10614) -> begin (V10615 = (('un--nfToCFType'(V0, V10549, 0, V10614))(V10611))), case V10615 of {'Idris.Prelude.Types.Left', E215} -> (fun (V10616) -> {'Idris.Prelude.Types.Left', V10616} end(E215)); {'Idris.Prelude.Types.Right', E216} -> (fun (V10617) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V10609, V10617}} end(E216)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E214)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E211, E212)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V10607))(V10554))), case V10618 of {'Idris.Prelude.Types.Left', E217} -> (fun (V10619) -> {'Idris.Prelude.Types.Left', V10619} end(E217)); {'Idris.Prelude.Types.Right', E218} -> (fun (V10620) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V10606, V10620}} end(E218)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E209, E210)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E219} -> (fun (V10621) -> begin (V10622 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10585, V10621))(V10554))), case V10622 of {'Idris.Prelude.Types.Left', E220} -> (fun (V10623) -> {'Idris.Prelude.Types.Left', V10623} end(E220)); {'Idris.Prelude.Types.Right', E221} -> (fun (V10624) -> begin (V10625 = (('un--nfToCFType'(V0, V10549, V2, V10624))(V10554))), case V10625 of {'Idris.Prelude.Types.Left', E222} -> (fun (V10626) -> {'Idris.Prelude.Types.Left', V10626} end(E222)); {'Idris.Prelude.Types.Right', E223} -> (fun (V10627) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V10627}} end(E223)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E221)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E219)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E202)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E200)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E198)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E192, E193, E194, E195, E196)); {'Idris.Core.Value.NType', E224} -> (fun (V10628) -> fun (V10629) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E224)); {'Idris.Core.Value.NErased', E225, E226} -> (fun (V10630, V10631) -> fun (V10632) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E225, E226)); _ -> fun (V10633) -> begin (V10662 = begin (V10661 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V10634) -> fun (V10635) -> fun (V10636) -> fun (V10637) -> fun (V10638) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V10636, V10637, V10638)) end end end end end, fun (V10639) -> fun (V10640) -> fun (V10641) -> V10640 end end end, fun (V10642) -> fun (V10643) -> fun (V10644) -> fun (V10645) -> fun (V10646) -> begin (V10647 = (V10644(V10646))), begin (V10648 = (V10645(V10646))), (V10647(V10648)) end end end end end end end}, fun (V10649) -> fun (V10650) -> fun (V10651) -> fun (V10652) -> fun (V10653) -> begin (V10654 = (V10651(V10653))), ((V10652(V10654))(V10653)) end end end end end end, fun (V10655) -> fun (V10656) -> fun (V10657) -> begin (V10658 = (V10656(V10657))), (V10658(V10657)) end end end end}, fun (V10659) -> fun (V10660) -> V10660 end end}, V0))(V10633))), {'Idris.Prelude.Types.Right', V10661} end), case V10662 of {'Idris.Prelude.Types.Left', E186} -> (fun (V10663) -> {'Idris.Prelude.Types.Left', V10663} end(E186)); {'Idris.Prelude.Types.Right', E187} -> (fun (V10664) -> begin (V10665 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V10664, {'Idris.Core.Env.Nil'}, V3, V10633))), case V10665 of {'Idris.Prelude.Types.Left', E188} -> (fun (V10666) -> {'Idris.Prelude.Types.Left', V10666} end(E188)); {'Idris.Prelude.Types.Right', E189} -> (fun (V10667) -> begin (V10672 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V10668) -> fun (V10669) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V10668, V10669)) end end, fun (V10670) -> fun (V10671) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V10670, V10671)) end end}, V10667, V10633))), case V10672 of {'Idris.Prelude.Types.Left', E190} -> (fun (V10673) -> {'Idris.Prelude.Types.Left', V10673} end(E190)); {'Idris.Prelude.Types.Right', E191} -> (fun (V10674) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V10674))))}, V10633)) end(E191)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E189)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E187)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end end(E184, E185)); _ -> case V2 of 1 -> case V3 of {'Idris.Core.Value.NBind', E82, E83, E84, E85} -> (fun (V10675, V10676, V10677, V10678) -> case V10677 of {'Idris.Core.TT.Pi', E127, E128, E129, E130} -> (fun (V10679, V10680, V10681, V10682) -> fun (V10683) -> begin (V10712 = begin (V10711 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V10684) -> fun (V10685) -> fun (V10686) -> fun (V10687) -> fun (V10688) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V10686, V10687, V10688)) end end end end end, fun (V10689) -> fun (V10690) -> fun (V10691) -> V10690 end end end, fun (V10692) -> fun (V10693) -> fun (V10694) -> fun (V10695) -> fun (V10696) -> begin (V10697 = (V10694(V10696))), begin (V10698 = (V10695(V10696))), (V10697(V10698)) end end end end end end end}, fun (V10699) -> fun (V10700) -> fun (V10701) -> fun (V10702) -> fun (V10703) -> begin (V10704 = (V10701(V10703))), ((V10702(V10704))(V10703)) end end end end end end, fun (V10705) -> fun (V10706) -> fun (V10707) -> begin (V10708 = (V10706(V10707))), (V10708(V10707)) end end end end}, fun (V10709) -> fun (V10710) -> V10710 end end}, V0))(V10683))), {'Idris.Prelude.Types.Right', V10711} end), case V10712 of {'Idris.Prelude.Types.Left', E131} -> (fun (V10713) -> {'Idris.Prelude.Types.Left', V10713} end(E131)); {'Idris.Prelude.Types.Right', E132} -> (fun (V10714) -> begin (V10715 = (('un--nfToCFType'(V0, V10675, 1, V10682))(V10683))), case V10715 of {'Idris.Prelude.Types.Left', E133} -> (fun (V10716) -> {'Idris.Prelude.Types.Left', V10716} end(E133)); {'Idris.Prelude.Types.Right', E134} -> (fun (V10717) -> begin (V10718 = (((V10678(V10714))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V10675, 1}))))(V10683))), case V10718 of {'Idris.Prelude.Types.Left', E135} -> (fun (V10719) -> {'Idris.Prelude.Types.Left', V10719} end(E135)); {'Idris.Prelude.Types.Right', E136} -> (fun (V10720) -> begin (V10721 = (('un--nfToCFType'(V0, V10675, 1, V10720))(V10683))), case V10721 of {'Idris.Prelude.Types.Left', E137} -> (fun (V10722) -> {'Idris.Prelude.Types.Left', V10722} end(E137)); {'Idris.Prelude.Types.Right', E138} -> (fun (V10723) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFFun', V10717, V10723}} end(E138)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E136)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E134)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E132)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E127, E128, E129, E130)); _ -> case V3 of {'Idris.Core.Value.NTCon', E92, E93, E94, E95, E96} -> (fun (V10724, V10725, V10726, V10727, V10728) -> fun (V10729) -> begin (V10758 = begin (V10757 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V10730) -> fun (V10731) -> fun (V10732) -> fun (V10733) -> fun (V10734) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V10732, V10733, V10734)) end end end end end, fun (V10735) -> fun (V10736) -> fun (V10737) -> V10736 end end end, fun (V10738) -> fun (V10739) -> fun (V10740) -> fun (V10741) -> fun (V10742) -> begin (V10743 = (V10740(V10742))), begin (V10744 = (V10741(V10742))), (V10743(V10744)) end end end end end end end}, fun (V10745) -> fun (V10746) -> fun (V10747) -> fun (V10748) -> fun (V10749) -> begin (V10750 = (V10747(V10749))), ((V10748(V10750))(V10749)) end end end end end end, fun (V10751) -> fun (V10752) -> fun (V10753) -> begin (V10754 = (V10752(V10753))), (V10754(V10753)) end end end end}, fun (V10755) -> fun (V10756) -> V10756 end end}, V0))(V10729))), {'Idris.Prelude.Types.Right', V10757} end), case V10758 of {'Idris.Prelude.Types.Left', E97} -> (fun (V10759) -> {'Idris.Prelude.Types.Left', V10759} end(E97)); {'Idris.Prelude.Types.Right', E98} -> (fun (V10760) -> begin (V10765 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V10761) -> fun (V10762) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V10761, V10762)) end end, fun (V10763) -> fun (V10764) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V10763, V10764)) end end}, V10725, V10729))), case V10765 of {'Idris.Prelude.Types.Left', E99} -> (fun (V10766) -> {'Idris.Prelude.Types.Left', V10766} end(E99)); {'Idris.Prelude.Types.Right', E100} -> (fun (V10767) -> begin (V10768 = (('un--getNArgs'(V0, V10760, V10767, V10728))(V10729))), case V10768 of {'Idris.Prelude.Types.Left', E101} -> (fun (V10769) -> {'Idris.Prelude.Types.Left', V10769} end(E101)); {'Idris.Prelude.Types.Right', E102} -> (fun (V10770) -> case V10770 of {'Idris.Compiler.CompileExpr.User', E103, E104} -> (fun (V10771, V10772) -> begin (V10774 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10773) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10760, V10773)) end, V10772))(V10729))), case V10774 of {'Idris.Prelude.Types.Left', E105} -> (fun (V10775) -> {'Idris.Prelude.Types.Left', V10775} end(E105)); {'Idris.Prelude.Types.Right', E106} -> (fun (V10776) -> begin (V10778 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10777) -> ('un--nfToCFType'(V0, V10724, V2, V10777)) end, V10776))(V10729))), case V10778 of {'Idris.Prelude.Types.Left', E107} -> (fun (V10779) -> {'Idris.Prelude.Types.Left', V10779} end(E107)); {'Idris.Prelude.Types.Right', E108} -> (fun (V10780) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V10767, V10780}} end(E108)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E106)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E103, E104)); {'Idris.Compiler.CompileExpr.Struct', E109, E110} -> (fun (V10781, V10782) -> begin (V10793 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10783) -> case V10783 of {'Idris.Builtin.MkPair', E111, E112} -> (fun (V10784, V10785) -> fun (V10786) -> begin (V10787 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10760, V10785))(V10786))), case V10787 of {'Idris.Prelude.Types.Left', E113} -> (fun (V10788) -> {'Idris.Prelude.Types.Left', V10788} end(E113)); {'Idris.Prelude.Types.Right', E114} -> (fun (V10789) -> begin (V10790 = (('un--nfToCFType'(V0, V10724, 0, V10789))(V10786))), case V10790 of {'Idris.Prelude.Types.Left', E115} -> (fun (V10791) -> {'Idris.Prelude.Types.Left', V10791} end(E115)); {'Idris.Prelude.Types.Right', E116} -> (fun (V10792) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V10784, V10792}} end(E116)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E114)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E111, E112)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V10782))(V10729))), case V10793 of {'Idris.Prelude.Types.Left', E117} -> (fun (V10794) -> {'Idris.Prelude.Types.Left', V10794} end(E117)); {'Idris.Prelude.Types.Right', E118} -> (fun (V10795) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V10781, V10795}} end(E118)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E109, E110)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E119} -> (fun (V10796) -> begin (V10797 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10760, V10796))(V10729))), case V10797 of {'Idris.Prelude.Types.Left', E120} -> (fun (V10798) -> {'Idris.Prelude.Types.Left', V10798} end(E120)); {'Idris.Prelude.Types.Right', E121} -> (fun (V10799) -> begin (V10800 = (('un--nfToCFType'(V0, V10724, V2, V10799))(V10729))), case V10800 of {'Idris.Prelude.Types.Left', E122} -> (fun (V10801) -> {'Idris.Prelude.Types.Left', V10801} end(E122)); {'Idris.Prelude.Types.Right', E123} -> (fun (V10802) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V10802}} end(E123)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E121)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E119)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E102)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E100)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E98)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E92, E93, E94, E95, E96)); {'Idris.Core.Value.NType', E124} -> (fun (V10803) -> fun (V10804) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E124)); {'Idris.Core.Value.NErased', E125, E126} -> (fun (V10805, V10806) -> fun (V10807) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E125, E126)); _ -> fun (V10808) -> begin (V10837 = begin (V10836 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V10809) -> fun (V10810) -> fun (V10811) -> fun (V10812) -> fun (V10813) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V10811, V10812, V10813)) end end end end end, fun (V10814) -> fun (V10815) -> fun (V10816) -> V10815 end end end, fun (V10817) -> fun (V10818) -> fun (V10819) -> fun (V10820) -> fun (V10821) -> begin (V10822 = (V10819(V10821))), begin (V10823 = (V10820(V10821))), (V10822(V10823)) end end end end end end end}, fun (V10824) -> fun (V10825) -> fun (V10826) -> fun (V10827) -> fun (V10828) -> begin (V10829 = (V10826(V10828))), ((V10827(V10829))(V10828)) end end end end end end, fun (V10830) -> fun (V10831) -> fun (V10832) -> begin (V10833 = (V10831(V10832))), (V10833(V10832)) end end end end}, fun (V10834) -> fun (V10835) -> V10835 end end}, V0))(V10808))), {'Idris.Prelude.Types.Right', V10836} end), case V10837 of {'Idris.Prelude.Types.Left', E86} -> (fun (V10838) -> {'Idris.Prelude.Types.Left', V10838} end(E86)); {'Idris.Prelude.Types.Right', E87} -> (fun (V10839) -> begin (V10840 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V10839, {'Idris.Core.Env.Nil'}, V3, V10808))), case V10840 of {'Idris.Prelude.Types.Left', E88} -> (fun (V10841) -> {'Idris.Prelude.Types.Left', V10841} end(E88)); {'Idris.Prelude.Types.Right', E89} -> (fun (V10842) -> begin (V10847 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V10843) -> fun (V10844) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V10843, V10844)) end end, fun (V10845) -> fun (V10846) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V10845, V10846)) end end}, V10842, V10808))), case V10847 of {'Idris.Prelude.Types.Left', E90} -> (fun (V10848) -> {'Idris.Prelude.Types.Left', V10848} end(E90)); {'Idris.Prelude.Types.Right', E91} -> (fun (V10849) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V10849))))}, V10808)) end(E91)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E89)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E87)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end end(E82, E83, E84, E85)); _ -> case V3 of {'Idris.Core.Value.NTCon', E47, E48, E49, E50, E51} -> (fun (V10850, V10851, V10852, V10853, V10854) -> fun (V10855) -> begin (V10884 = begin (V10883 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V10856) -> fun (V10857) -> fun (V10858) -> fun (V10859) -> fun (V10860) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V10858, V10859, V10860)) end end end end end, fun (V10861) -> fun (V10862) -> fun (V10863) -> V10862 end end end, fun (V10864) -> fun (V10865) -> fun (V10866) -> fun (V10867) -> fun (V10868) -> begin (V10869 = (V10866(V10868))), begin (V10870 = (V10867(V10868))), (V10869(V10870)) end end end end end end end}, fun (V10871) -> fun (V10872) -> fun (V10873) -> fun (V10874) -> fun (V10875) -> begin (V10876 = (V10873(V10875))), ((V10874(V10876))(V10875)) end end end end end end, fun (V10877) -> fun (V10878) -> fun (V10879) -> begin (V10880 = (V10878(V10879))), (V10880(V10879)) end end end end}, fun (V10881) -> fun (V10882) -> V10882 end end}, V0))(V10855))), {'Idris.Prelude.Types.Right', V10883} end), case V10884 of {'Idris.Prelude.Types.Left', E52} -> (fun (V10885) -> {'Idris.Prelude.Types.Left', V10885} end(E52)); {'Idris.Prelude.Types.Right', E53} -> (fun (V10886) -> begin (V10891 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V10887) -> fun (V10888) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V10887, V10888)) end end, fun (V10889) -> fun (V10890) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V10889, V10890)) end end}, V10851, V10855))), case V10891 of {'Idris.Prelude.Types.Left', E54} -> (fun (V10892) -> {'Idris.Prelude.Types.Left', V10892} end(E54)); {'Idris.Prelude.Types.Right', E55} -> (fun (V10893) -> begin (V10894 = (('un--getNArgs'(V0, V10886, V10893, V10854))(V10855))), case V10894 of {'Idris.Prelude.Types.Left', E56} -> (fun (V10895) -> {'Idris.Prelude.Types.Left', V10895} end(E56)); {'Idris.Prelude.Types.Right', E57} -> (fun (V10896) -> case V10896 of {'Idris.Compiler.CompileExpr.User', E58, E59} -> (fun (V10897, V10898) -> begin (V10900 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10899) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10886, V10899)) end, V10898))(V10855))), case V10900 of {'Idris.Prelude.Types.Left', E60} -> (fun (V10901) -> {'Idris.Prelude.Types.Left', V10901} end(E60)); {'Idris.Prelude.Types.Right', E61} -> (fun (V10902) -> begin (V10904 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10903) -> ('un--nfToCFType'(V0, V10850, V2, V10903)) end, V10902))(V10855))), case V10904 of {'Idris.Prelude.Types.Left', E62} -> (fun (V10905) -> {'Idris.Prelude.Types.Left', V10905} end(E62)); {'Idris.Prelude.Types.Right', E63} -> (fun (V10906) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V10893, V10906}} end(E63)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E61)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E58, E59)); {'Idris.Compiler.CompileExpr.Struct', E64, E65} -> (fun (V10907, V10908) -> begin (V10919 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V10909) -> case V10909 of {'Idris.Builtin.MkPair', E66, E67} -> (fun (V10910, V10911) -> fun (V10912) -> begin (V10913 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10886, V10911))(V10912))), case V10913 of {'Idris.Prelude.Types.Left', E68} -> (fun (V10914) -> {'Idris.Prelude.Types.Left', V10914} end(E68)); {'Idris.Prelude.Types.Right', E69} -> (fun (V10915) -> begin (V10916 = (('un--nfToCFType'(V0, V10850, 0, V10915))(V10912))), case V10916 of {'Idris.Prelude.Types.Left', E70} -> (fun (V10917) -> {'Idris.Prelude.Types.Left', V10917} end(E70)); {'Idris.Prelude.Types.Right', E71} -> (fun (V10918) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V10910, V10918}} end(E71)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E69)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E66, E67)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V10908))(V10855))), case V10919 of {'Idris.Prelude.Types.Left', E72} -> (fun (V10920) -> {'Idris.Prelude.Types.Left', V10920} end(E72)); {'Idris.Prelude.Types.Right', E73} -> (fun (V10921) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V10907, V10921}} end(E73)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E64, E65)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E74} -> (fun (V10922) -> begin (V10923 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V10886, V10922))(V10855))), case V10923 of {'Idris.Prelude.Types.Left', E75} -> (fun (V10924) -> {'Idris.Prelude.Types.Left', V10924} end(E75)); {'Idris.Prelude.Types.Right', E76} -> (fun (V10925) -> begin (V10926 = (('un--nfToCFType'(V0, V10850, V2, V10925))(V10855))), case V10926 of {'Idris.Prelude.Types.Left', E77} -> (fun (V10927) -> {'Idris.Prelude.Types.Left', V10927} end(E77)); {'Idris.Prelude.Types.Right', E78} -> (fun (V10928) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V10928}} end(E78)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E76)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E74)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E57)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E55)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E53)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E47, E48, E49, E50, E51)); {'Idris.Core.Value.NType', E79} -> (fun (V10929) -> fun (V10930) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E79)); {'Idris.Core.Value.NErased', E80, E81} -> (fun (V10931, V10932) -> fun (V10933) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E80, E81)); _ -> fun (V10934) -> begin (V10963 = begin (V10962 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V10935) -> fun (V10936) -> fun (V10937) -> fun (V10938) -> fun (V10939) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V10937, V10938, V10939)) end end end end end, fun (V10940) -> fun (V10941) -> fun (V10942) -> V10941 end end end, fun (V10943) -> fun (V10944) -> fun (V10945) -> fun (V10946) -> fun (V10947) -> begin (V10948 = (V10945(V10947))), begin (V10949 = (V10946(V10947))), (V10948(V10949)) end end end end end end end}, fun (V10950) -> fun (V10951) -> fun (V10952) -> fun (V10953) -> fun (V10954) -> begin (V10955 = (V10952(V10954))), ((V10953(V10955))(V10954)) end end end end end end, fun (V10956) -> fun (V10957) -> fun (V10958) -> begin (V10959 = (V10957(V10958))), (V10959(V10958)) end end end end}, fun (V10960) -> fun (V10961) -> V10961 end end}, V0))(V10934))), {'Idris.Prelude.Types.Right', V10962} end), case V10963 of {'Idris.Prelude.Types.Left', E41} -> (fun (V10964) -> {'Idris.Prelude.Types.Left', V10964} end(E41)); {'Idris.Prelude.Types.Right', E42} -> (fun (V10965) -> begin (V10966 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V10965, {'Idris.Core.Env.Nil'}, V3, V10934))), case V10966 of {'Idris.Prelude.Types.Left', E43} -> (fun (V10967) -> {'Idris.Prelude.Types.Left', V10967} end(E43)); {'Idris.Prelude.Types.Right', E44} -> (fun (V10968) -> begin (V10973 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V10969) -> fun (V10970) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V10969, V10970)) end end, fun (V10971) -> fun (V10972) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V10971, V10972)) end end}, V10968, V10934))), case V10973 of {'Idris.Prelude.Types.Left', E45} -> (fun (V10974) -> {'Idris.Prelude.Types.Left', V10974} end(E45)); {'Idris.Prelude.Types.Right', E46} -> (fun (V10975) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V10975))))}, V10934)) end(E46)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E44)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E42)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; 0 -> case V3 of {'Idris.Core.Value.NBind', E180, E181, E182, E183} -> (fun (V10976, V10977, V10978, V10979) -> fun (V10980) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', V10976, <<"Function types not allowed in a foreign struct"/utf8>>}, V10980)) end end(E180, E181, E182, E183)); _ -> case V3 of {'Idris.Core.Value.NTCon', E145, E146, E147, E148, E149} -> (fun (V10981, V10982, V10983, V10984, V10985) -> fun (V10986) -> begin (V11015 = begin (V11014 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V10987) -> fun (V10988) -> fun (V10989) -> fun (V10990) -> fun (V10991) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V10989, V10990, V10991)) end end end end end, fun (V10992) -> fun (V10993) -> fun (V10994) -> V10993 end end end, fun (V10995) -> fun (V10996) -> fun (V10997) -> fun (V10998) -> fun (V10999) -> begin (V11000 = (V10997(V10999))), begin (V11001 = (V10998(V10999))), (V11000(V11001)) end end end end end end end}, fun (V11002) -> fun (V11003) -> fun (V11004) -> fun (V11005) -> fun (V11006) -> begin (V11007 = (V11004(V11006))), ((V11005(V11007))(V11006)) end end end end end end, fun (V11008) -> fun (V11009) -> fun (V11010) -> begin (V11011 = (V11009(V11010))), (V11011(V11010)) end end end end}, fun (V11012) -> fun (V11013) -> V11013 end end}, V0))(V10986))), {'Idris.Prelude.Types.Right', V11014} end), case V11015 of {'Idris.Prelude.Types.Left', E150} -> (fun (V11016) -> {'Idris.Prelude.Types.Left', V11016} end(E150)); {'Idris.Prelude.Types.Right', E151} -> (fun (V11017) -> begin (V11022 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V11018) -> fun (V11019) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V11018, V11019)) end end, fun (V11020) -> fun (V11021) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V11020, V11021)) end end}, V10982, V10986))), case V11022 of {'Idris.Prelude.Types.Left', E152} -> (fun (V11023) -> {'Idris.Prelude.Types.Left', V11023} end(E152)); {'Idris.Prelude.Types.Right', E153} -> (fun (V11024) -> begin (V11025 = (('un--getNArgs'(V0, V11017, V11024, V10985))(V10986))), case V11025 of {'Idris.Prelude.Types.Left', E154} -> (fun (V11026) -> {'Idris.Prelude.Types.Left', V11026} end(E154)); {'Idris.Prelude.Types.Right', E155} -> (fun (V11027) -> case V11027 of {'Idris.Compiler.CompileExpr.User', E156, E157} -> (fun (V11028, V11029) -> begin (V11031 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V11030) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V11017, V11030)) end, V11029))(V10986))), case V11031 of {'Idris.Prelude.Types.Left', E158} -> (fun (V11032) -> {'Idris.Prelude.Types.Left', V11032} end(E158)); {'Idris.Prelude.Types.Right', E159} -> (fun (V11033) -> begin (V11035 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V11034) -> ('un--nfToCFType'(V0, V10981, V2, V11034)) end, V11033))(V10986))), case V11035 of {'Idris.Prelude.Types.Left', E160} -> (fun (V11036) -> {'Idris.Prelude.Types.Left', V11036} end(E160)); {'Idris.Prelude.Types.Right', E161} -> (fun (V11037) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V11024, V11037}} end(E161)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E159)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E156, E157)); {'Idris.Compiler.CompileExpr.Struct', E162, E163} -> (fun (V11038, V11039) -> begin (V11050 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V11040) -> case V11040 of {'Idris.Builtin.MkPair', E164, E165} -> (fun (V11041, V11042) -> fun (V11043) -> begin (V11044 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V11017, V11042))(V11043))), case V11044 of {'Idris.Prelude.Types.Left', E166} -> (fun (V11045) -> {'Idris.Prelude.Types.Left', V11045} end(E166)); {'Idris.Prelude.Types.Right', E167} -> (fun (V11046) -> begin (V11047 = (('un--nfToCFType'(V0, V10981, 0, V11046))(V11043))), case V11047 of {'Idris.Prelude.Types.Left', E168} -> (fun (V11048) -> {'Idris.Prelude.Types.Left', V11048} end(E168)); {'Idris.Prelude.Types.Right', E169} -> (fun (V11049) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V11041, V11049}} end(E169)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E167)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E164, E165)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V11039))(V10986))), case V11050 of {'Idris.Prelude.Types.Left', E170} -> (fun (V11051) -> {'Idris.Prelude.Types.Left', V11051} end(E170)); {'Idris.Prelude.Types.Right', E171} -> (fun (V11052) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V11038, V11052}} end(E171)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E162, E163)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E172} -> (fun (V11053) -> begin (V11054 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V11017, V11053))(V10986))), case V11054 of {'Idris.Prelude.Types.Left', E173} -> (fun (V11055) -> {'Idris.Prelude.Types.Left', V11055} end(E173)); {'Idris.Prelude.Types.Right', E174} -> (fun (V11056) -> begin (V11057 = (('un--nfToCFType'(V0, V10981, V2, V11056))(V10986))), case V11057 of {'Idris.Prelude.Types.Left', E175} -> (fun (V11058) -> {'Idris.Prelude.Types.Left', V11058} end(E175)); {'Idris.Prelude.Types.Right', E176} -> (fun (V11059) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V11059}} end(E176)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E174)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E172)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E155)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E153)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E151)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E145, E146, E147, E148, E149)); {'Idris.Core.Value.NType', E177} -> (fun (V11060) -> fun (V11061) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E177)); {'Idris.Core.Value.NErased', E178, E179} -> (fun (V11062, V11063) -> fun (V11064) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E178, E179)); _ -> fun (V11065) -> begin (V11094 = begin (V11093 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V11066) -> fun (V11067) -> fun (V11068) -> fun (V11069) -> fun (V11070) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V11068, V11069, V11070)) end end end end end, fun (V11071) -> fun (V11072) -> fun (V11073) -> V11072 end end end, fun (V11074) -> fun (V11075) -> fun (V11076) -> fun (V11077) -> fun (V11078) -> begin (V11079 = (V11076(V11078))), begin (V11080 = (V11077(V11078))), (V11079(V11080)) end end end end end end end}, fun (V11081) -> fun (V11082) -> fun (V11083) -> fun (V11084) -> fun (V11085) -> begin (V11086 = (V11083(V11085))), ((V11084(V11086))(V11085)) end end end end end end, fun (V11087) -> fun (V11088) -> fun (V11089) -> begin (V11090 = (V11088(V11089))), (V11090(V11089)) end end end end}, fun (V11091) -> fun (V11092) -> V11092 end end}, V0))(V11065))), {'Idris.Prelude.Types.Right', V11093} end), case V11094 of {'Idris.Prelude.Types.Left', E139} -> (fun (V11095) -> {'Idris.Prelude.Types.Left', V11095} end(E139)); {'Idris.Prelude.Types.Right', E140} -> (fun (V11096) -> begin (V11097 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V11096, {'Idris.Core.Env.Nil'}, V3, V11065))), case V11097 of {'Idris.Prelude.Types.Left', E141} -> (fun (V11098) -> {'Idris.Prelude.Types.Left', V11098} end(E141)); {'Idris.Prelude.Types.Right', E142} -> (fun (V11099) -> begin (V11104 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V11100) -> fun (V11101) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V11100, V11101)) end end, fun (V11102) -> fun (V11103) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V11102, V11103)) end end}, V11099, V11065))), case V11104 of {'Idris.Prelude.Types.Left', E143} -> (fun (V11105) -> {'Idris.Prelude.Types.Left', V11105} end(E143)); {'Idris.Prelude.Types.Right', E144} -> (fun (V11106) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V11106))))}, V11065)) end(E144)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E142)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E140)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end; _ -> case V3 of {'Idris.Core.Value.NTCon', E6, E7, E8, E9, E10} -> (fun (V11107, V11108, V11109, V11110, V11111) -> fun (V11112) -> begin (V11141 = begin (V11140 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V11113) -> fun (V11114) -> fun (V11115) -> fun (V11116) -> fun (V11117) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V11115, V11116, V11117)) end end end end end, fun (V11118) -> fun (V11119) -> fun (V11120) -> V11119 end end end, fun (V11121) -> fun (V11122) -> fun (V11123) -> fun (V11124) -> fun (V11125) -> begin (V11126 = (V11123(V11125))), begin (V11127 = (V11124(V11125))), (V11126(V11127)) end end end end end end end}, fun (V11128) -> fun (V11129) -> fun (V11130) -> fun (V11131) -> fun (V11132) -> begin (V11133 = (V11130(V11132))), ((V11131(V11133))(V11132)) end end end end end end, fun (V11134) -> fun (V11135) -> fun (V11136) -> begin (V11137 = (V11135(V11136))), (V11137(V11136)) end end end end}, fun (V11138) -> fun (V11139) -> V11139 end end}, V0))(V11112))), {'Idris.Prelude.Types.Right', V11140} end), case V11141 of {'Idris.Prelude.Types.Left', E11} -> (fun (V11142) -> {'Idris.Prelude.Types.Left', V11142} end(E11)); {'Idris.Prelude.Types.Right', E12} -> (fun (V11143) -> begin (V11148 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V11144) -> fun (V11145) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Name'(V11144, V11145)) end end, fun (V11146) -> fun (V11147) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Name'(V11146, V11147)) end end}, V11108, V11112))), case V11148 of {'Idris.Prelude.Types.Left', E13} -> (fun (V11149) -> {'Idris.Prelude.Types.Left', V11149} end(E13)); {'Idris.Prelude.Types.Right', E14} -> (fun (V11150) -> begin (V11151 = (('un--getNArgs'(V0, V11143, V11150, V11111))(V11112))), case V11151 of {'Idris.Prelude.Types.Left', E15} -> (fun (V11152) -> {'Idris.Prelude.Types.Left', V11152} end(E15)); {'Idris.Prelude.Types.Right', E16} -> (fun (V11153) -> case V11153 of {'Idris.Compiler.CompileExpr.User', E17, E18} -> (fun (V11154, V11155) -> begin (V11157 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V11156) -> ('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V11143, V11156)) end, V11155))(V11112))), case V11157 of {'Idris.Prelude.Types.Left', E19} -> (fun (V11158) -> {'Idris.Prelude.Types.Left', V11158} end(E19)); {'Idris.Prelude.Types.Right', E20} -> (fun (V11159) -> begin (V11161 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V11160) -> ('un--nfToCFType'(V0, V11107, V2, V11160)) end, V11159))(V11112))), case V11161 of {'Idris.Prelude.Types.Left', E21} -> (fun (V11162) -> {'Idris.Prelude.Types.Left', V11162} end(E21)); {'Idris.Prelude.Types.Right', E22} -> (fun (V11163) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', V11150, V11163}} end(E22)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E20)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E17, E18)); {'Idris.Compiler.CompileExpr.Struct', E23, E24} -> (fun (V11164, V11165) -> begin (V11176 = (('Idris.Idris2.Core.Core':'un--traverse'('erased', 'erased', fun (V11166) -> case V11166 of {'Idris.Builtin.MkPair', E25, E26} -> (fun (V11167, V11168) -> fun (V11169) -> begin (V11170 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V11143, V11168))(V11169))), case V11170 of {'Idris.Prelude.Types.Left', E27} -> (fun (V11171) -> {'Idris.Prelude.Types.Left', V11171} end(E27)); {'Idris.Prelude.Types.Right', E28} -> (fun (V11172) -> begin (V11173 = (('un--nfToCFType'(V0, V11107, 0, V11172))(V11169))), case V11173 of {'Idris.Prelude.Types.Left', E29} -> (fun (V11174) -> {'Idris.Prelude.Types.Left', V11174} end(E29)); {'Idris.Prelude.Types.Right', E30} -> (fun (V11175) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', V11167, V11175}} end(E30)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E28)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E25, E26)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end, V11165))(V11112))), case V11176 of {'Idris.Prelude.Types.Left', E31} -> (fun (V11177) -> {'Idris.Prelude.Types.Left', V11177} end(E31)); {'Idris.Prelude.Types.Right', E32} -> (fun (V11178) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFStruct', V11164, V11178}} end(E32)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E23, E24)); {'Idris.Compiler.CompileExpr.NUnit'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUnit'}} end()); {'Idris.Compiler.CompileExpr.NPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFPtr'}} end()); {'Idris.Compiler.CompileExpr.NGCPtr'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFGCPtr'}} end()); {'Idris.Compiler.CompileExpr.NBuffer'} -> (fun () -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFBuffer'}} end()); {'Idris.Compiler.CompileExpr.NIORes', E33} -> (fun (V11179) -> begin (V11180 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V11143, V11179))(V11112))), case V11180 of {'Idris.Prelude.Types.Left', E34} -> (fun (V11181) -> {'Idris.Prelude.Types.Left', V11181} end(E34)); {'Idris.Prelude.Types.Right', E35} -> (fun (V11182) -> begin (V11183 = (('un--nfToCFType'(V0, V11107, V2, V11182))(V11112))), case V11183 of {'Idris.Prelude.Types.Left', E36} -> (fun (V11184) -> {'Idris.Prelude.Types.Left', V11184} end(E36)); {'Idris.Prelude.Types.Right', E37} -> (fun (V11185) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFIORes', V11185}} end(E37)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E35)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E33)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E16)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E14)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E12)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E6, E7, E8, E9, E10)); {'Idris.Core.Value.NType', E38} -> (fun (V11186) -> fun (V11187) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"Type"/utf8>>}, []}} end end(E38)); {'Idris.Core.Value.NErased', E39, E40} -> (fun (V11188, V11189) -> fun (V11190) -> {'Idris.Prelude.Types.Right', {'Idris.Core.CompileExpr.CFUser', {'Idris.Core.Name.UN', <<"__"/utf8>>}, []}} end end(E39, E40)); _ -> fun (V11191) -> begin (V11220 = begin (V11219 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V11192) -> fun (V11193) -> fun (V11194) -> fun (V11195) -> fun (V11196) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V11194, V11195, V11196)) end end end end end, fun (V11197) -> fun (V11198) -> fun (V11199) -> V11198 end end end, fun (V11200) -> fun (V11201) -> fun (V11202) -> fun (V11203) -> fun (V11204) -> begin (V11205 = (V11202(V11204))), begin (V11206 = (V11203(V11204))), (V11205(V11206)) end end end end end end end}, fun (V11207) -> fun (V11208) -> fun (V11209) -> fun (V11210) -> fun (V11211) -> begin (V11212 = (V11209(V11211))), ((V11210(V11212))(V11211)) end end end end end end, fun (V11213) -> fun (V11214) -> fun (V11215) -> begin (V11216 = (V11214(V11215))), (V11216(V11215)) end end end end}, fun (V11217) -> fun (V11218) -> V11218 end end}, V0))(V11191))), {'Idris.Prelude.Types.Right', V11219} end), case V11220 of {'Idris.Prelude.Types.Left', E0} -> (fun (V11221) -> {'Idris.Prelude.Types.Left', V11221} end(E0)); {'Idris.Prelude.Types.Right', E1} -> (fun (V11222) -> begin (V11223 = ('Idris.Idris2.Core.Normalise':'dn--un--quote_Quote__NF'(V0, [], V11222, {'Idris.Core.Env.Nil'}, V3, V11191))), case V11223 of {'Idris.Prelude.Types.Left', E2} -> (fun (V11224) -> {'Idris.Prelude.Types.Left', V11224} end(E2)); {'Idris.Prelude.Types.Right', E3} -> (fun (V11225) -> begin (V11230 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V11226) -> fun (V11227) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__(Term $vars)'('erased', V11226, V11227)) end end, fun (V11228) -> fun (V11229) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__(Term $vars)'('erased', V11228, V11229)) end end}, V11225, V11191))), case V11230 of {'Idris.Prelude.Types.Left', E4} -> (fun (V11231) -> {'Idris.Prelude.Types.Left', V11231} end(E4)); {'Idris.Prelude.Types.Right', E5} -> (fun (V11232) -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V3)), ('Idris.Idris2.Prelude.Types.Strings':'un--++'(<<"Can\x{27}t marshal type for foreign call "/utf8>>, ('Idris.Idris2.Core.TT':'dn--un--show_Show__(Term $vars)'([], V11232))))}, V11191)) end(E5)); _ -> ('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 end end end end end end. 'un--natMinus'(V0, V1, V2, V3) -> case V3 of {'Idris.Data.Vect.::', E0, E1} -> (fun (V4, V5) -> case V5 of {'Idris.Data.Vect.::', E2, E3} -> (fun (V6, V7) -> case V7 of {'Idris.Data.Vect.Nil'} -> (fun () -> {'Idris.Core.CompileExpr.CApp', V0, {'Idris.Core.CompileExpr.CRef', V1, {'Idris.Core.Name.UN', <<"prim__sub_Integer"/utf8>>}}, [V4 | [V6 | []]]} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2, E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'un--natHackTree'(V0, V1) -> case V1 of {'Idris.Core.CompileExpr.CConCase', E0, E1, E2, E3} -> (fun (V2, V3, V4, V5) -> ('case--natHackTree-4543'('erased', V5, V4, V3, V2, (('Idris.Idris2.Prelude.Interfaces':'un--any'('erased', 'erased', {'Idris.Prelude.Interfaces.dn--un--__mkFoldable', fun (V6) -> fun (V7) -> fun (V8) -> fun (V9) -> fun (V10) -> ('Idris.Idris2.Prelude.Types':'dn--un--foldr_Foldable__List'('erased', 'erased', V8, V9, V10)) end end end end end, fun (V11) -> fun (V12) -> fun (V13) -> fun (V14) -> fun (V15) -> ('Idris.Idris2.Prelude.Types':'dn--un--foldl_Foldable__List'('erased', 'erased', V13, V14, V15)) end end end end end}, fun (V16) -> ('un--natBranch'('erased', V16)) end))(V4)))) end(E0, E1, E2, E3)); _ -> V1 end. 'un--natHack'(V0, V1) -> ('un--magic'('erased', [{'Idris.Compiler.CompileExpr.MagicCCon', ('Idris.Idris2.Core.Name.Namespace':'un--typesNS'()), <<"Z"/utf8>>, 0, fun (V2) -> fun (V3) -> fun (V4) -> case V4 of {'Idris.Data.Vect.Nil'} -> (fun () -> {'Idris.Core.CompileExpr.CPrimVal', V2, {'Idris.Core.TT.BI', 0}} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end} | [{'Idris.Compiler.CompileExpr.MagicCCon', ('Idris.Idris2.Core.Name.Namespace':'un--typesNS'()), <<"S"/utf8>>, (1 + 0), fun (V5) -> fun (V6) -> fun (V7) -> case V7 of {'Idris.Data.Vect.::', E0, E1} -> (fun (V8, V9) -> case V9 of {'Idris.Data.Vect.Nil'} -> (fun () -> {'Idris.Core.CompileExpr.CApp', V5, {'Idris.Core.CompileExpr.CRef', V5, {'Idris.Core.Name.UN', <<"prim__add_Integer"/utf8>>}}, [{'Idris.Core.CompileExpr.CPrimVal', V5, {'Idris.Core.TT.BI', 1}} | [V8 | []]]} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end} | [{'Idris.Compiler.CompileExpr.MagicCRef', ('Idris.Idris2.Core.Name.Namespace':'un--typesNS'()), <<"natToINteger"/utf8>>, (1 + 0), fun (V10) -> fun (V11) -> fun (V12) -> fun (V13) -> case V13 of {'Idris.Data.Vect.::', E2, E3} -> (fun (V14, V15) -> case V15 of {'Idris.Data.Vect.Nil'} -> (fun () -> V14 end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E2, E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end} | [{'Idris.Compiler.CompileExpr.MagicCRef', ('Idris.Idris2.Core.Name.Namespace':'un--typesNS'()), <<"integerToNat"/utf8>>, (1 + 0), fun (V16) -> fun (V17) -> fun (V18) -> fun (V19) -> case V19 of {'Idris.Data.Vect.::', E4, E5} -> (fun (V20, V21) -> case V21 of {'Idris.Data.Vect.Nil'} -> (fun () -> V20 end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E4, E5)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end} | [{'Idris.Compiler.CompileExpr.MagicCRef', ('Idris.Idris2.Core.Name.Namespace':'un--typesNS'()), <<"plus"/utf8>>, (1 + (1 + 0)), fun (V22) -> fun (V23) -> fun (V24) -> fun (V25) -> case V25 of {'Idris.Data.Vect.::', E6, E7} -> (fun (V26, V27) -> case V27 of {'Idris.Data.Vect.::', E8, E9} -> (fun (V28, V29) -> case V29 of {'Idris.Data.Vect.Nil'} -> (fun () -> {'Idris.Core.CompileExpr.CApp', V22, {'Idris.Core.CompileExpr.CRef', V23, {'Idris.Core.Name.UN', <<"prim__add_Integer"/utf8>>}}, [V26 | [V28 | []]]} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E8, E9)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E6, E7)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end} | [{'Idris.Compiler.CompileExpr.MagicCRef', ('Idris.Idris2.Core.Name.Namespace':'un--typesNS'()), <<"mult"/utf8>>, (1 + (1 + 0)), fun (V30) -> fun (V31) -> fun (V32) -> fun (V33) -> case V33 of {'Idris.Data.Vect.::', E10, E11} -> (fun (V34, V35) -> case V35 of {'Idris.Data.Vect.::', E12, E13} -> (fun (V36, V37) -> case V37 of {'Idris.Data.Vect.Nil'} -> (fun () -> {'Idris.Core.CompileExpr.CApp', V30, {'Idris.Core.CompileExpr.CRef', V31, {'Idris.Core.Name.UN', <<"prim__mul_Integer"/utf8>>}}, [V34 | [V36 | []]]} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E12, E13)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E10, E11)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end} | [{'Idris.Compiler.CompileExpr.MagicCRef', ('Idris.Idris2.Core.Name.Namespace':'un--natNS'()), <<"minus"/utf8>>, (1 + (1 + 0)), fun (V38) -> fun (V39) -> fun (V40) -> fun (V41) -> ('un--natMinus'(V38, V39, V40, V41)) end end end end} | []]]]]]]], V1)). 'un--natBranch'(V0, V1) -> case V1 of {'Idris.Core.CompileExpr.MkConAlt', E0, E1, E2, E3} -> (fun (V2, V3, V4, V5) -> ('un--isNatCon'(V2)) end(E0, E1, E2, E3)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'un--mkForgetDef'(V0, V1, V2) -> begin (V31 = begin (V30 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', '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))), {'Idris.Prelude.Types.Right', V30} end), case V31 of {'Idris.Prelude.Types.Left', E0} -> (fun (V32) -> {'Idris.Prelude.Types.Left', V32} end(E0)); {'Idris.Prelude.Types.Right', E1} -> (fun (V33) -> begin (V60 = (('Idris.Idris2.Core.Context':'un--lookupCtxtExact'(V1, case V33 of {'Idris.Core.Context.MkDefs', E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24, E25, E26, E27} -> (fun (V34, V35, V36, V37, V38, V39, V40, V41, V42, V43, V44, V45, V46, V47, V48, V49, V50, V51, V52, V53, V54, V55, V56, V57, V58, V59) -> V34 end(E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24, E25, E26, E27)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))(V2))), case V60 of {'Idris.Prelude.Types.Left', E28} -> (fun (V61) -> {'Idris.Prelude.Types.Left', V61} end(E28)); {'Idris.Prelude.Types.Right', E29} -> (fun (V62) -> case V62 of {'Idris.Prelude.Types.Just', E30} -> (fun (V63) -> begin (V64 = {'Idris.Prelude.Types.Just', V63}), (('case--case block in mkForgetDef-7981'(V1, V0, V33, V63, V64, case V63 of {'Idris.Core.Context.MkGlobalDef', E31, E32, E33, E34, E35, E36, E37, E38, E39, E40, E41, E42, E43, E44, E45, E46, E47, E48, E49, E50, E51} -> (fun (V65, V66, V67, V68, V69, V70, V71, V72, V73, V74, V75, V76, V77, V78, V79, V80, V81, V82, V83, V84, V85) -> V83 end(E31, E32, E33, E34, E35, E36, E37, E38, E39, E40, E41, E42, E43, E44, E45, E46, E47, E48, E49, E50, E51)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))(V2)) end end(E30)); {'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--++'(<<"Trying to compile unknown name "/utf8>>, ('Idris.Idris2.Core.Name':'dn--un--show_Show__Name'(V1))))}, V2)) end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E29)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end. 'un--mkDropSubst'(V0, V1, V2, V3) -> case V3 of [] -> {'Idris.Builtin.DPair.MkDPair', [], {'Idris.Core.TT.SubRefl'}}; [E0 | E1] -> (fun (V4, V5) -> ('case--mkDropSubst-3841'(V4, V5, V2, V1, V0, ('un--mkDropSubst'(('Idris.Idris2.Prelude.Types':'dn--un--+_Num__Nat'((1 + 0), V0)), V1, V2, V5)))) end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'un--mkArgList'(V0, V1) -> case V1 of 0 -> {'Idris.Builtin.DPair.MkDPair', [], {'Idris.Compiler.CompileExpr.NoArgs'}}; _ -> begin (V2 = (V1 - 1)), ('case--mkArgList-6397'(V2, V0, ('un--mkArgList'(((V0 + 1) rem 9223372036854775808), V2)))) end end. 'un--magic'(V0, V1, V2) -> case V2 of {'Idris.Core.CompileExpr.CLam', E0, E1, E2} -> (fun (V3, V4, V5) -> {'Idris.Core.CompileExpr.CLam', V3, V4, ('un--magic'('erased', V1, V5))} end(E0, E1, E2)); _ -> ('nested--8881-3935--in--un--go'('erased', V2, V1, V1, V2)) end. 'un--isNatCon'(V0) -> case V0 of {'Idris.Core.Name.NS', E0, E1} -> (fun (V1, V2) -> case V2 of {'Idris.Core.Name.UN', E2} -> (fun (V3) -> ('Idris.Idris2.Prelude.Basics':'un--&&'(('Idris.Idris2.Prelude.Basics':'un--||'(('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V3, <<"Z"/utf8>>)), fun () -> ('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V3, <<"S"/utf8>>)) end)), fun () -> ('Idris.Idris2.Core.Name.Namespace':'dn--un--==_Eq__Namespace'(V1, ('Idris.Idris2.Core.Name.Namespace':'un--typesNS'()))) end)) end(E2)); _ -> 1 end end(E0, E1)); _ -> 1 end. 'un--isFiniteEnum'(V0) -> case V0 of {'Idris.Core.Name.NS', E0, E1} -> (fun (V1, V2) -> case V2 of {'Idris.Core.Name.UN', E2} -> (fun (V3) -> ('Idris.Idris2.Prelude.Basics':'un--||'(('Idris.Idris2.Prelude.Basics':'un--&&'(('Idris.Idris2.Prelude.Basics':'un--||'(('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V3, <<"True"/utf8>>)), fun () -> ('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V3, <<"False"/utf8>>)) end)), fun () -> ('Idris.Idris2.Core.Name.Namespace':'dn--un--==_Eq__Namespace'(V1, ('Idris.Idris2.Core.Name.Namespace':'un--basicsNS'()))) end)), fun () -> ('Idris.Idris2.Prelude.Basics':'un--&&'(('Idris.Idris2.Prelude.Basics':'un--||'(('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V3, <<"LT"/utf8>>)), fun () -> ('Idris.Idris2.Prelude.Basics':'un--||'(('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V3, <<"EQ"/utf8>>)), fun () -> ('Idris.Idris2.Prelude.EqOrd':'dn--un--==_Eq__String'(V3, <<"GT"/utf8>>)) end)) end)), fun () -> ('Idris.Idris2.Core.Name.Namespace':'dn--un--==_Eq__Namespace'(V1, ('Idris.Idris2.Core.Name.Namespace':'un--eqOrdNS'()))) end)) end)) end(E2)); _ -> 1 end end(E0, E1)); _ -> 1 end. 'un--getZBranch'(V0, V1) -> case V1 of [] -> {'Idris.Prelude.Types.Nothing'}; [E0 | E1] -> (fun (V2, V3) -> ('Idris.Idris2.Prelude.Types':'dn--un--<+>_Semigroup__(Maybe $a)'('erased', ('un--tryZBranch'('erased', V2)), ('un--getZBranch'('erased', V3)))) end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'un--getSBranch'(V0, V1, V2) -> case V2 of [] -> {'Idris.Prelude.Types.Nothing'}; [E0 | E1] -> (fun (V3, V4) -> ('Idris.Idris2.Prelude.Types':'dn--un--<+>_Semigroup__(Maybe $a)'('erased', ('un--trySBranch'('erased', V1, V3)), ('un--getSBranch'('erased', V1, V4)))) end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'un--getPArgs'(V0, V1, V2, V3) -> begin (V4 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1, V2))(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) -> case V6 of {'Idris.Core.Value.NDCon', E2, E3, E4, E5, E6} -> (fun (V7, V8, V9, V10, V11) -> begin (V12 = {'Idris.Core.Value.NDCon', V7, V8, V9, V10, V11}), (('case--case block in getPArgs-6459'(V2, V1, V0, V8, V9, V10, V11, V7, V12, ('Idris.Idris2.Data.List':'un--reverse'('erased', V11))))(V3)) end end(E2, E3, E4, E5, E6)); _ -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V6)), <<"Badly formed struct type"/utf8>>}, V3)) end end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end. 'un--getNewType'(V0, V1, V2, V3, V4, V5) -> case V5 of [] -> fun (V6) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Nothing'}} end; [E0 | E1] -> (fun (V7, V8) -> case V7 of {'Idris.Core.CaseTree.DefaultCase', E2} -> (fun (V9) -> fun (V10) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Nothing'}} end end(E2)); {'Idris.Core.CaseTree.ConCase', E3, E4, E5, E6} -> (fun (V11, V12, V13, V14) -> fun (V15) -> begin (V44 = begin (V43 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V16) -> fun (V17) -> fun (V18) -> fun (V19) -> fun (V20) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V18, V19, V20)) end end end end end, fun (V21) -> fun (V22) -> fun (V23) -> V22 end end end, fun (V24) -> fun (V25) -> fun (V26) -> fun (V27) -> fun (V28) -> begin (V29 = (V26(V28))), begin (V30 = (V27(V28))), (V29(V30)) end end end end end end end}, fun (V31) -> fun (V32) -> fun (V33) -> fun (V34) -> fun (V35) -> begin (V36 = (V33(V35))), ((V34(V36))(V35)) end end end end end end, fun (V37) -> fun (V38) -> fun (V39) -> begin (V40 = (V38(V39))), (V40(V39)) end end end end}, fun (V41) -> fun (V42) -> V42 end end}, V1))(V15))), {'Idris.Prelude.Types.Right', V43} end), case V44 of {'Idris.Prelude.Types.Left', E7} -> (fun (V45) -> {'Idris.Prelude.Types.Left', V45} end(E7)); {'Idris.Prelude.Types.Right', E8} -> (fun (V46) -> begin (V73 = ('Idris.Idris2.Core.Context':'un--lookupDefExact'(V11, case V46 of {'Idris.Core.Context.MkDefs', E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24, E25, E26, E27, E28, E29, E30, E31, E32, E33, E34} -> (fun (V47, V48, V49, V50, V51, V52, V53, V54, V55, V56, V57, V58, V59, V60, V61, V62, V63, V64, V65, V66, V67, V68, V69, V70, V71, V72) -> V47 end(E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24, E25, E26, E27, E28, E29, E30, E31, E32, E33, E34)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end, V15))), case V73 of {'Idris.Prelude.Types.Left', E35} -> (fun (V74) -> {'Idris.Prelude.Types.Left', V74} end(E35)); {'Idris.Prelude.Types.Right', E36} -> (fun (V75) -> case V75 of {'Idris.Prelude.Types.Just', E37} -> (fun (V76) -> case V76 of {'Idris.Core.Context.DCon', E38, E39, E40} -> (fun (V77, V78, V79) -> case V79 of {'Idris.Prelude.Types.Just', E41} -> (fun (V80) -> case V80 of {'Idris.Builtin.MkPair', E42, E43} -> (fun (V81, V82) -> begin (V83 = ('nested--10275-5664--in--un--mkSubst'(V13, V0, V14, V12, V11, V8, V4, V3, V2, V1, 'erased', 0, V3, V82, V13))), begin (V84 = (('un--toCExpTree'(('Idris.Idris2.Prelude.Types.List':'un--++'('erased', V13, V0)), V1, V4, V14))(V15))), case V84 of {'Idris.Prelude.Types.Left', E44} -> (fun (V85) -> {'Idris.Prelude.Types.Left', V85} end(E44)); {'Idris.Prelude.Types.Right', E45} -> (fun (V86) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Just', ('Idris.Idris2.Core.CompileExpr':'un--substs'(V13, V0, V83, V86))}} end(E45)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E42, E43)); _ -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Nothing'}} end end(E41)); _ -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Nothing'}} end end(E38, E39, E40)); _ -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Nothing'}} end end(E37)); _ -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Nothing'}} end end(E36)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E8)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E3, E4, E5, E6)); _ -> ('un--getNewType'(V0, V1, V2, V3, V4, V8)) end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'un--getNArgs'(V0, V1, V2, V3) -> case V2 of {'Idris.Core.Name.NS', E0, E1} -> (fun (V4, V5) -> case V5 of {'Idris.Core.Name.UN', E2} -> (fun (V6) -> case V6 of <<"IORes"/utf8>> -> case V3 of [E3 | E4] -> (fun (V7, V8) -> case V8 of [] -> fun (V9) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.NIORes', V7}} end; _ -> fun (V10) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.User', V2, V3}} end end end(E3, E4)); _ -> fun (V11) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.User', V2, V3}} end end; <<"Ptr"/utf8>> -> case V3 of [E5 | E6] -> (fun (V12, V13) -> case V13 of [] -> fun (V14) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.NPtr'}} end; _ -> fun (V15) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.User', V2, V3}} end end end(E5, E6)); _ -> fun (V16) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.User', V2, V3}} end end; <<"AnyPtr"/utf8>> -> case V3 of [] -> fun (V17) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.NPtr'}} end; _ -> fun (V18) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.User', V2, V3}} end end; <<"GCPtr"/utf8>> -> case V3 of [E7 | E8] -> (fun (V19, V20) -> case V20 of [] -> fun (V21) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.NGCPtr'}} end; _ -> fun (V22) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.User', V2, V3}} end end end(E7, E8)); _ -> fun (V23) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.User', V2, V3}} end end; <<"GCAnyPtr"/utf8>> -> case V3 of [] -> fun (V24) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.NGCPtr'}} end; _ -> fun (V25) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.User', V2, V3}} end end; <<"Buffer"/utf8>> -> case V3 of [] -> fun (V26) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.NBuffer'}} end; _ -> fun (V27) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.User', V2, V3}} end end; <<"Unit"/utf8>> -> case V3 of [] -> fun (V28) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.NUnit'}} end; _ -> fun (V29) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.User', V2, V3}} end end; <<"Struct"/utf8>> -> case V3 of [E9 | E10] -> (fun (V30, V31) -> case V31 of [E11 | E12] -> (fun (V32, V33) -> case V33 of [] -> fun (V34) -> begin (V35 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1, V30))(V34))), case V35 of {'Idris.Prelude.Types.Left', E13} -> (fun (V36) -> {'Idris.Prelude.Types.Left', V36} end(E13)); {'Idris.Prelude.Types.Right', E14} -> (fun (V37) -> case V37 of {'Idris.Core.Value.NPrimVal', E15, E16} -> (fun (V38, V39) -> case V39 of {'Idris.Core.TT.Str', E17} -> (fun (V40) -> begin (V41 = ('un--getFieldArgs'(V0, V1, V32, V34))), case V41 of {'Idris.Prelude.Types.Left', E18} -> (fun (V42) -> {'Idris.Prelude.Types.Left', V42} end(E18)); {'Idris.Prelude.Types.Right', E19} -> (fun (V43) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.Struct', V40, V43}} end(E19)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E17)); _ -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V37)), <<"Unknown name for struct"/utf8>>}, V34)) end end(E15, E16)); _ -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V37)), <<"Unknown name for struct"/utf8>>}, V34)) end end(E14)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end; _ -> fun (V44) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.User', V2, V3}} end end end(E11, E12)); _ -> fun (V45) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.User', V2, V3}} end end end(E9, E10)); _ -> fun (V46) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.User', V2, V3}} end end; _ -> fun (V47) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.User', V2, V3}} end end end(E2)); _ -> fun (V48) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.User', V2, V3}} end end end(E0, E1)); _ -> fun (V49) -> {'Idris.Prelude.Types.Right', {'Idris.Compiler.CompileExpr.User', V2, V3}} end end. 'un--getFieldArgs'(V0, V1, V2, V3) -> begin (V4 = (('Idris.Idris2.Core.Normalise':'un--evalClosure'(V0, [], V1, V2))(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) -> case V6 of {'Idris.Core.Value.NDCon', E2, E3, E4, E5, E6} -> (fun (V7, V8, V9, V10, V11) -> case V11 of [E7 | E8] -> (fun (V12, V13) -> case V13 of [E9 | E10] -> (fun (V14, V15) -> case V15 of [E11 | E12] -> (fun (V16, V17) -> case V17 of [] -> begin (V18 = ('un--getFieldArgs'(V0, V1, V16, V3))), case V18 of {'Idris.Prelude.Types.Left', E13} -> (fun (V19) -> {'Idris.Prelude.Types.Left', V19} end(E13)); {'Idris.Prelude.Types.Right', E14} -> (fun (V20) -> begin (V21 = ('un--getPArgs'(V0, V1, V14, V3))), case V21 of {'Idris.Prelude.Types.Left', E15} -> (fun (V22) -> {'Idris.Prelude.Types.Left', V22} end(E15)); {'Idris.Prelude.Types.Right', E16} -> (fun (V23) -> case V23 of {'Idris.Builtin.MkPair', E17, E18} -> (fun (V24, V25) -> {'Idris.Prelude.Types.Right', [{'Idris.Builtin.MkPair', V24, V25} | V20]} end(E17, E18)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E16)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E14)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end; _ -> {'Idris.Prelude.Types.Right', []} end end(E11, E12)); _ -> {'Idris.Prelude.Types.Right', []} end end(E9, E10)); _ -> {'Idris.Prelude.Types.Right', []} end end(E7, E8)); _ -> {'Idris.Prelude.Types.Right', []} end end(E2, E3, E4, E5, E6)); _ -> ('Idris.Idris2.Core.Core':'dn--un--throw_Catchable__Core_Error'('erased', {'Idris.Core.Core.GenericMsg', ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V6)), <<"Badly formed struct type"/utf8>>}, V3)) end end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end. 'un--getDef'(V0, V1, V2, V3) -> case V3 of [] -> fun (V4) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Nothing'}} end; [E0 | E1] -> (fun (V5, V6) -> case V5 of {'Idris.Core.CaseTree.DefaultCase', E2} -> (fun (V7) -> fun (V8) -> begin (V9 = (('un--toCExpTree'(V0, V1, V2, V7))(V8))), case V9 of {'Idris.Prelude.Types.Left', E3} -> (fun (V10) -> {'Idris.Prelude.Types.Left', V10} end(E3)); {'Idris.Prelude.Types.Right', E4} -> (fun (V11) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Just', V11}} end(E4)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2)); {'Idris.Core.CaseTree.ConstCase', E5, E6} -> (fun (V12, V13) -> case V12 of {'Idris.Core.TT.WorldVal'} -> (fun () -> fun (V14) -> begin (V15 = (('un--toCExpTree'(V0, V1, V2, V13))(V14))), case V15 of {'Idris.Prelude.Types.Left', E7} -> (fun (V16) -> {'Idris.Prelude.Types.Left', V16} end(E7)); {'Idris.Prelude.Types.Right', E8} -> (fun (V17) -> {'Idris.Prelude.Types.Right', {'Idris.Prelude.Types.Just', V17}} end(E8)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end()); _ -> ('un--getDef'(V0, V1, V2, V6)) end end(E5, E6)); _ -> ('un--getDef'(V0, V1, V2, V6)) end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'un--getCFTypes'(V0, V1, V2) -> case V2 of {'Idris.Core.Value.NBind', E2, E3, E4, E5} -> (fun (V3, V4, V5, V6) -> case V5 of {'Idris.Core.TT.Pi', E8, E9, E10, E11} -> (fun (V7, V8, V9, V10) -> fun (V11) -> begin (V12 = (('un--nfToCFType'(V0, V3, 1, V10))(V11))), case V12 of {'Idris.Prelude.Types.Left', E12} -> (fun (V13) -> {'Idris.Prelude.Types.Left', V13} end(E12)); {'Idris.Prelude.Types.Right', E13} -> (fun (V14) -> begin (V43 = begin (V42 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V15) -> fun (V16) -> fun (V17) -> fun (V18) -> fun (V19) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V17, V18, V19)) end end end end end, fun (V20) -> fun (V21) -> fun (V22) -> V21 end end end, fun (V23) -> fun (V24) -> fun (V25) -> fun (V26) -> fun (V27) -> begin (V28 = (V25(V27))), begin (V29 = (V26(V27))), (V28(V29)) end end end end end end end}, fun (V30) -> fun (V31) -> fun (V32) -> fun (V33) -> fun (V34) -> begin (V35 = (V32(V34))), ((V33(V35))(V34)) end end end end end end, fun (V36) -> fun (V37) -> fun (V38) -> begin (V39 = (V37(V38))), (V39(V38)) end end end end}, fun (V40) -> fun (V41) -> V41 end end}, V0))(V11))), {'Idris.Prelude.Types.Right', V42} end), case V43 of {'Idris.Prelude.Types.Left', E14} -> (fun (V44) -> {'Idris.Prelude.Types.Left', V44} end(E14)); {'Idris.Prelude.Types.Right', E15} -> (fun (V45) -> begin (V46 = (((V6(V45))(('Idris.Idris2.Core.Normalise':'un--toClosure'('erased', ('Idris.Idris2.Core.Value':'un--defaultOpts'()), {'Idris.Core.Env.Nil'}, {'Idris.Core.TT.Erased', V3, 1}))))(V11))), case V46 of {'Idris.Prelude.Types.Left', E16} -> (fun (V47) -> {'Idris.Prelude.Types.Left', V47} end(E16)); {'Idris.Prelude.Types.Right', E17} -> (fun (V48) -> (('un--getCFTypes'(V0, [V14 | V1], V48))(V11)) end(E17)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E15)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E13)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E8, E9, E10, E11)); _ -> fun (V49) -> begin (V50 = (('un--nfToCFType'(V0, ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V2)), 1, V2))(V49))), case V50 of {'Idris.Prelude.Types.Left', E6} -> (fun (V51) -> {'Idris.Prelude.Types.Left', V51} end(E6)); {'Idris.Prelude.Types.Right', E7} -> (fun (V52) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', ('Idris.Idris2.Data.List':'un--reverse'('erased', V1)), V52}} end(E7)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end(E2, E3, E4, E5)); _ -> fun (V53) -> begin (V54 = (('un--nfToCFType'(V0, ('Idris.Idris2.Core.Value':'un--getLoc'('erased', V2)), 1, V2))(V53))), case V54 of {'Idris.Prelude.Types.Left', E0} -> (fun (V55) -> {'Idris.Prelude.Types.Left', V55} end(E0)); {'Idris.Prelude.Types.Right', E1} -> (fun (V56) -> {'Idris.Prelude.Types.Right', {'Idris.Builtin.MkPair', ('Idris.Idris2.Data.List':'un--reverse'('erased', V1)), V56}} end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end. 'un--expandToArity'(V0, V1, V2, V3) -> case V2 of {'Idris.Core.CompileExpr.CErased', E2} -> (fun (V4) -> {'Idris.Core.CompileExpr.CErased', V4} end(E2)); _ -> case V1 of 0 -> ('nested--8426-3542--in--un--applyAll'(V0, V3, V2, V2, V3)); _ -> begin (V5 = (V1 - 1)), case V3 of [E0 | E1] -> (fun (V6, V7) -> ('un--expandToArity'(V0, V5, ('nested--8426-3564--in--un--addArg'(V0, V5, V6, V7, V2, V2, V6)), V7)) end(E0, E1)); _ -> case V3 of [] -> ('un--etaExpand'(V0, 0, V1, V2, [])); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end. 'un--etaExpand'(V0, V1, V2, V3, V4) -> case V2 of 0 -> ('nested--8327-3442--in--un--mkApp'(V0, V4, V3, V1, V3, ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', fun (V5) -> ('nested--8327-3441--in--un--mkLocal'(V0, V4, V3, V1, ('Idris.Idris2.Core.CompileExpr':'un--getFC'('erased', V3)), V5)) end, ('Idris.Idris2.Data.List':'un--reverse'('erased', V4)))))); _ -> begin (V6 = (V2 - 1)), {'Idris.Core.CompileExpr.CLam', ('Idris.Idris2.Core.CompileExpr':'un--getFC'('erased', V3)), {'Idris.Core.Name.MN', <<"eta"/utf8>>, V1}, ('un--etaExpand'([{'Idris.Core.Name.MN', <<"eta"/utf8>>, V1} | V0], ((V1 + 1) rem 9223372036854775808), V6, ('Idris.Idris2.Core.CompileExpr':'dn--un--weaken_Weaken__CExp'('erased', 'erased', V3)), [0 | ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__List'('erased', 'erased', fun (V7) -> ('un--weakenVar'('erased', 'erased', V7)) end, V4))]))} end end. 'un--eraseConArgs'(V0, V1, V2, V3, V4) -> begin (V5 = ('un--expandToArity'(V0, V1, V3, V4))), ('un--dropPos'('erased', V2, V5)) end. 'un--dropPos'(V0, V1, V2) -> case V2 of {'Idris.Core.CompileExpr.CLam', E0, E1, E2} -> (fun (V3, V4, V5) -> {'Idris.Core.CompileExpr.CLam', V3, V4, ('un--dropPos'('erased', V1, V5))} end(E0, E1, E2)); {'Idris.Core.CompileExpr.CCon', E3, E4, E5, E6} -> (fun (V6, V7, V8, V9) -> {'Idris.Core.CompileExpr.CCon', V6, V7, V8, ('nested--8648-3730--in--un--drop'('erased', V9, V8, V7, V6, V1, 0, V9))} end(E3, E4, E5, E6)); _ -> V2 end. 'un--constCases'(V0, V1, V2, V3) -> case V3 of [] -> fun (V4) -> {'Idris.Prelude.Types.Right', []} end; [E0 | E1] -> (fun (V5, V6) -> case V5 of {'Idris.Core.CaseTree.ConstCase', E2, E3} -> (fun (V7, V8) -> case V7 of {'Idris.Core.TT.WorldVal'} -> (fun () -> ('un--constCases'(V0, V1, V2, V6)) end()); _ -> fun (V9) -> begin (V10 = (('un--toCExpTree'(V0, V1, V2, V8))(V9))), case V10 of {'Idris.Prelude.Types.Left', E4} -> (fun (V11) -> {'Idris.Prelude.Types.Left', V11} end(E4)); {'Idris.Prelude.Types.Right', E5} -> (fun (V12) -> begin (V13 = (('un--constCases'(V0, V1, V2, V6))(V9))), case V13 of {'Idris.Prelude.Types.Left', E6} -> (fun (V14) -> {'Idris.Prelude.Types.Left', V14} end(E6)); {'Idris.Prelude.Types.Right', E7} -> (fun (V15) -> {'Idris.Prelude.Types.Right', [{'Idris.Core.CompileExpr.MkConstAlt', V7, V12} | V15]} end(E7)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E5)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end end(E2, E3)); _ -> ('un--constCases'(V0, V1, V2, V6)) end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'un--conCases'(V0, V1, V2, V3) -> case V3 of [] -> fun (V4) -> {'Idris.Prelude.Types.Right', []} end; [E0 | E1] -> (fun (V5, V6) -> case V5 of {'Idris.Core.CaseTree.ConCase', E2, E3, E4, E5} -> (fun (V7, V8, V9, V10) -> fun (V11) -> begin (V40 = begin (V39 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', 'erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V12) -> fun (V13) -> fun (V14) -> fun (V15) -> fun (V16) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V14, V15, V16)) end end end end end, fun (V17) -> fun (V18) -> fun (V19) -> V18 end end end, fun (V20) -> fun (V21) -> fun (V22) -> fun (V23) -> fun (V24) -> begin (V25 = (V22(V24))), begin (V26 = (V23(V24))), (V25(V26)) end end end end end end end}, fun (V27) -> fun (V28) -> fun (V29) -> fun (V30) -> fun (V31) -> begin (V32 = (V29(V31))), ((V30(V32))(V31)) end end end end end end, fun (V33) -> fun (V34) -> fun (V35) -> begin (V36 = (V34(V35))), (V36(V35)) end end end end}, fun (V37) -> fun (V38) -> V38 end end}, V1))(V11))), {'Idris.Prelude.Types.Right', V39} end), case V40 of {'Idris.Prelude.Types.Left', E6} -> (fun (V41) -> {'Idris.Prelude.Types.Left', V41} end(E6)); {'Idris.Prelude.Types.Right', E7} -> (fun (V42) -> begin (V69 = (('Idris.Idris2.Core.Context':'un--lookupCtxtExact'(V7, case V42 of {'Idris.Core.Context.MkDefs', E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24, E25, E26, E27, E28, E29, E30, E31, E32, E33} -> (fun (V43, V44, V45, V46, V47, V48, V49, V50, V51, V52, V53, V54, V55, V56, V57, V58, V59, V60, V61, V62, V63, V64, V65, V66, V67, V68) -> V43 end(E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24, E25, E26, E27, E28, E29, E30, E31, E32, E33)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))(V11))), case V69 of {'Idris.Prelude.Types.Left', E34} -> (fun (V70) -> {'Idris.Prelude.Types.Left', V70} end(E34)); {'Idris.Prelude.Types.Right', E35} -> (fun (V71) -> case V71 of {'Idris.Prelude.Types.Just', E36} -> (fun (V72) -> begin (V73 = {'Idris.Prelude.Types.Just', V72}), (('case--case block in conCases-5335'(V9, V0, V10, V8, V7, V6, V2, V1, V42, V72, V73, case V72 of {'Idris.Core.Context.MkGlobalDef', E37, E38, E39, E40, E41, E42, E43, E44, E45, E46, E47, E48, E49, E50, E51, E52, E53, E54, E55, E56, E57} -> (fun (V74, V75, V76, V77, V78, V79, V80, V81, V82, V83, V84, V85, V86, V87, V88, V89, V90, V91, V92, V93, V94) -> V91 end(E37, E38, E39, E40, E41, E42, E43, E44, E45, E46, E47, E48, E49, E50, E51, E52, E53, E54, E55, E56, E57)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))(V11)) end end(E36)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> begin (V95 = (('Idris.Idris2.Core.Context':'un--getFullName'(V1, V7))(V11))), case V95 of {'Idris.Prelude.Types.Left', E58} -> (fun (V96) -> {'Idris.Prelude.Types.Left', V96} end(E58)); {'Idris.Prelude.Types.Right', E59} -> (fun (V97) -> begin (V98 = (('un--toCExpTree'(('Idris.Idris2.Prelude.Types.List':'un--++'('erased', V9, V0)), V1, V2, V10))(V11))), case V98 of {'Idris.Prelude.Types.Left', E60} -> (fun (V99) -> {'Idris.Prelude.Types.Left', V99} end(E60)); {'Idris.Prelude.Types.Right', E61} -> (fun (V100) -> begin (V101 = (('un--conCases'(V0, V1, V2, V6))(V11))), case V101 of {'Idris.Prelude.Types.Left', E62} -> (fun (V102) -> {'Idris.Prelude.Types.Left', V102} end(E62)); {'Idris.Prelude.Types.Right', E63} -> (fun (V103) -> {'Idris.Prelude.Types.Right', [{'Idris.Core.CompileExpr.MkConAlt', V97, {'Idris.Prelude.Types.Nothing'}, V9, V100} | V103]} end(E63)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E61)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E59)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E35)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E7)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end end(E2, E3, E4, E5)); _ -> ('un--conCases'(V0, V1, V2, V6)) end end(E0, E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end. 'un--compileExp'(V0, V1, V2) -> begin (V3 = (('un--toCExp'([], V0, {'Idris.Core.Name.UN', <<"main"/utf8>>}, V1))(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', V5} end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end. 'un--compileDef'(V0, V1, V2) -> begin (V31 = begin (V30 = (('Idris.Idris2.Erlang.Data.IORef':'un--readIORef'('erased', '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))), {'Idris.Prelude.Types.Right', V30} end), case V31 of {'Idris.Prelude.Types.Left', E0} -> (fun (V32) -> {'Idris.Prelude.Types.Left', V32} end(E0)); {'Idris.Prelude.Types.Right', E1} -> (fun (V33) -> begin (V60 = (('Idris.Idris2.Core.Context':'un--lookupCtxtExact'(V1, case V33 of {'Idris.Core.Context.MkDefs', E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24, E25, E26, E27} -> (fun (V34, V35, V36, V37, V38, V39, V40, V41, V42, V43, V44, V45, V46, V47, V48, V49, V50, V51, V52, V53, V54, V55, V56, V57, V58, V59) -> V34 end(E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E14, E15, E16, E17, E18, E19, E20, E21, E22, E23, E24, E25, E26, E27)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end))(V2))), case V60 of {'Idris.Prelude.Types.Left', E28} -> (fun (V61) -> {'Idris.Prelude.Types.Left', V61} end(E28)); {'Idris.Prelude.Types.Right', E29} -> (fun (V62) -> case V62 of {'Idris.Prelude.Types.Just', E30} -> (fun (V63) -> begin (V113 = begin (V89 = ('Idris.Idris2.Core.Context':'un--toFullNames'('erased', V0, {'Idris.Core.Context.dn--un--__mkHasNames', fun (V64) -> fun (V65) -> ('Idris.Idris2.Core.Context':'dn--un--full_HasNames__Def'(V64, V65)) end end, fun (V66) -> fun (V67) -> ('Idris.Idris2.Core.Context':'dn--un--resolved_HasNames__Def'(V66, V67)) end end}, case V63 of {'Idris.Core.Context.MkGlobalDef', E31, E32, E33, E34, E35, E36, E37, E38, E39, E40, E41, E42, E43, E44, E45, E46, E47, E48, E49, E50, E51} -> (fun (V68, V69, V70, V71, V72, V73, V74, V75, V76, V77, V78, V79, V80, V81, V82, V83, V84, V85, V86, V87, V88) -> V85 end(E31, E32, E33, E34, E35, E36, E37, E38, E39, E40, E41, E42, E43, E44, E45, E46, E47, E48, E49, E50, E51)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end, V2))), case V89 of {'Idris.Prelude.Types.Left', E52} -> (fun (V90) -> {'Idris.Prelude.Types.Left', V90} end(E52)); {'Idris.Prelude.Types.Right', E53} -> (fun (V91) -> (('un--toCDef'(V0, V1, case V63 of {'Idris.Core.Context.MkGlobalDef', E54, E55, E56, E57, E58, E59, E60, E61, E62, E63, E64, E65, E66, E67, E68, E69, E70, E71, E72, E73, E74} -> (fun (V92, V93, V94, V95, V96, V97, V98, V99, V100, V101, V102, V103, V104, V105, V106, V107, V108, V109, V110, V111, V112) -> V94 end(E54, E55, E56, E57, E58, E59, E60, E61, E62, E63, E64, E65, E66, E67, E68, E69, E70, E71, E72, E73, E74)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end, V91))(V2)) end(E53)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end), case V113 of {'Idris.Prelude.Types.Left', E75} -> (fun (V114) -> {'Idris.Prelude.Types.Left', V114} end(E75)); {'Idris.Prelude.Types.Right', E76} -> (fun (V115) -> ('Idris.Idris2.Core.Context':'un--setCompiled'(V0, V1, V115, V2)) end(E76)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E30)); {'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--++'(<<"Trying to compile unknown name "/utf8>>, ('Idris.Idris2.Core.Name':'dn--un--show_Show__Name'(V1))))}, V2)) end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end(E29)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E1)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end. 'un--boolHackTree'(V0, V1) -> case V1 of {'Idris.Core.CompileExpr.CConCase', E0, E1, E2, E3} -> (fun (V2, V3, V4, V5) -> begin (V17 = ('Idris.Idris2.Prelude.Types':'dn--un--traverse_Traversable__List'('erased', 'erased', 'erased', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6) -> fun (V7) -> fun (V8) -> fun (V9) -> ('Idris.Idris2.Prelude.Types':'dn--un--map_Functor__Maybe'('erased', 'erased', V8, V9)) end end end end, fun (V10) -> fun (V11) -> ('Idris.Idris2.Prelude.Types':'dn--un--pure_Applicative__Maybe'('erased', V11)) end end, fun (V12) -> fun (V13) -> fun (V14) -> fun (V15) -> ('Idris.Idris2.Prelude.Types':'dn--un--<*>_Applicative__Maybe'('erased', 'erased', V14, V15)) end end end end}, fun (V16) -> ('nested--9619-4649--in--un--toBool'('erased', V5, V4, V3, V2, V16)) end, V4))), case V17 of {'Idris.Prelude.Types.Just', E4} -> (fun (V18) -> {'Idris.Core.CompileExpr.CConstCase', V2, V3, V18, V5} end(E4)); {'Idris.Prelude.Types.Nothing'} -> (fun () -> {'Idris.Core.CompileExpr.CConCase', V2, V3, V4, V5} end()); _ -> ('erlang':'throw'("Error: Unreachable branch")) end end end(E0, E1, E2, E3)); _ -> V1 end. 'un--applyNewType'(V0, V1, V2, V3, V4) -> begin (V5 = ('un--expandToArity'(V0, V1, V3, V4))), ('nested--8529-3624--in--un--keepArg'(V0, V4, V3, V2, V1, 'erased', V5)) end.