From 4274fd7dee54f5da211f0665f7331f249a14992f Mon Sep 17 00:00:00 2001 From: Dave Zuch Date: Fri, 14 Apr 2023 11:38:55 -0700 Subject: [PATCH] Update `Option.fromRecord` documentation The fact that `Option.fromRecord` can take a `Record _` of `Maybe _` values as well was not documented. We update the documentation comment to mention this fact, for those who might be looking for this functionality. --- src/Option.purs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Option.purs b/src/Option.purs index f2af862..f9c922b 100644 --- a/src/Option.purs +++ b/src/Option.purs @@ -2549,6 +2549,12 @@ empty = Option Foreign.Object.empty -- | option4 :: Option.Option ( foo :: Boolean, bar :: Int ) -- | option4 = Option.fromRecord { qux: [] } -- | ``` +-- | +-- | You can also use `Option.fromRecord` to go from a `Record _` of `Maybe _` values to an `Option _`, e.g.: +-- | ```PureScript +-- | option5 :: Option.Option ( foo :: Boolean, bar :: Int ) +-- | option5 = Option.fromRecord { foo: Nothing, bar: Maybe 31 } +-- | ``` fromRecord :: forall optional record. FromRecord record () optional =>