This repository has been archived by the owner on Oct 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #771 from lorenzo/better-type-hole-actions
Improved the suggestions for typed holes actions
- Loading branch information
Showing
10 changed files
with
266 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=FunctionalSpec #-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
module Main where | ||
|
||
import Test.Hspec | ||
import qualified Spec | ||
import qualified FunctionalSpec | ||
import TestUtils | ||
|
||
main :: IO () | ||
main = do | ||
setupStackFiles | ||
withFileLogging "functional.log" $ hspec Spec.spec | ||
withFileLogging "functional.log" $ hspec FunctionalSpec.spec |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module TypedHoles2 (foo2) where | ||
newtype A = A Int | ||
foo2 :: [A] -> A | ||
foo2 x = _ | ||
where | ||
stuff (A a) = A (a + 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
• Found hole: _ :: A | ||
• In the expression: _ | ||
In an equation for ‘foo2’: | ||
foo2 x | ||
= _ | ||
where | ||
stuff (A a) = A (a + 1) | ||
• Relevant bindings include | ||
stuff :: A -> A (bound at test/testdata/TypedHoles2.hs:6:5) | ||
x :: [A] (bound at test/testdata/TypedHoles2.hs:4:6) | ||
foo2 :: [A] -> A (bound at test/testdata/TypedHoles2.hs:4:1) | ||
Valid substitutions include | ||
undefined :: forall (a :: TYPE r). | ||
GHC.Stack.Types.HasCallStack => | ||
a | ||
(imported from ‘Prelude’ at test/testdata/TypedHoles2.hs:1:8-18 | ||
(and originally defined in ‘GHC.Err’)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
• Found hole: _ :: t -> FilePath | ||
Where: ‘t’ is a rigid type variable bound by | ||
the inferred type of | ||
lintDockerfile :: [IgnoreRule] | ||
-> t | ||
-> IO (Either Language.Docker.Parser.Error [Rules.RuleCheck]) | ||
at app/Main.hs:(229,5)-(235,47) | ||
• In the expression: _ | ||
In the first argument of ‘Docker.parseFile’, namely | ||
‘(_ dockerFile)’ | ||
In a stmt of a 'do' block: ast <- Docker.parseFile (_ dockerFile) | ||
• Relevant bindings include | ||
processedFile :: Either Language.Docker.Parser.Error Dockerfile | ||
-> Either Language.Docker.Parser.Error [Rules.RuleCheck] | ||
(bound at app/Main.hs:233:9) | ||
processRules :: Dockerfile -> [Rules.RuleCheck] | ||
(bound at app/Main.hs:234:9) | ||
ignoredRules :: Rules.RuleCheck -> Bool | ||
(bound at app/Main.hs:235:9) | ||
dockerFile :: t (bound at app/Main.hs:229:32) | ||
ignoreRules :: [IgnoreRule] (bound at app/Main.hs:229:20) | ||
lintDockerfile :: [IgnoreRule] | ||
-> t -> IO (Either Language.Docker.Parser.Error [Rules.RuleCheck]) | ||
(bound at app/Main.hs:229:5) | ||
(Some bindings suppressed; use -fmax-relevant-binds=N or -fno-max-relevant-binds) | ||
Valid substitutions include | ||
mempty :: forall a. Monoid a => a | ||
(imported from ‘Prelude’ at app/Main.hs:5:8-11 | ||
(and originally defined in ‘GHC.Base’)) | ||
undefined :: forall (a :: TYPE r). | ||
GHC.Stack.Types.HasCallStack => | ||
a | ||
(imported from ‘Prelude’ at app/Main.hs:5:8-11 | ||
(and originally defined in ‘GHC.Err’)) | ||
idm :: forall m. Monoid m => m | ||
(imported from ‘Options.Applicative’ at app/Main.hs:21:1-46 | ||
(and originally defined in ‘Options.Applicative.Builder’)) |
Oops, something went wrong.