Skip to content

Commit

Permalink
Add pedantic option to ghci (commercialhaskell#4463)
Browse files Browse the repository at this point in the history
  • Loading branch information
ALeX Kazik committed Dec 27, 2018
1 parent 1bbed48 commit df30f9d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Other enhancements:
[#4095](https://github.com/commercialhaskell/stack/issues/4095)
* Add `--tree` to `ls dependencies` to list dependencies as tree.
[#4101](https://github.com/commercialhaskell/stack/issues/4101)
* Add `--pedantic` to `ghci` to run with `-Wall` and `-Werror`
[#4463](https://github.com/commercialhaskell/stack/issues/4463)

Bug fixes:

Expand Down
11 changes: 10 additions & 1 deletion src/Stack/Options/GhciParser.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Stack.Options.GhciParser where

import Options.Applicative
Expand Down Expand Up @@ -27,12 +28,20 @@ ghciOptsParser = GhciOpts
metavar "OPTIONS" <>
completer ghcOptsCompleter <>
help "Additional options passed to GHCi")))
<*> many

<*> (
(\x y -> x ++ y)

This comment has been minimized.

Copy link
@mihaimaruseac

mihaimaruseac Dec 27, 2018

Can just replace by (++)

<$> flag
[]
["-Wall", "-Werror"]
(long "pedantic" <> help "Turn on -Wall and -Werror")
<*> many
(textOption
(long "ghc-options" <>
metavar "OPTIONS" <>
completer ghcOptsCompleter <>
help "Additional options passed to both GHC and GHCi"))
)
<*> flagsParser
<*> optional
(strOption (long "with-ghc" <>
Expand Down

0 comments on commit df30f9d

Please sign in to comment.