summaryrefslogtreecommitdiff
path: root/src/reduce.sml
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@mit.edu>2016-02-13 10:41:17 -0500
committerGravatar Benjamin Barenblat <bbaren@mit.edu>2016-02-13 10:41:17 -0500
commit5ca6148aaf7b930a8868d0543f1a307d40532243 (patch)
tree55ec538c5bdef601b0ac8ebca71ad495f644326d /src/reduce.sml
parent3d3886672433f0775f772d8d2ee47c5f5e0bc745 (diff)
parent3044fbedd58961f8c1168eb3bc2eeeb8a2b0b60e (diff)
Merge branch 'upstream' into dfsg_clean20160213+dfsg
Diffstat (limited to 'src/reduce.sml')
-rw-r--r--src/reduce.sml10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/reduce.sml b/src/reduce.sml
index 0762a4a1..04cec168 100644
--- a/src/reduce.sml
+++ b/src/reduce.sml
@@ -148,8 +148,7 @@ fun match (env, p : pat, e : exp) =
fun match (env, p, e) =
case (#1 p, #1 e) of
- (PWild, _) => Yes env
- | (PVar (x, t), _) => Yes (KnownE (multiLiftExpInExp (length env - baseline) e) :: env)
+ (PVar (x, t), _) => Yes (KnownE (multiLiftExpInExp (length env - baseline) e) :: env)
| (PPrim p, EPrim p') =>
if Prim.equal (p, p') then
@@ -425,8 +424,7 @@ fun kindConAndExp (namedC, namedE) =
fun patBinds (p, _) =
case p of
- PWild => 0
- | PVar _ => 1
+ PVar _ => 1
| PPrim _ => 0
| PCon (_, _, _, NONE) => 0
| PCon (_, _, _, SOME p) => patBinds p
@@ -757,14 +755,12 @@ fun kindConAndExp (namedC, namedE) =
end
| ECase (_, [((PRecord [], _), e)], _) => exp env e
- | ECase (_, [((PWild, _), e)], _) => exp env e
| ECase (e, pes, {disc, result}) =>
let
fun pat (all as (p, loc)) =
case p of
- PWild => all
- | PVar (x, t) => (PVar (x, con env t), loc)
+ PVar (x, t) => (PVar (x, con env t), loc)
| PPrim _ => all
| PCon (dk, pc, cs, po) =>
(PCon (dk, patCon pc, map (con env) cs, Option.map pat po), loc)