Skip to content

Instantly share code, notes, and snippets.

@johnjcamilleri
Created July 16, 2013 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnjcamilleri/6007397 to your computer and use it in GitHub Desktop.
Save johnjcamilleri/6007397 to your computer and use it in GitHub Desktop.
abstract Camel = {
cat
Kind ;
Action Kind;
Component Kind;
S;
fun
endpoint : Kind ;
standard : Kind ;
database : Component endpoint ;
database_oracle : Component endpoint ;
read : Action endpoint ;
write : Action endpoint ;
VerbF : (k : Kind) -> Action k -> String -> Component k -> S;
}
concrete CamelEng of Camel = {
flags
startcat=S;
oper
s : Str -> { s : Str } = \str -> { s = str };
the : Str -> { s : Str } = \str -> s ("the" ++ str) ;
lincat
Kind, Action, Component, S = {s:Str};
lin
standard = s "ignore" ;
endpoint = s "ignore" ;
database = the "database" ;
database_oracle = the "Oracle database" ;
read = s "read" ;
write = s "write" ;
VerbF _ action str compo = s (action.s ++ "the" ++ str.s ++ "in" ++ compo.s) ;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment