Packages

Erlang code generator for Idris 2

Current section

Files

Jump to
idris2 src Idris.Idris2.Text.PrettyPrint.Prettyprinter.Render.String.erl
Raw

src/Idris.Idris2.Text.PrettyPrint.Prettyprinter.Render.String.erl

-module('Idris.Idris2.Text.PrettyPrint.Prettyprinter.Render.String').
-compile('no_auto_import').
-compile('inline').
-compile({'inline_size',24}).
-export([
'un--renderString'/2,
'un--renderIO'/2,
'un--putDoc'/2
]).
'un--renderString'(V0, V1) -> case V1 of {'Idris.Text.PrettyPrint.Prettyprinter.Doc.SEmpty'} -> (fun () -> ('Idris.Idris2.Prelude.Types':'dn--un--neutral_Monoid__String'()) end()); {'Idris.Text.PrettyPrint.Prettyprinter.Doc.SChar', E0, E1} -> (fun (V2, V3) -> ('Idris.Idris2.Prelude.Types':'dn--un--<+>_Semigroup__String'(('Idris.Idris2.Data.Strings':'un--singleton'(V2)), ('un--renderString'('erased', (V3()))))) end(E0, E1)); {'Idris.Text.PrettyPrint.Prettyprinter.Doc.SText', E2, E3, E4} -> (fun (V4, V5, V6) -> ('Idris.Idris2.Prelude.Types':'dn--un--<+>_Semigroup__String'(V5, ('un--renderString'('erased', (V6()))))) end(E2, E3, E4)); {'Idris.Text.PrettyPrint.Prettyprinter.Doc.SLine', E5, E6} -> (fun (V7, V8) -> ('Idris.Idris2.Prelude.Types':'dn--un--<+>_Semigroup__String'(('Idris.Idris2.Prelude.Types':'dn--un--<+>_Semigroup__String'(('Idris.Idris2.Data.Strings':'un--singleton'($\x{a})), ('Idris.Idris2.Text.PrettyPrint.Prettyprinter.Doc':'un--textSpaces'(V7)))), ('un--renderString'('erased', V8)))) end(E5, E6)); {'Idris.Text.PrettyPrint.Prettyprinter.Doc.SAnnPush', E7, E8} -> (fun (V9, V10) -> ('un--renderString'('erased', V10)) end(E7, E8)); {'Idris.Text.PrettyPrint.Prettyprinter.Doc.SAnnPop', E9} -> (fun (V11) -> ('un--renderString'('erased', V11)) end(E9)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'un--renderIO'(V0, V1) -> case V1 of {'Idris.Text.PrettyPrint.Prettyprinter.Doc.SEmpty'} -> (fun () -> fun (V2) -> {'Idris.Builtin.MkUnit'} end end()); {'Idris.Text.PrettyPrint.Prettyprinter.Doc.SChar', E0, E1} -> (fun (V3, V4) -> fun (V5) -> begin (V33 = (('Idris.Idris2.Prelude.IO':'un--putChar'('erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V6) -> fun (V7) -> fun (V8) -> fun (V9) -> fun (V10) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V8, V9, V10)) end end end end end, fun (V11) -> fun (V12) -> fun (V13) -> V12 end end end, fun (V14) -> fun (V15) -> fun (V16) -> fun (V17) -> fun (V18) -> begin (V19 = (V16(V18))), begin (V20 = (V17(V18))), (V19(V20)) end end end end end end end}, fun (V21) -> fun (V22) -> fun (V23) -> fun (V24) -> fun (V25) -> begin (V26 = (V23(V25))), ((V24(V26))(V25)) end end end end end end, fun (V27) -> fun (V28) -> fun (V29) -> begin (V30 = (V28(V29))), (V30(V29)) end end end end}, fun (V31) -> fun (V32) -> V32 end end}, V3))(V5))), (('un--renderIO'('erased', (V4())))(V5)) end end end(E0, E1)); {'Idris.Text.PrettyPrint.Prettyprinter.Doc.SText', E2, E3, E4} -> (fun (V34, V35, V36) -> fun (V37) -> begin (V65 = (('Idris.Idris2.Prelude.IO':'un--putStr'('erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V38) -> fun (V39) -> fun (V40) -> fun (V41) -> fun (V42) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V40, V41, V42)) end end end end end, fun (V43) -> fun (V44) -> fun (V45) -> V44 end end end, fun (V46) -> fun (V47) -> fun (V48) -> fun (V49) -> fun (V50) -> begin (V51 = (V48(V50))), begin (V52 = (V49(V50))), (V51(V52)) end end end end end end end}, fun (V53) -> fun (V54) -> fun (V55) -> fun (V56) -> fun (V57) -> begin (V58 = (V55(V57))), ((V56(V58))(V57)) end end end end end end, fun (V59) -> fun (V60) -> fun (V61) -> begin (V62 = (V60(V61))), (V62(V61)) end end end end}, fun (V63) -> fun (V64) -> V64 end end}, V35))(V37))), (('un--renderIO'('erased', (V36())))(V37)) end end end(E2, E3, E4)); {'Idris.Text.PrettyPrint.Prettyprinter.Doc.SLine', E5, E6} -> (fun (V66, V67) -> fun (V68) -> begin (V96 = (('Idris.Idris2.Prelude.IO':'un--putChar'('erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V69) -> fun (V70) -> fun (V71) -> fun (V72) -> fun (V73) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V71, V72, V73)) end end end end end, fun (V74) -> fun (V75) -> fun (V76) -> V75 end end end, fun (V77) -> fun (V78) -> fun (V79) -> fun (V80) -> fun (V81) -> begin (V82 = (V79(V81))), begin (V83 = (V80(V81))), (V82(V83)) end end end end end end end}, fun (V84) -> fun (V85) -> fun (V86) -> fun (V87) -> fun (V88) -> begin (V89 = (V86(V88))), ((V87(V89))(V88)) end end end end end end, fun (V90) -> fun (V91) -> fun (V92) -> begin (V93 = (V91(V92))), (V93(V92)) end end end end}, fun (V94) -> fun (V95) -> V95 end end}, $\x{a}))(V68))), begin (V124 = (('Idris.Idris2.Prelude.IO':'un--putStr'('erased', {'Idris.Prelude.IO.dn--un--__mkHasIO', {'Idris.Prelude.Interfaces.dn--un--__mkMonad', {'Idris.Prelude.Interfaces.dn--un--__mkApplicative', fun (V97) -> fun (V98) -> fun (V99) -> fun (V100) -> fun (V101) -> ('Idris.Idris2.Prelude.IO':'dn--un--map_Functor__IO'('erased', 'erased', V99, V100, V101)) end end end end end, fun (V102) -> fun (V103) -> fun (V104) -> V103 end end end, fun (V105) -> fun (V106) -> fun (V107) -> fun (V108) -> fun (V109) -> begin (V110 = (V107(V109))), begin (V111 = (V108(V109))), (V110(V111)) end end end end end end end}, fun (V112) -> fun (V113) -> fun (V114) -> fun (V115) -> fun (V116) -> begin (V117 = (V114(V116))), ((V115(V117))(V116)) end end end end end end, fun (V118) -> fun (V119) -> fun (V120) -> begin (V121 = (V119(V120))), (V121(V120)) end end end end}, fun (V122) -> fun (V123) -> V123 end end}, ('Idris.Idris2.Text.PrettyPrint.Prettyprinter.Doc':'un--textSpaces'(V66))))(V68))), (('un--renderIO'('erased', V67))(V68)) end end end end(E5, E6)); {'Idris.Text.PrettyPrint.Prettyprinter.Doc.SAnnPush', E7, E8} -> (fun (V125, V126) -> ('un--renderIO'('erased', V126)) end(E7, E8)); {'Idris.Text.PrettyPrint.Prettyprinter.Doc.SAnnPop', E9} -> (fun (V127) -> ('un--renderIO'('erased', V127)) end(E9)); _ -> ('erlang':'throw'("Error: Unreachable branch")) end.
'un--putDoc'(V0, V1) -> ('un--renderIO'('erased', (('Idris.Idris2.Text.PrettyPrint.Prettyprinter.Doc':'un--layoutPretty'('erased', ('Idris.Idris2.Text.PrettyPrint.Prettyprinter.Doc':'un--defaultLayoutOptions'())))(V1)))).