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
GHC
Commits
2e29ea96
Commit
2e29ea96
authored
Jan 12, 2015
by
Andrey Mokhov
Browse files
Clean up.
parent
238efc2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Oracles/Base.hs
View file @
2e29ea96
...
...
@@ -8,7 +8,8 @@ module Oracles.Base (
import
Base
import
Development.Shake.Classes
newtype
ConfigKey
=
ConfigKey
String
deriving
(
Show
,
Typeable
,
Eq
,
Hashable
,
Binary
,
NFData
)
newtype
ConfigKey
=
ConfigKey
String
deriving
(
Show
,
Typeable
,
Eq
,
Hashable
,
Binary
,
NFData
)
askConfigWithDefault
::
String
->
Action
String
->
Action
String
askConfigWithDefault
key
defaultAction
=
do
...
...
src/Oracles/Flag.hs
View file @
2e29ea96
...
...
@@ -81,11 +81,11 @@ instance Not Bool where
instance
Not
Condition
where
type
NotResult
Condition
=
Condition
not
x
=
not
<$>
(
toCondition
x
)
not
=
fmap
not
instance
Not
Flag
where
type
NotResult
Flag
=
Condition
not
x
=
not
(
toCondition
x
)
not
=
not
.
toCondition
class
AndOr
a
b
where
type
AndOrResult
a
b
...
...
@@ -102,12 +102,12 @@ instance AndOr Bool Bool where
instance
ToCondition
a
=>
AndOr
Condition
a
where
type
AndOrResult
Condition
a
=
Condition
x
&&
y
=
(
Prelude
.&&
)
<$>
toCondition
x
<*>
toCondition
y
x
||
y
=
(
Prelude
.||
)
<$>
toCondition
x
<*>
toCondition
y
x
&&
y
=
(
&&
)
<$>
x
<*>
toCondition
y
x
||
y
=
(
||
)
<$>
x
<*>
toCondition
y
instance
ToCondition
a
=>
AndOr
Flag
a
where
type
AndOrResult
Flag
a
=
Condition
x
&&
y
=
toCondition
x
&&
y
x
||
y
=
toCondition
x
||
y
-- TODO: need one more instance?
\ No newline at end of file
-- TODO: need more instances to handle Bool as first argument of (&&), (||)
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