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

Issue with hints and search space: Can't find implementation #344

Open
wurmli opened this issue Apr 30, 2020 · 0 comments
Open

Issue with hints and search space: Can't find implementation #344

wurmli opened this issue Apr 30, 2020 · 0 comments

Comments

@wurmli
Copy link

wurmli commented Apr 30, 2020

This issue is related e.g. to #319, #330 and others referring to interfaces and the use of dependent types.

module QTTTrials

data Tbl : (n : Nat) -> Type where
  [noHints]
  Value : (k : Nat) -> (value : String) -> Tbl k

%hint
valueZero : Tbl 0
valueZero = Value 0 "zero"

%hint
valueOne : Tbl 1
valueOne = Value 1 "one"

showValue : {m : Nat} -> Tbl m => (m : Nat) -> String
showValue @{Value k value} k = value

Steps to Reproduce

QTTTrials> :r
1/1: Building QTTTrials (QTTTrials.idr)
Loaded file QTTTrials.idr
QTTTrials> showValue Z
(interactive):1:1--1:12:Can't find an implementation for Tbl ?m

Expected Behavior

I would expect that the unique values of type "Tbl 0" or "Tbl 1" are found.

Observed Behavior

The values are not found, and even though it seems that as a search space the family of types Tbl m is taken, the two values valueOne and valueTwo are missed.

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