From 09026b73c51e7e91948b34fddb4f0cc0b377113e Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Mon, 14 Sep 2009 14:11:30 +0000 Subject: [PATCH] Slightly simplied status code. --- helm/software/components/grafite_parser/nEstatus.ml | 3 +-- helm/software/components/lexicon/lexiconEngine.ml | 7 +++---- helm/software/components/ng_refiner/nRstatus.ml | 10 ++++------ 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/helm/software/components/grafite_parser/nEstatus.ml b/helm/software/components/grafite_parser/nEstatus.ml index 5cd454fb3..306eca9d6 100644 --- a/helm/software/components/grafite_parser/nEstatus.ml +++ b/helm/software/components/grafite_parser/nEstatus.ml @@ -21,7 +21,6 @@ class status = object (self) inherit LexiconEngine.status inherit NRstatus.dumpable_status - method set_estatus - : 'status. #g_status as 'status -> 'self + method set_estatus : 'status. #g_status as 'status -> 'self = fun o -> (self#set_lexicon_engine_status o)#set_dumpable_status o end diff --git a/helm/software/components/lexicon/lexiconEngine.ml b/helm/software/components/lexicon/lexiconEngine.ml index 0bf40e234..39d95a7f2 100644 --- a/helm/software/components/lexicon/lexiconEngine.ml +++ b/helm/software/components/lexicon/lexiconEngine.ml @@ -53,13 +53,12 @@ class type g_status = end class status = - object + object(self) val lstatus = initial_status method lstatus = lstatus method set_lstatus v = {< lstatus = v >} - method set_lexicon_engine_status - : 'status. #g_status as 'status -> 'self - = fun o -> {< lstatus = o#lstatus >} + method set_lexicon_engine_status : 'status. #g_status as 'status -> 'self + = fun o -> self#set_lstatus o#lstatus end let dump_aliases out msg status = diff --git a/helm/software/components/ng_refiner/nRstatus.ml b/helm/software/components/ng_refiner/nRstatus.ml index dc7a6cf4a..68fdf4f50 100644 --- a/helm/software/components/ng_refiner/nRstatus.ml +++ b/helm/software/components/ng_refiner/nRstatus.ml @@ -21,8 +21,7 @@ class status = object (self) inherit NCicCoercion.status inherit NCicLibrary.status - method set_rstatus - : 'status. #g_status as 'status -> 'self + method set_rstatus : 'status. #g_status as 'status -> 'self = fun o -> (self#set_coercion_status o)#set_library_status o end @@ -47,12 +46,11 @@ class type g_dumpable_status = end class dumpable_status = - object + object(self) inherit status val dump = ([] : Serializer.obj list) method dump = dump method set_dump v = {< dump = v >} - method set_dumpable_status - : 'status. #g_dumpable_status as 'status -> 'self - = fun o -> {< dump = o#dump >}#set_rstatus o + method set_dumpable_status : 'status. #g_dumpable_status as 'status -> 'self + = fun o -> (self#set_dump o#dump)#set_rstatus o end -- 2.39.2