Skip to content

Commit

Permalink
Merge pull request #10 from int-index/changelog
Browse files Browse the repository at this point in the history
Update changelog
  • Loading branch information
int-index authored Jul 10, 2018
2 parents de61aa7 + b71ba89 commit f8541c0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 7 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.2.0.0

* Removed 'Flag'.
* Changed notation: 'Named' is now '(:!)' in types, 'Arg' in patterns.
* Added 'arg', 'argF'.
* Support for optional parameters: see 'argDef', 'defaults', '(:?)'.

## 0.1.0.0

* First version. Released on an unsuspecting world.
7 changes: 5 additions & 2 deletions src/Named/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,16 @@ argF _ (ArgF fa) = fa

{- |
A variation of 'arg' for optional arguments. Requires a default value in case
the optional argument is missing:
A variation of 'arg' for optional arguments. Requires a default value to handle
the case when the optional argument was omitted:
@
fn (argDef \#answer 42 -> ans) = ...
@
In case you want to get a value wrapped in 'Maybe' instead, use 'argF' or
'ArgF'.
-}
argDef :: Name name -> a -> name :? a -> a
argDef _ d (ArgF fa) = fromMaybe d fa
Expand Down

0 comments on commit f8541c0

Please sign in to comment.