Skip to content

How can I use Char value in example? #162

@masaomi-yamaguchi

Description

@masaomi-yamaguchi

I am using oopsla2020-revision.

How can I give an example that includes Char value?
For example, I gave following json:

root@e85cf5f88368:/home/hoogle_plus# stack exec -- hplus --json='{"query": "a -> b -> (a,b)","inExamples": [{"inputs": ["'a'","'b'"],"output": "('a','b')"}]}'

Then, Hoogle+ returned following result:

RESULTS:{"outCandidates":[],"outDocs":[],"outError":"examples does not type check\nVariable not in scope: a\nVariable not in scope: b\nVariable not in scope: a\nVariable not in scope: b\n\n\nCallStack (from HasCallStack):\n  error, called at src/HooglePlus/Synthesize.hs:119:21 in HooglePlus-0.1.0.0-Ik8tTtBtUji4knXiVynJca:HooglePlus.Synthesize"}
hplus: examples does not type check
Variable not in scope: a
Variable not in scope: b
Variable not in scope: a
Variable not in scope: b


CallStack (from HasCallStack):
  error, called at src/HooglePlus/Synthesize.hs:119:21 in HooglePlus-0.1.0.0-Ik8tTtBtUji4knXiVynJca:HooglePlus.Synthesize
CallStack (from HasCallStack):
  error, called at src/HooglePlus/Synthesize.hs:125:10 in HooglePlus-0.1.0.0-Ik8tTtBtUji4knXiVynJca:HooglePlus.Synthesize
[error]: examples does not type check
[error]: Variable not in scope: a
[error]: Variable not in scope: b
[error]: Variable not in scope: a
[error]: Variable not in scope: b
[error]: 
[error]: 
[error]: CallStack (from HasCallStack):
[error]:   error, called at src/HooglePlus/Synthesize.hs:119:21 in HooglePlus-0.1.0.0-Ik8tTtBtUji4knXiVynJca:HooglePlus.Synthesize
root@e85cf5f88368:/home/hoogle_plus# 

Hoogle+ can handle Char-type, but I cannot find a way to use Char value in examples.
How can I use Char value in examples?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions