From de16a576da7fa62720f8d3e0512a38969e0d8397 Mon Sep 17 00:00:00 2001 From: Judah Jacobson Date: Sat, 8 Apr 2017 07:15:28 -0700 Subject: [PATCH] Sort the ops generated in TensorFlow.GenOps.Core. (#96) --- tensorflow-opgen/src/TensorFlow/OpGen.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tensorflow-opgen/src/TensorFlow/OpGen.hs b/tensorflow-opgen/src/TensorFlow/OpGen.hs index c512168..6717b47 100644 --- a/tensorflow-opgen/src/TensorFlow/OpGen.hs +++ b/tensorflow-opgen/src/TensorFlow/OpGen.hs @@ -53,6 +53,7 @@ module TensorFlow.OpGen import Data.Foldable (toList) import Data.Maybe (fromMaybe) import Data.ProtoLens (def, showMessage) +import Data.List (sortOn) import Data.List.NonEmpty (NonEmpty) import qualified Data.List.NonEmpty as NE import Lens.Family2 ((^.), (.~), (&), view) @@ -132,6 +133,7 @@ docOpList flags opList = , empty , folddoc (\x y -> x empty y) (map renderOpAndExtras $ + sortOn (view name) $ filter (not . flip elem exclusions . view name) $ toList $ opList ^. op) ]