This file contains 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
DatabaseSchema( | |
"example" | |
, [ Table( | |
"User" | |
, [ Column("id", UuidDBType()) | |
, Column("name", StringDBType()) | |
, Column("password", StringDBType()) | |
, Reference("url", "URL") | |
] | |
) |
This file contains 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
package lang.entity | |
module syntax-definition | |
context-free start-symbols | |
Start | |
context-free syntax |
This file contains 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 | |
a = b+c | |
where | |
b = 1 | |
c = 2 | |
d = a * 2 | |
factorial n= product [1..n] | |
This file contains 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
stratego.jvm.helper: | |
[java] [ Main | warning ] Found more than one matching subdirectory found for 'sdf2imp/lib'! | |
[java] ["C:/work/projects/spoofax/spx-imp/source-codes/trunk/org.strategoxt.imp.generator/src/sdf2imp/lib","C:\\work\\projects\\spoofax\\spx-imp\\source-codes\\trunk\\org.strategoxt.imp.generator\\src/sdf2imp/lib"] | |
[java] [ Main | warning ] Found more than one matching subdirectory found for 'sdf2imp/util'! | |
[java] ["C:/work/projects/spoofax/spx-imp/source-codes/trunk/org.strategoxt.imp.generator/src/sdf2imp/util","C:\\work\\projects\\spoofax\\spx-imp\\source-codes\\trunk\\org.strategoxt.imp.generator\\src/sdf2imp/util"] | |
[java] [ Main | warning ] Found more than one matching subdirectory found for 'sdf2imp/services'! | |
[java] ["C:/work/projects/spoofax/spx-imp/source-codes/trunk/org.strategoxt.imp.generator/src/sdf2imp/services","C:\\work\\projects\\spoofax\\spx-imp\\source-codes\\trunk\\org.strategoxt.imp.generator\\src/s |
This file contains 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
stratego.jvm.helper: | |
[delete] Could not find file C:\work\projects\spoofax\spx-imp\source-codes\trunk\org.strategoxt.imp.generator\include\sdf2imp.rtree to delete. | |
[java] running org.strategoxt.strj.Main with default permissions (exit forbidden) | |
[java] Running in same VM Executing 'org.strategoxt.strj.Main' with arguments: | |
[java] '-i' | |
[java] 'C:\work\projects\spoofax\spx-imp\source-codes\trunk\org.strategoxt.imp.generator\src/sdf2imp.str' | |
[java] '-o' | |
[java] 'C:\work\projects\spoofax\spx-imp\source-codes\trunk\org.strategoxt.imp.generator\src-gen\org\strategoxt\imp\generator/sdf2imp.java' | |
[java] '-p' |
This file contains 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
package org.strategoxt.imp.generator; | |
import org.strategoxt.stratego_lib.*; | |
import org.strategoxt.stratego_lib.*; | |
import org.strategoxt.stratego_sglr.*; | |
import org.strategoxt.stratego_gpp.*; | |
import org.strategoxt.stratego_xtc.*; | |
import org.strategoxt.stratego_aterm.*; | |
import org.strategoxt.stratego_rtg.*; | |
import org.strategoxt.stratego_sglr.*; |
This file contains 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
package org.strategoxt.imp.generator; | |
import org.strategoxt.stratego_lib.*; | |
import org.strategoxt.stratego_lib.*; | |
import org.strategoxt.stratego_sglr.*; | |
import org.strategoxt.stratego_gpp.*; | |
import org.strategoxt.stratego_xtc.*; | |
import org.strategoxt.stratego_aterm.*; | |
import org.strategoxt.stratego_rtg.*; | |
import org.strategoxt.stratego_sglr.*; |
This file contains 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
let rec (!) n = | |
match n with | |
| 1 -> (1) | |
| n -> n*(n-1) |
This file contains 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
// 'a is f#'s way of indicating a generic type that is not known at compile time | |
let f x = x.ToString() + " string" //val x: 'a -> string | |
let f x y = x.ToString() + "" + y.TString(); // val f: 'a -> 'b -> string | |
This file contains 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
// naive implementation | |
let rec length list = | |
match list with | |
| [] -> 0 | |
| _::tail -> 1 + computeLength tail |
OlderNewer