summaryrefslogtreecommitdiff
path: root/utils.ml
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2009-01-23 03:15:14 +0100
committerGuillaume Seguin <guillaume@segu.in>2009-01-23 03:15:14 +0100
commitbbb742cc996b5113027efa9bf51abd4dbb1f5c7d (patch)
tree455c604a50b6d643e2bb1784c7e606d0fd53303f /utils.ml
parent6ff3295d7c71c7bd499c5bcc9988262de5167632 (diff)
downloadpetitcaml-bbb742cc996b5113027efa9bf51abd4dbb1f5c7d.tar.gz
petitcaml-bbb742cc996b5113027efa9bf51abd4dbb1f5c7d.tar.bz2
[petitcaml] Fix identifiers listing
Diffstat (limited to 'utils.ml')
-rw-r--r--utils.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils.ml b/utils.ml
index b284cf9..6d86b17 100644
--- a/utils.ml
+++ b/utils.ml
@@ -241,6 +241,9 @@ let rec identifiers expr =
| Ematch (e1, e2, _, _, e3) ->
Sset.union (Sset.union (identifiers e1) (identifiers e2))
(identifiers e3)
- | Efunc f -> identifiers f.body
+ | Efunc { name = { m = Mident id } ; body = body} ->
+ Sset.union (Sset.singleton id) (identifiers body)
+ | Efunc f ->
+ identifiers f.body
| Eclos _ -> failwith "identifiers : Unreachable matching"