Skip to content

Instantly share code, notes, and snippets.

View ryanmr's full-sized avatar

Ryan Rampersad ryanmr

View GitHub Profile
| tExp (A.IfExp{test, then', else', pos}) =
let
val test' = actual_type(tExp test, pos)
val tty = actual_type(tExp then', pos)
val ety = (case else' of
SOME(e) => actual_type(tExp e, pos)
| _ => tty) (* if there is no else, just pretend it matches with tty - hax *)
(* do the tty and ety match? *)
(* check_duplicates robust enough; could not compare deeply *)
fun check_duplicates([],f) = ()
| check_duplicates(h::l, f) =
if (List.exists (fn (x) => (h = x)) l) then
(f h ; check_duplicates(l,f))
else check_duplicates(l,f)
(* cd2 uses an accessor g to access the record fields or tuples *)
fun check_duplicates2([],f,g) = ()
(*
What I hate about SML; parathensis are optional sometimes and absolutely required other times,
and currying is possible, so you never know what you want.
*)
| tExp(A.RecordExp {fields, typ, pos}) =
let
val typ' = (case Symbol.look(tenv, typ) of
SOME(t) => actual_type(t, pos)
| _ => (report pos (E.UndeclaredType (Symbol.name typ)) "undeclared type for record"; (E.ERROR))
package sabe;
import java.util.ArrayList;
import edu.umn.csci5801.sabe.interfaces.AccountReportIntf;
import sabe.calculations.HealthInsurance;
import sabe.calculations.UndergraduateCSECollegiateFees;
import sabe.calculations.UndergraduateGeneralFees;
import sabe.calculations.UndergraduateInternationalStudentFees;
import sabe.calculations.UndergraduateMedicalCollegiateFees;
# configure: what is the name of the DAT you wish to switch to?
$strSeedFile = "Local_MAIN.dat"
# Do not change this.
$strDestinationFile = "Local.dat"
# switch to desired local dat.
cp $strSeedFile $strDestinationFile
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
$response = $client->get('http://digimon-adventure.net/application/nade2.php?click=20150413', [
'headers' => [
package sabe;
import java.util.Set;
import edu.umn.csci5801.sabe.interfaces.UMNDatabaseIntf;
import edu.umn.csci5801.sabe.model.StudentRecord;
import edu.umn.csci5801.sabe.model.User;
public class Database implements UMNDatabaseIntf {
<!doctype html>
<html>
<head>
<title>Guild Wars 2 Characters</title>
<script type="text/javascript" src="lodash.js"></script>
<script type="text/javascript" src="moment.js"></script>
<script type="text/javascript">
// This is why I hate SML.
// I am told to look for an error around line 505, in the range of 493 to 506.
// I can do that, I have eyes!
// But nothing is wrong there.
semant.sml:505.13-505.46 Error: operator is not a function [tycon mismatch]
operator: E.fnvar ?.table * E.ty ?.table
in expression:
package sabe;
import java.util.HashSet;
import java.util.Set;
import edu.sabe.interfaces.ReportItemIntf;
public class ItemSet {
Set<Item> set;