-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1215 from andrew-johnson-4/lm-to-lsts-feqpfe
Lm to lsts feqpfe
- Loading branch information
Showing
14 changed files
with
21,367 additions
and
21,406 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
let cons-tail-or-self(tt: Type): Type = ( | ||
match tt { | ||
TGround{tag:c"Cons",parameters:[tl..hd..]} => tl; | ||
_ => tt; | ||
} | ||
); |
This file was deleted.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
let substitute(tctx: Maybe<TContext>, tt: List<Type>): List<Type> = ( | ||
match tt { | ||
LCons{head=head,tail=tail} => cons( substitute(tctx,head), substitute(tctx,tail) ); | ||
_ => tt; | ||
} | ||
); | ||
|
||
let substitute(tctx: Maybe<TContext>, tt: Type): Type = ( | ||
match tt { | ||
TAnd{left=left,right=right} => TAnd{close(substitute(tctx,left)), close(substitute(tctx,right))}; | ||
TGround{tag=tag,parameters=parameters} => TGround{tag,close(substitute(tctx,parameters))}; | ||
TVar{name=name} => ( | ||
let ta = tctx.get-or([] :: List<Tuple<CString,Type,AST>>).lookup(name,Tuple{TAny,ASTEOF}); | ||
if non-zero(ta.first) then ta.first else tt; | ||
); | ||
_ => tt; | ||
} | ||
); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
let .tag(tt: Type): CString = ( | ||
match tt { | ||
TGround{tag=tag} => tag; | ||
_ => c""; | ||
} | ||
); |
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
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