Skip to content

Tactics plugin doesn't make use of existential or type equality constraints #1285

Closed
@Jashweii

Description

@Jashweii

Given the following:

{-# LANGUAGE GADTs #-}
{-# LANGUAGE ExistentialQuantification #-}
module Main where
main :: IO ()
main = pure ()

data X f = Monad f => X
data Y a b = a ~ b => Y
data Z a b where Z :: Z a a

The tactics plugin cannot derive any of the following holes:

-- Monad f from X
fun1 :: X f -> a -> f a
fun1 X = _ -- pure
-- a ~ b
fun2 :: (a ~ b) => a -> b
fun2 = _ -- id
-- a ~ b from Y
fun3 :: Y a b -> a -> b
fun3 Y = _ -- id
-- a ~ b from Z
fun4 :: Z a b -> a -> b
fun4 Z = _ -- id

(HLS - current master, GHC 8.10.3)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions