From 9802e63c88263724699a2bcae4e0d879ec8dcc30 Mon Sep 17 00:00:00 2001
From: Alice BRENON <alice.brenon@ens-lyon.fr>
Date: Wed, 12 Jul 2023 22:24:51 +0200
Subject: [PATCH] Use the official implementation for NonEmpty which I
 discovered afterwards

---
 lib/GEODE/Options.hs | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/lib/GEODE/Options.hs b/lib/GEODE/Options.hs
index 2f4741d..38f0b78 100644
--- a/lib/GEODE/Options.hs
+++ b/lib/GEODE/Options.hs
@@ -11,7 +11,7 @@ import Control.Applicative ((<|>))
 import Data.List.NonEmpty (NonEmpty(..))
 import Options.Applicative
   ( Parser, argument, flag', help, long, metavar, short, str, strOption, value )
-import Options.Applicative.Types (oneM, manyM, fromM)
+import Options.Applicative.NonEmpty (some1)
 import Text.Printf (printf)
 
 data Input = StdIn | File FilePath
@@ -47,8 +47,4 @@ data IOConfig = IOConfig
 ioConfig :: String -> Parser IOConfig
 ioConfig stdinSemantics = IOConfig
   <$> input stdinSemantics
-  <*> some output
-  where
-    -- trick needed to avoid duplicated options in help message (occurring when
-    -- working directly at the Applicative level)
-    some p = fromM ((:|) <$> oneM p <*> manyM p)
+  <*> some1 output
-- 
GitLab