Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-implicit search fails with continuous data constructor parameter #4858

Open
xiaoyangzhuang opened this issue May 13, 2020 · 0 comments
Open

Comments

@xiaoyangzhuang
Copy link

xiaoyangzhuang commented May 13, 2020

Example.txt

Auto-implicit search fails if the desired data constructor has a continuous parameter (e.g. DataConstructor2 : Double -> Type2). However, search succeeds if the parameter is discrete (e.g. DataConstructor2 : Bool -> Type2).

Steps to Reproduce

  1. Copy the following into a .idr file:
data Type1 : Type where
    DataConstructor1 : Bool -> Type1

data Type2 : Type where
    DataConstructor2 : Double -> Type2

-- Works great!
function1 : {auto prf : Type1} -> IO ()
function1 = printLn "Auto-implicit parameter found successfully!"

-- Fails
function2 : {auto prf : Type2} -> IO ()
function2 = printLn "Auto-implicit parameter not found."
  1. On the REPL, hit the following:
    :exec function1
    :exec function2

Expected Behavior

:exec function1 => "Auto-implicit parameter found successfully!"
:exec function2 => "Auto-implicit parameter not found."

Observed Behavior

:exec function1 behaves as expected.
:exec function2 => Incomplete term ([__])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant