From 62c99fd57c951607b6dd23251dec59d5ef13c67a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?M=C3=A1rio=20Pereira?= <mariojppereira@gmail.com>
Date: Sun, 14 Apr 2019 18:28:49 +0100
Subject: [PATCH] Fixed extraction for patterns with a completely ghost mask

---
 src/mlw/compile.ml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mlw/compile.ml b/src/mlw/compile.ml
index 9e86adcbc1..a7975f5a07 100644
--- a/src/mlw/compile.ml
+++ b/src/mlw/compile.ml
@@ -94,6 +94,8 @@ module Translate = struct
         rdef :: filter_out_ghost_rdef l
 
   let rec pat m p = match p.pat_node with
+    | _ when mask_equal m MaskGhost ->
+        ML.Pwild
     | Pwild ->
         ML.Pwild
     | Pvar vs when (restore_pv vs).pv_ghost ->
-- 
GitLab