This question is an extension of the topic : Ordered arguments with cmdargs
I managed to have a list of argument of the same type. But nom, I would like to have a list of options with values. like this :
runhaskell ~/testargs.hs -a 5,6 -b 8,9 -c 4,2 -a 9,3
I tried to declare my data with
data Act =
ActA (Double,Double)
| ActB (Double,Double)
| ActC (Double,Double)
deriving (Show, Typeable, Data, Eq)
but I get the following error :
Couldn't match expected type `Act'
with actual type `(Double, Double) -> Act'
In the expression: ActA
Is it possible to retrieve a list of argument with values ?