mirror of https://github.com/voidlizard/hbs2
suckless-conf, the fixme-new fuckup unfucked
This commit is contained in:
parent
00e24115ec
commit
62a011934d
|
@ -87,13 +87,13 @@ stringLike :: Syntax c -> Maybe String
|
||||||
stringLike = \case
|
stringLike = \case
|
||||||
LitStrVal s -> Just $ Text.unpack s
|
LitStrVal s -> Just $ Text.unpack s
|
||||||
SymbolVal (Id s) -> Just $ Text.unpack s
|
SymbolVal (Id s) -> Just $ Text.unpack s
|
||||||
x -> Just $ show $ pretty x
|
_ -> Nothing
|
||||||
|
|
||||||
textLike :: Syntax c -> Maybe Text
|
textLike :: Syntax c -> Maybe Text
|
||||||
textLike = \case
|
textLike = \case
|
||||||
LitStrVal s -> Just s
|
LitStrVal s -> Just s
|
||||||
SymbolVal (Id s) -> Just s
|
SymbolVal (Id s) -> Just s
|
||||||
x -> Just $ Text.pack $ show $ pretty x
|
x -> Nothing
|
||||||
|
|
||||||
stringLikeList :: [Syntax c] -> [String]
|
stringLikeList :: [Syntax c] -> [String]
|
||||||
stringLikeList syn = [ stringLike s | s <- syn ] & takeWhile isJust & catMaybes
|
stringLikeList syn = [ stringLike s | s <- syn ] & takeWhile isJust & catMaybes
|
||||||
|
|
Loading…
Reference in New Issue