Commit 1e14fd3e authored by Matthías Páll Gissurarson's avatar Matthías Páll Gissurarson Committed by Ben Gamari

Inform hole substitutions of typeclass constraints (fixes #14273).

This implements SPJ's suggestion on the ticket (#14273). We find the
relevant constraints (ones that whose free unification variables are all
mentioned in the type of the hole), and then clone the free unification
variables of the hole and the relevant constraints. We then add a
subsumption constraints and run the simplifier, and then check whether
all the constraints were solved.

Reviewers: bgamari

Reviewed By: bgamari

Subscribers: RyanGlScott, rwbarton, thomie, carter

GHC Trac Issues: #14273

Differential Revision: https://phabricator.haskell.org/D4315
parent 6b1ff009
This diff is collapsed.
......@@ -113,7 +113,7 @@ module TcRnTypes(
isWanted, isGiven, isDerived, isGivenOrWDeriv,
ctEvRole,
wrapType,
wrapType, wrapTypeWithImplication,
-- Constraint solver plugins
TcPlugin(..), TcPluginResult(..), TcPluginSolver,
......@@ -2564,13 +2564,18 @@ pprEvVarWithType v = ppr v <+> dcolon <+> pprType (evVarPred v)
-- | Wraps the given type with the constraints (via ic_given) in the given
-- implication, according to the variables mentioned (via ic_skols)
-- in the implication.
wrapType :: Type -> Implication -> Type
wrapType ty (Implic {ic_skols = skols, ic_given=givens}) =
wrapWithAllSkols $ mkFunTys (map idType givens) $ ty
wrapTypeWithImplication :: Type -> Implication -> Type
wrapTypeWithImplication ty impl =
wrapType ty (ic_skols impl) (map idType $ ic_given impl)
wrapType :: Type -> [TyVar] -> [PredType] -> Type
wrapType ty skols givens =
wrapWithAllSkols $ mkFunTys givens ty
where forAllTy :: Type -> TyVar -> Type
forAllTy ty tv = mkForAllTy tv Specified ty
wrapWithAllSkols ty = foldl forAllTy ty skols
{-
************************************************************************
* *
......
......@@ -10,6 +10,7 @@ module TcSimplify(
simplifyWantedsTcM,
tcCheckSatisfiability,
tcSubsumes,
tcCheckHoleFit,
-- For Rules we need these
solveWanteds, solveWantedsAndDrop,
......@@ -488,11 +489,18 @@ simplifyDefault theta
-- N.B.: Make sure that the types contain all the constraints
-- contained in any associated implications.
tcSubsumes :: TcSigmaType -> TcSigmaType -> TcM Bool
tcSubsumes ty_a ty_b | ty_a `eqType` ty_b = return True
tcSubsumes ty_a ty_b = discardErrs $
tcSubsumes = tcCheckHoleFit emptyBag
-- | A tcSubsumes which takes into account relevant constraints, to fix trac
-- #14273. Make sure that the constraints are cloned, since the simplifier may
-- perform unification
tcCheckHoleFit :: Cts -> TcSigmaType -> TcSigmaType -> TcM Bool
tcCheckHoleFit _ hole_ty ty | hole_ty `eqType` ty = return True
tcCheckHoleFit relevantCts hole_ty ty = discardErrs $
do { (_, wanted, _) <- pushLevelAndCaptureConstraints $
tcSubType_NC ExprSigCtxt ty_b ty_a
; (rem, _) <- runTcS (simpl_top wanted)
tcSubType_NC ExprSigCtxt ty hole_ty
; (rem, _) <- runTcS (simpl_top $ addSimples wanted relevantCts)
-- We don't want any insoluble or simple constraints left,
-- but solved implications are ok (and neccessary for e.g. undefined)
; return (isEmptyBag (wc_simple rem)
......
module TcSimplify where
import GhcPrelude
import TcRnTypes ( TcM )
import TcRnTypes ( TcM, Cts )
import TcType ( TcSigmaType )
-- This boot file exists solely to make tcSubsume avaialble in TcErrors
-- This boot file exists solely to make tcCheckHoleFit avaialble in TcErrors
tcSubsumes :: TcSigmaType -> TcSigmaType -> TcM Bool
tcCheckHoleFit :: Cts -> TcSigmaType -> TcSigmaType -> TcM Bool
......@@ -10,6 +10,7 @@ Defer03.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
Valid substitutions include
f :: Int (defined at Defer03.hs:7:1)
a :: Int (defined at Defer03.hs:4:1)
undefined :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
......@@ -34,6 +35,7 @@ Defer03.hs:7:5: error:
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
Valid substitutions include
f :: Int (defined at Defer03.hs:7:1)
a :: Int (defined at Defer03.hs:4:1)
undefined :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
......@@ -58,6 +60,7 @@ Defer03.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
Valid substitutions include
f :: Int (defined at Defer03.hs:7:1)
a :: Int (defined at Defer03.hs:4:1)
undefined :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
......@@ -82,6 +85,7 @@ Defer03.hs:7:5: error:
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
Valid substitutions include
f :: Int (defined at Defer03.hs:7:1)
a :: Int (defined at Defer03.hs:4:1)
undefined :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
......@@ -106,6 +110,7 @@ Defer03.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
Valid substitutions include
f :: Int (defined at Defer03.hs:7:1)
a :: Int (defined at Defer03.hs:4:1)
undefined :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
......
......@@ -29,6 +29,8 @@ T10267.hs:8:1: error:
• Relevant bindings include i :: a -> a (bound at T10267.hs:8:1)
Valid substitutions include
l :: forall a. a -> a (defined at T10267.hs:23:3)
i :: forall a. a -> a (defined at T10267.hs:8:1)
j :: forall a. a -> a (defined at T10267.hs:8:1)
k :: forall a. a -> a (defined at T10267.hs:14:3)
foo :: forall a. a -> a (defined at T10267.hs:33:1)
id :: forall a. a -> a
......@@ -52,6 +54,9 @@ T10267.hs:14:3: error:
• Relevant bindings include k :: a -> a (bound at T10267.hs:14:3)
Valid substitutions include
l :: forall a. a -> a (defined at T10267.hs:23:3)
i :: forall a. a -> a (defined at T10267.hs:8:1)
j :: forall a. a -> a (defined at T10267.hs:8:1)
k :: forall a. a -> a (defined at T10267.hs:14:3)
foo :: forall a. a -> a (defined at T10267.hs:33:1)
id :: forall a. a -> a
(imported from ‘Prelude’ at T10267.hs:3:8-13
......
......@@ -305,7 +305,7 @@ test('TH_Lift', normal, compile, ['-v0'])
test('T10047', only_ways(['ghci']), ghci_script, ['T10047.script'])
test('T10019', only_ways(['ghci']), ghci_script, ['T10019.script'])
test('T10267', [], multimod_compile_fail,
['T10267', '-dsuppress-uniques -v0 ' + config.ghc_th_way_flags])
['T10267', '-fno-max-valid-substitutions -dsuppress-uniques -v0 ' + config.ghc_th_way_flags])
test('T10279', normal, compile_fail, ['-v0'])
test('T10306', normal, compile, ['-v0'])
test('T10596', normal, compile, ['-v0'])
......
......@@ -9,6 +9,9 @@ T13050.hs:4:9: warning: [-Wtyped-holes (in -Wdefault)]
x :: Int (bound at T13050.hs:4:3)
f :: Int -> Int -> Int (bound at T13050.hs:4:1)
Valid substitutions include
f :: Int -> Int -> Int (defined at T13050.hs:4:1)
g :: Int -> Int -> Int (defined at T13050.hs:5:1)
q :: Int -> Int -> Int (defined at T13050.hs:6:1)
(-) :: forall a. Num a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Num’))
......@@ -74,6 +77,8 @@ T13050.hs:5:11: warning: [-Wtyped-holes (in -Wdefault)]
g :: Int -> Int -> Int (bound at T13050.hs:5:1)
Valid substitutions include
f :: Int -> Int -> Int (defined at T13050.hs:4:1)
g :: Int -> Int -> Int (defined at T13050.hs:5:1)
q :: Int -> Int -> Int (defined at T13050.hs:6:1)
(-) :: forall a. Num a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Num’))
......@@ -141,6 +146,7 @@ T13050.hs:6:11: warning: [-Wtyped-holes (in -Wdefault)]
Valid substitutions include
f :: Int -> Int -> Int (defined at T13050.hs:4:1)
g :: Int -> Int -> Int (defined at T13050.hs:5:1)
q :: Int -> Int -> Int (defined at T13050.hs:6:1)
(-) :: forall a. Num a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Num’))
......
module TypeClassConstraintsInformedHoles where
-- Make sure that constraints imposed by the call site
-- are handled. See trac #14273
pleaseShow :: Show a => Bool -> a -> Maybe String
pleaseShow False _ = Nothing
pleaseShow True a = Just (show _a)
k :: String
k = "I fit into the hole in foo!"
foo :: [a] -> String
foo xs = show (_h ++ [])
T14273.hs:7:27: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Could not deduce (Show a1) arising from a use of ‘show’
from the context: Show a
bound by the type signature for:
pleaseShow :: forall a. Show a => Bool -> a -> Maybe String
at T14273.hs:5:1-49
The type variable ‘a1’ is ambiguous
These potential instances exist:
instance (Show a, Show b) => Show (Either a b)
-- Defined in ‘Data.Either’
instance Show Ordering -- Defined in ‘GHC.Show’
instance Show Integer -- Defined in ‘GHC.Show’
...plus 23 others
...plus 67 instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the first argument of ‘Just’, namely ‘(show _a)’
In the expression: Just (show _a)
In an equation for ‘pleaseShow’: pleaseShow True a = Just (show _a)
T14273.hs:7:32: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _a :: a1
Where: ‘a1’ is an ambiguous type variable
Or perhaps ‘_a’ is mis-spelled, or not in scope
• In the first argument of ‘show’, namely ‘_a’
In the first argument of ‘Just’, namely ‘(show _a)’
In the expression: Just (show _a)
• Relevant bindings include
a :: a (bound at T14273.hs:7:17)
pleaseShow :: Bool -> a -> Maybe String (bound at T14273.hs:6:1)
Valid substitutions include
k :: String (defined at T14273.hs:10:1)
False :: Bool
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Types’))
True :: Bool
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Types’))
LT :: Ordering
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Types’))
EQ :: Ordering
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Types’))
GT :: Ordering
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Types’))
otherwise :: Bool
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Base’))
pi :: forall a. Floating a => a
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Float’))
T14273.hs:13:10: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Ambiguous type variable ‘a0’ arising from a use of ‘show’
prevents the constraint ‘(Show a0)’ from being solved.
Probable fix: use a type annotation to specify what ‘a0’ should be.
These potential instances exist:
instance (Show a, Show b) => Show (Either a b)
-- Defined in ‘Data.Either’
instance Show Ordering -- Defined in ‘GHC.Show’
instance Show Integer -- Defined in ‘GHC.Show’
...plus 23 others
...plus 67 instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the expression: show (_h ++ [])
In an equation for ‘foo’: foo xs = show (_h ++ [])
T14273.hs:13:16: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _h :: [a0]
Where: ‘a0’ is an ambiguous type variable
Or perhaps ‘_h’ is mis-spelled, or not in scope
• In the first argument of ‘(++)’, namely ‘_h’
In the first argument of ‘show’, namely ‘(_h ++ [])’
In the expression: show (_h ++ [])
• Relevant bindings include
xs :: [a] (bound at T14273.hs:13:5)
foo :: [a] -> String (bound at T14273.hs:13:1)
Valid substitutions include k :: String (defined at T14273.hs:10:1)
......@@ -9,6 +9,10 @@ T14590.hs:4:13: warning: [-Wtyped-holes (in -Wdefault)]
x :: Int (bound at T14590.hs:4:4)
f1 :: Int -> Int -> Int (bound at T14590.hs:4:1)
Valid substitutions include
f1 :: Int -> Int -> Int (defined at T14590.hs:4:1)
f2 :: Int -> Int -> Int (defined at T14590.hs:5:1)
f3 :: Int -> Int -> Int (defined at T14590.hs:6:1)
f4 :: Int -> Int -> Int (defined at T14590.hs:7:1)
(-) :: forall a. Num a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Num’))
......@@ -75,6 +79,9 @@ T14590.hs:5:13: warning: [-Wtyped-holes (in -Wdefault)]
f2 :: Int -> Int -> Int (bound at T14590.hs:5:1)
Valid substitutions include
f1 :: Int -> Int -> Int (defined at T14590.hs:4:1)
f2 :: Int -> Int -> Int (defined at T14590.hs:5:1)
f3 :: Int -> Int -> Int (defined at T14590.hs:6:1)
f4 :: Int -> Int -> Int (defined at T14590.hs:7:1)
(-) :: forall a. Num a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Num’))
......@@ -141,6 +148,8 @@ T14590.hs:6:11: warning: [-Wtyped-holes (in -Wdefault)]
Valid substitutions include
f1 :: Int -> Int -> Int (defined at T14590.hs:4:1)
f2 :: Int -> Int -> Int (defined at T14590.hs:5:1)
f3 :: Int -> Int -> Int (defined at T14590.hs:6:1)
f4 :: Int -> Int -> Int (defined at T14590.hs:7:1)
(-) :: forall a. Num a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Num’))
......@@ -209,6 +218,7 @@ T14590.hs:7:11: warning: [-Wtyped-holes (in -Wdefault)]
f1 :: Int -> Int -> Int (defined at T14590.hs:4:1)
f2 :: Int -> Int -> Int (defined at T14590.hs:5:1)
f3 :: Int -> Int -> Int (defined at T14590.hs:6:1)
f4 :: Int -> Int -> Int (defined at T14590.hs:7:1)
(-) :: forall a. Num a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Num’))
......
......@@ -6,6 +6,7 @@ T9497a.hs:2:8: warning: [-Wtyped-holes (in -Wdefault)]
In an equation for ‘main’: main = _main
• Relevant bindings include main :: IO () (bound at T9497a.hs:2:1)
Valid substitutions include
main :: IO () (defined at T9497a.hs:2:1)
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at T9497a.hs:1:1
(and originally defined in ‘GHC.Base’))
......
......@@ -390,6 +390,7 @@ test('hole_constraints', normal, compile, ['-fdefer-type-errors -fno-max-valid-s
test('hole_constraints_nested', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutions'])
test('valid_substitutions', [extra_files(['ValidSubs.hs'])],
multimod_compile, ['valid_substitutions','-fdefer-type-errors -fno-max-valid-substitutions'])
test('valid_substitutions_interactions', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutions'])
test('T7408', normal, compile, [''])
test('UnboxStrictPrimitiveFields', normal, compile, [''])
test('T7541', normal, compile, [''])
......@@ -588,3 +589,4 @@ test('MissingExportList02', normal, compile, [''])
test('T14488', normal, compile, [''])
test('T14590', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutions'])
test('T13032', normal, compile, [''])
test('T14273', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutions'])
......@@ -11,6 +11,7 @@ hole_constraints.hs:8:6: warning: [-Wtyped-holes (in -Wdefault)]
f1 :: a (bound at hole_constraints.hs:8:1)
Constraints include Eq a (from hole_constraints.hs:7:1-15)
Valid substitutions include
f1 :: forall a. Eq a => a (defined at hole_constraints.hs:8:1)
undefined :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
a
......@@ -32,6 +33,8 @@ hole_constraints.hs:12:6: warning: [-Wtyped-holes (in -Wdefault)]
Eq a (from hole_constraints.hs:11:1-25)
Valid substitutions include
f1 :: forall a. Eq a => a (defined at hole_constraints.hs:8:1)
f2 :: forall a. (Show a, Eq a) => a
(defined at hole_constraints.hs:12:1)
undefined :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
a
......@@ -41,7 +44,8 @@ hole_constraints.hs:12:6: warning: [-Wtyped-holes (in -Wdefault)]
hole_constraints.hs:16:35: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: [a]
Where: ‘a’ is a rigid type variable bound by
the instance declaration at hole_constraints.hs:16:10-22
the instance declaration
at hole_constraints.hs:16:10-22
• In the expression: _
In an equation for ‘f3’: f3 = _
In the instance declaration for ‘C [a]’
......@@ -49,6 +53,8 @@ hole_constraints.hs:16:35: warning: [-Wtyped-holes (in -Wdefault)]
f3 :: [a] (bound at hole_constraints.hs:16:30)
Constraints include Eq a (from hole_constraints.hs:16:10-22)
Valid substitutions include
f1 :: forall a. Eq a => a (defined at hole_constraints.hs:8:1)
f3 :: forall a. C a => a (defined at hole_constraints.hs:15:17)
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at hole_constraints.hs:3:8-22
(and originally defined in ‘GHC.Base’))
......
......@@ -22,11 +22,25 @@ holes2.hs:3:10: warning: [-Wtyped-holes (in -Wdefault)]
In an equation for ‘f’: f = show _
• Relevant bindings include f :: String (bound at holes2.hs:3:1)
Valid substitutions include
f :: String (defined at holes2.hs:3:1)
False :: Bool
(imported from ‘Prelude’ at holes2.hs:1:8-13
(and originally defined in ‘GHC.Types’))
True :: Bool
(imported from ‘Prelude’ at holes2.hs:1:8-13
(and originally defined in ‘GHC.Types’))
LT :: Ordering
(imported from ‘Prelude’ at holes2.hs:1:8-13
(and originally defined in ‘GHC.Types’))
EQ :: Ordering
(imported from ‘Prelude’ at holes2.hs:1:8-13
(and originally defined in ‘GHC.Types’))
GT :: Ordering
(imported from ‘Prelude’ at holes2.hs:1:8-13
(and originally defined in ‘GHC.Types’))
otherwise :: Bool
(imported from ‘Prelude’ at holes2.hs:1:8-13
(and originally defined in ‘GHC.Base’))
pi :: forall a. Floating a => a
(imported from ‘Prelude’ at holes2.hs:1:8-13
(and originally defined in ‘GHC.Float’))
undefined :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
a
(imported from ‘Prelude’ at holes2.hs:1:8-13
(and originally defined in ‘GHC.Err’))
module Foo where
import Prelude hiding (putStr)
import qualified System.IO
import Prelude hiding (putStr, putStrLn)
import qualified System.IO (putStr, putStrLn)
import Data.Maybe
import qualified ValidSubs
ps :: String -> IO ()
ps = putStrLn
a :: Int -> IO Int
a _ = return 1
b :: Int -> IO Int
b _ = return 2
c :: Int -> IO Int
c _ = do { x <- a 0
; y <- _ x
; return y }
test :: [Maybe a] -> [a]
test = _
......@@ -15,5 +23,15 @@ test = _
test2 :: Integer -> ValidSubs.Moo
test2 = _
k :: Maybe Integer
k = _ 2
f :: String
f = show _
h :: String
h = show (_ (_ :: Bool))
main :: IO ()
main = _ "hello, world"
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeInType #-}
{-# LANGUAGE TypeFamilies #-}
module ValidSubsInteractions where
import Data.Kind
data SBool :: Bool -> Type where
SFalse :: SBool 'False
STrue :: SBool 'True
f :: SBool 'True
f = _
valid_substitutions_interactions.hs:15:5: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: SBool 'True
• In the expression: _
In an equation for ‘f’: f = _
• Relevant bindings include
f :: SBool 'True
(bound at valid_substitutions_interactions.hs:15:1)
Valid substitutions include
STrue :: SBool 'True
(defined at valid_substitutions_interactions.hs:12:3)
f :: SBool 'True
(defined at valid_substitutions_interactions.hs:15:1)
undefined :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
a
(imported from ‘Prelude’ at valid_substitutions_interactions.hs:5:8-28
(and originally defined in ‘GHC.Err’))
......@@ -6,6 +6,7 @@ T9497d.hs:2:8: error:
In an equation for ‘main’: main = _main
• Relevant bindings include main :: IO () (bound at T9497d.hs:2:1)
Valid substitutions include
main :: IO () (defined at T9497d.hs:2:1)
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at T9497d.hs:1:1
(and originally defined in ‘GHC.Base’))
......
......@@ -6,6 +6,7 @@ T9497a-run: T9497a-run.hs:2:8: error:
• Relevant bindings include
main :: IO () (bound at T9497a-run.hs:2:1)
Valid substitutions include
main :: IO () (defined at T9497a-run.hs:2:1)
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at T9497a-run.hs:1:1
(and originally defined in ‘GHC.Base’))
......
......@@ -6,6 +6,7 @@ T9497b-run: T9497b-run.hs:2:8: error:
• Relevant bindings include
main :: IO () (bound at T9497b-run.hs:2:1)
Valid substitutions include
main :: IO () (defined at T9497b-run.hs:2:1)
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at T9497b-run.hs:1:1
(and originally defined in ‘GHC.Base’))
......
......@@ -6,6 +6,7 @@ T9497c-run: T9497c-run.hs:2:8: error:
• Relevant bindings include
main :: IO () (bound at T9497c-run.hs:2:1)
Valid substitutions include
main :: IO () (defined at T9497c-run.hs:2:1)
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at T9497c-run.hs:1:1
(and originally defined in ‘GHC.Base’))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment