blob: 16819bd67645b5e44a15cd40603401d0cb41a665 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
[[!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
"""]]
|