Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
89a840db
Commit
89a840db
authored
Nov 04, 2016
by
Oleg Grenrus
Browse files
No LambdaCase, resolve #4079
parent
3d6dbe69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Cabal/Distribution/Parsec/ConfVar.hs
View file @
89a840db
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
module
Distribution.Parsec.ConfVar
(
parseConditionConfVar
)
where
...
...
@@ -103,12 +102,12 @@ parser = condOr
(
"=="
,
thisVersion
)
]
-- Number token can have many dots in it: SecArgNum (Position 65 15) "7.6.1"
ident
=
tokenPrim
$
\
case
ident
=
tokenPrim
$
\
t
->
case
t
of
SecArgName
_
s
->
Just
$
fromUTF8BS
s
SecArgNum
_
s
->
Just
$
fromUTF8BS
s
_
->
Nothing
boolLiteral'
=
tokenPrim
$
\
case
boolLiteral'
=
tokenPrim
$
\
t
->
case
t
of
SecArgName
_
s
|
s
==
"True"
->
Just
True
|
s
==
"true"
->
Just
True
...
...
@@ -116,11 +115,11 @@ parser = condOr
|
s
==
"false"
->
Just
False
_
->
Nothing
string
s
=
tokenPrim
$
\
case
string
s
=
tokenPrim
$
\
t
->
case
t
of
SecArgName
_
s'
|
s
==
s'
->
Just
()
_
->
Nothing
oper
o
=
tokenPrim
$
\
case
oper
o
=
tokenPrim
$
\
t
->
case
t
of
SecArgOther
_
o'
|
o
==
o'
->
Just
()
_
->
Nothing
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment