1 -- | Miscellaneous utility functions
6 -- | If given 'Nothing', return 'Nothing'. Otherwise wrap our argument
7 -- in another 'Just'. This is used when handling optional XML
8 -- elements that are optionally empty. If the element is missing, we
9 -- want 'Nothing'. And if the contents are missing, we want
10 -- 'Nothing' then too. But if something is present, we need @Just
11 -- (Just foo)@ for the types to match up.
15 -- >>> double_just Nothing
17 -- >>> double_just (Just 2)
20 double_just :: (Maybe a) -> Maybe (Maybe a)
24 just_something -> Just just_something