[[!comment format=mdwn username="joey" subject="""comment 5""" date="2017-02-03T19:32:58Z" content=""" What you're looking for is not a regexp, but Haskell's [pattern matching](https://www.haskell.org/tutorial/patterns.html). For example: myproperty :: Property Debian myproperty = withOS "some desc here" $ \w o -> case o of -- Pattern match on the OS, to get the Debian stable release (Just (System (Debian _kernel (Stable release)) _arch)) -> ensureProperty w $ Apt.setSourcesListD (sourcesLines release) "mysources" _ -> unsupportedOS sourcesLines :: Release -> [Line] sourcesLines release = undefined """]]