diff --git a/doc/showcases/Layout_Alignment.md b/doc/showcases/Layout_Alignment.md index 64fec3e..26d4d7c 100644 --- a/doc/showcases/Layout_Alignment.md +++ b/doc/showcases/Layout_Alignment.md @@ -8,7 +8,7 @@ these without any alignment) and pass it through brittany, you would (again) get the below versions. -#### basic nested alignment example +#### nested alignment for patterns ~~~~.hs func (MyLongFoo abc def) = 1 @@ -16,6 +16,15 @@ func (Bar a d ) = 2 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 ~~~~.hs