summaryrefslogtreecommitdiff
path: root/Example.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Example.hs')
-rw-r--r--Example.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Example.hs b/Example.hs
index 0319bcd..6454fc7 100644
--- a/Example.hs
+++ b/Example.hs
@@ -6,7 +6,9 @@ import GHC.Generics
import Text.Megaparsec
import Coalpit
-data RecTest = RecTest { a :: Maybe Int, b :: Maybe Double, c :: Maybe Int }
+data RecTest = RecTest { a :: Maybe Int
+ , b :: Maybe Double
+ , c :: Maybe Int }
deriving (Generic, Show)
instance ArgParser RecTest
@@ -29,7 +31,7 @@ instance ToArgs Wrap
main :: IO ()
main = do
let val = Wrap (Just $ Qux Nothing (Just 1) (RecTest Nothing (Just 2.3) Nothing) Nothing) (Just 1)
- a = args val
+ a = args defMod val
print val
putStrLn a
- print $ parse (argParser :: Parser Wrap) "test" a
+ print $ parse (argParser defMod :: Parser Wrap) "test" a