diff options
author | defanor <defanor@uberspace.net> | 2017-12-03 10:39:34 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2017-12-03 10:39:34 +0300 |
commit | 15f63061dd9308e223077d718db0fce85366538f (patch) | |
tree | 5b202660f3eb4cb6e21c1163a2dcf03cfc3ad096 /Example.hs | |
parent | 9fd02f49809bfdfef205fae5885636eef0a69b21 (diff) |
Add List and Either instances
No special handling for those yet, just for testing.
Diffstat (limited to 'Example.hs')
-rw-r--r-- | Example.hs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -16,7 +16,7 @@ instance ToArgs RecTest data Foo = Bar Int | Baz Int - | Qux (Maybe Int) (Maybe String) RecTest (Maybe Double) + | Qux [Int] (Maybe Int) (Either String Int) RecTest (Maybe Double) deriving (Generic, Show) instance ArgParser Foo @@ -30,7 +30,7 @@ instance ToArgs Wrap main :: IO () main = do - let val = Wrap (Just $ Qux Nothing (Just "foo bar") + let val = Wrap (Just $ Qux [1,2,3] Nothing (Left "foo bar") (RecTest Nothing (Just 2.3) Nothing) Nothing) (Just 1) a = toArgs defMod val print val |