Created
January 25, 2013 10:24
-
-
Save teamon/4633329 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
main _ = println $ show [1,2,3,4,5,6,7,8,9,10,10000000] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Source code is in UTF-8 encoding. The following symbols may appear, among others: | |
α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ ς σ τ υ φ χ ψ ω « • ¦ » fi fl ƒ | |
If you can't read this, you're out of luck. | |
This code was generated with the frege compiler version 3.19.112 from hello.hs | |
Do not edit this file! Instead, edit the source file and recompile. | |
*/ | |
import frege.MD; | |
import frege.RT; | |
import frege.rt.*; | |
import frege.prelude.PreludeBase; | |
import frege.prelude.PreludeNative; | |
import frege.prelude.PreludeList; | |
import frege.prelude.PreludeText; | |
import frege.prelude.PreludeMonad; | |
@MD.FregePackage( | |
source="hello.hs", time=1359109379245L, | |
ops={ | |
@MD.Operator(name="<$>", kind=0, prec=13), @MD.Operator(name="**", kind=1, prec=2), | |
@MD.Operator(name="$!", kind=1, prec=16), @MD.Operator(name="!~", kind=2, prec=2), | |
@MD.Operator(name="!=", kind=2, prec=10), @MD.Operator(name="!!", kind=0, prec=1), | |
@MD.Operator(name="!==", kind=2, prec=10), @MD.Operator(name="$", kind=1, prec=16), | |
@MD.Operator(name="&&", kind=1, prec=11), @MD.Operator(name="%", kind=0, prec=3), | |
@MD.Operator(name="*", kind=0, prec=3), @MD.Operator(name="/~", kind=2, prec=2), | |
@MD.Operator(name="+", kind=0, prec=4), @MD.Operator(name="*>", kind=0, prec=13), | |
@MD.Operator(name="++", kind=1, prec=4), @MD.Operator(name="/", kind=0, prec=3), | |
@MD.Operator(name="..", kind=2, prec=13), @MD.Operator(name="/=", kind=2, prec=10), | |
@MD.Operator(name=":", kind=1, prec=13), @MD.Operator(name="<", kind=2, prec=8), | |
@MD.Operator(name=":=", kind=1, prec=15), @MD.Operator(name="band", kind=0, prec=6), | |
@MD.Operator(name="<=>", kind=2, prec=9), @MD.Operator(name="<*>", kind=0, prec=13), | |
@MD.Operator(name="<*", kind=0, prec=13), @MD.Operator(name="<=", kind=2, prec=8), | |
@MD.Operator(name="<<", kind=0, prec=5), @MD.Operator(name="<=<", kind=1, prec=14), | |
@MD.Operator(name="=<<", kind=1, prec=15), @MD.Operator(name="<~", kind=1, prec=1), | |
@MD.Operator(name="==", kind=2, prec=10), @MD.Operator(name="===", kind=2, prec=10), | |
@MD.Operator(name=">>", kind=0, prec=14), @MD.Operator(name=">=", kind=2, prec=8), | |
@MD.Operator(name=">", kind=2, prec=8), @MD.Operator(name="=~", kind=2, prec=2), | |
@MD.Operator(name=">=>", kind=1, prec=14), @MD.Operator(name="?~", kind=2, prec=2), | |
@MD.Operator(name=">>=", kind=0, prec=14), @MD.Operator(name="??", kind=1, prec=2), | |
@MD.Operator(name="\\\\", kind=2, prec=3), @MD.Operator(name="@", kind=1, prec=15), | |
@MD.Operator(name="^^", kind=1, prec=12), @MD.Operator(name="notElem", kind=2, prec=8), | |
@MD.Operator(name="div", kind=0, prec=3), @MD.Operator(name="bxor", kind=0, prec=7), | |
@MD.Operator(name="bshl", kind=0, prec=5), @MD.Operator(name="bor", kind=0, prec=7), | |
@MD.Operator(name="bshr", kind=0, prec=5), @MD.Operator(name="compare", kind=2, prec=9), | |
@MD.Operator(name="mod", kind=0, prec=3), @MD.Operator(name="elem", kind=2, prec=8), | |
@MD.Operator(name="fmap", kind=0, prec=13), @MD.Operator(name="mplus", kind=1, prec=4), | |
@MD.Operator(name="~", kind=2, prec=2), @MD.Operator(name="seq", kind=1, prec=15), | |
@MD.Operator(name="quot", kind=0, prec=3), @MD.Operator(name="oder", kind=1, prec=12), | |
@MD.Operator(name="rem", kind=0, prec=3), @MD.Operator(name="ushr", kind=0, prec=5), | |
@MD.Operator(name="und", kind=1, prec=11), @MD.Operator(name="||", kind=1, prec=12), | |
@MD.Operator(name="•", kind=1, prec=1), @MD.Operator(name="~~", kind=2, prec=2), | |
@MD.Operator(name="~>", kind=0, prec=1), @MD.Operator(name="~~~", kind=2, prec=2) | |
}, | |
imps={ | |
"frege.prelude.PreludeList", "frege.Prelude", "frege.prelude.PreludeBase", | |
"frege.prelude.PreludeNative", "frege.prelude.PreludeMonad", "frege.prelude.PreludeText" | |
}, | |
nmss={ | |
"PreludeList", "Prelude", "PreludeBase", "PreludeNative", "PreludeMonad", "PreludeText" | |
}, | |
symas={}, symcs={}, symis={}, symts={}, | |
symvs={ | |
@MD.SymV( | |
offset=18, [email protected](pack="Main", base="main"), stri="s(u)", sig=1, depth=1, rkind=48 | |
) | |
}, | |
symls={}, | |
taus={ | |
@MD.Tau(kind=2, tcon={@MD.QName(kind=0, pack="frege.prelude.PreludeBase", base="[]")}), | |
@MD.Tau(kind=2, tcon={@MD.QName(kind=0, pack="frege.prelude.PreludeBase", base="StringJ")}), | |
@MD.Tau(kind=2, tcon={@MD.QName(kind=0, pack="frege.prelude.PreludeBase", base="Char")}), | |
@MD.Tau(kind=0, suba=1, subb=2), @MD.Tau(kind=0, suba=0, subb=3), | |
@MD.Tau(kind=2, tcon={@MD.QName(kind=0, pack="frege.prelude.PreludeBase", base="ST")}), | |
@MD.Tau( | |
kind=2, tcon={@MD.QName(kind=0, pack="frege.prelude.PreludeBase", base="RealWorld")} | |
), | |
@MD.Tau(kind=0, suba=5, subb=6), | |
@MD.Tau(kind=2, tcon={@MD.QName(kind=0, pack="frege.prelude.PreludeBase", base="()")}), | |
@MD.Tau(kind=0, suba=7, subb=8) | |
}, | |
rhos={ | |
@MD.Rho(rhofun=false, rhotau=4), @MD.Rho(rhofun=false, rhotau=9), @MD.Rho(sigma=0, rhotau=1) | |
}, | |
sigmas={@MD.Sigma(rho=0), @MD.Sigma(rho=2)}, exprs={@MD.Expr()} | |
) | |
final public class Main { | |
final public static Consts ij = new Consts(); | |
// function `main` s(u) 48 | |
// [String] -> IO () | |
// λ_ -> println$show ([ 1 ([ 2 ([ 3 ([ 4 ([ 5 ([ 6 ([ 7 ([ 8 ([ 9 ([ 10 ([ 10000000 ]))))))))))) | |
final public static Lazy<FV> _main(final Lazy<FV> arg$1) { | |
// bind lazy var _1{2746} to Bind {RLazy, [StringJ Char], Lazy<PreludeBase.TList>, arg$1} | |
// return RLazy println$show ([ 1 ([ 2 ([ 3 ([ 4 ([ 5 ([ 6 ([ 7 ([ 8 ([ 9 ([ 10 ([ 10000000 ]))))))))))) | |
// Bind {RBoxed, Show (StringJ Char) => ST RealWorld (), Lambda, complicated java expression} | |
return (Lambda)PreludeBase._dollar( | |
frege.Prelude.Consts.printlnƒ(new PreludeText.IShow_String()), | |
PreludeText.Consts.m$3057114424show(new PreludeText.IShow_Int()).apply( | |
PreludeBase.TList.DCons.mk( | |
ij.int1, | |
PreludeBase.TList.DCons.mk( | |
ij.int2, | |
PreludeBase.TList.DCons.mk( | |
ij.int3, | |
PreludeBase.TList.DCons.mk( | |
ij.int4, | |
PreludeBase.TList.DCons.mk( | |
ij.int5, | |
PreludeBase.TList.DCons.mk( | |
ij.int6, | |
PreludeBase.TList.DCons.mk( | |
ij.int7, | |
PreludeBase.TList.DCons.mk( | |
ij.int8, | |
PreludeBase.TList.DCons.mk( | |
ij.int9, | |
PreludeBase.TList.DCons | |
.mk( | |
ij.int10, | |
PreludeBase.TList.DCons.mk(ij.int10000000, PreludeBase.TList.DList.mk()) | |
) | |
) | |
) | |
) | |
) | |
) | |
) | |
) | |
) | |
) | |
) | |
)._e(); | |
} | |
public static class Consts { | |
public Consts() {} | |
final public static frege.rt.Lam1 _mainƒ = new Main.Lambda1a(0); | |
final public Box.Int int4 = Box.Int.mk(4); | |
final public Box.Int int2 = Box.Int.mk(2); | |
final public Box.Int int10 = Box.Int.mk(10); | |
final public Box.Int int1 = Box.Int.mk(1); | |
final public Box.Int int10000000 = Box.Int.mk(10000000); | |
final public Box.Int int3 = Box.Int.mk(3); | |
final public Box.Int int6 = Box.Int.mk(6); | |
final public Box.Int int5 = Box.Int.mk(5); | |
final public Box.Int int8 = Box.Int.mk(8); | |
final public Box.Int int7 = Box.Int.mk(7); | |
final public Box.Int int9 = Box.Int.mk(9); | |
} | |
final private static class Lambda1a extends frege.rt.Lam1 { | |
final int index ; | |
public Lambda1a(final int arg$1) { | |
index = arg$1; | |
} | |
final public Lazy<FV> eval(final Lazy<FV> arg$1) { | |
switch (index) { | |
case 0: { | |
return Main._main(arg$1); | |
} | |
} | |
throw new java.lang.Error("bad function number " + index); | |
} | |
} | |
public static void main(final java.lang.String[] argv) { | |
final long t1 = java.lang.System.nanoTime(); | |
frege.RT.fjMain( | |
PreludeBase.TST.performUnsafe( | |
(Lambda)Main._main(frege.prelude.Arrays.TStringArray.toList(argv))._e() | |
) | |
); | |
final long t2 = java.lang.System.nanoTime(); | |
java.lang.System.err.println( | |
"runtime " + (((((t2 - t1) + 500000) / 1000000) / 1e3) + " wallclock seconds.") | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment