Add another showcase/example

pull/46/head
Lennart Spitzner 2017-08-03 20:36:46 +02:00
parent da692a4341
commit 706bacd344
1 changed files with 10 additions and 1 deletions

View File

@ -8,7 +8,7 @@ these without any alignment) and pass it through brittany, you would (again)
get the below versions. get the below versions.
#### basic nested alignment example #### nested alignment for patterns
~~~~.hs ~~~~.hs
func (MyLongFoo abc def) = 1 func (MyLongFoo abc def) = 1
@ -16,6 +16,15 @@ func (Bar a d ) = 2
func _ = 3 func _ = 3
~~~~ ~~~~
~~~~.hs
go [] "" = True
go [WildCard ] "" = True
go (WildCard :rest) (c:cs) = go rest (c : cs) || go (WildCard : rest) cs
go (Union globs:rest) cs = any (\glob -> go (glob ++ rest) cs) globs
go [] (_:_) = False
go (_:_) "" = False
~~~~
#### alignment of function args and monadcomp bindings #### alignment of function args and monadcomp bindings
~~~~.hs ~~~~.hs