Comments (11)
v2.0.11
Because I don't know all about which type identifiers are expected to be processed, I close this issue now.
?- must_be(flix,flux).
error(type_error(type,flix),must_be/2). % expected
from trealla.
from trealla.
error.pl
Currently, the following types are supported: boolean,chars, ...
?- must_be(boolean,hmm).
true. % unexpected
?- must_be(chars,hmm).
error(type_error(type,chars),must_be/2). % unexpected
Expecting something like:
?- must_be(character,hmm).
error(type_error(character,hmm),must_be/2). % expected
from trealla.
from trealla.
Please note that chars
is not a type to be reported. In stead, use either list
or character
whichever one is violated.
from trealla.
So, non-characters in a list are not found:
?- must_be(character,1).
error(type_error(character,1),must_be/2).
?- must_be(list,[a,b,1,c]).
true.
?- must_be(chars,[a,b,1,c]). % character-lists are not supported?
error(type_error(chars,[a,b,1,c]),must_be/2). % example (not implemented and not expected)
from trealla.
Sometimes baffling
?- must_be(character, "a").
true.
?- must_be(character, [a]).
error(type_error(character,"a"),must_be/2). % might be reported as ... error(character,[a] ... ?
from trealla.
v2.0.12
?- must_be(chars,a).
true.
?- must_be(chars,abc).
error(type_error(list,abc),must_be/2). % unexpected
?- must_be(chars,"abc").
error(type_error(list,"abc"),must_be/2). % unexpected
?- must_be(chars,[a,b,c]).
error(type_error(list,"abc"),must_be/2). % unexpected
?- must_be(chars,[a,b,1,c]).
error(type_error(list,[a,b,1,c]),must_be/2). % somehow expected, perhaps ...error(character,1)...
from trealla.
v2.0.13
?- must_be(chars,"").
true.
?- must_be(chars,[]).
true.
No character is a character?
After all it reads "must be".
from trealla.
from trealla.
In that case the issue can be closed. Thank you very much indeed.
from trealla.
Related Issues (20)
- Somewhat unexpected error context HOT 1
- Meta predicate goal expansion HOT 2
- Segmentation fault (core dumped)
- FYI: Trealla trashes effort to port a C-compiler HOT 11
- Pressing the tab key = segmentation fault HOT 3
- CLPZ: `#<==>/2` crashing (and consequently: `clpz_t/2`, `#=/3`, `#</3`) HOT 6
- CLPZ: Comparison HOT 3
- current_op/3 shuttered
- `phrase_to_stream/2` (consequently: `phrase_to_file/2`) total memory consumption with a mega-string HOT 1
- is/2 type_error disregarded HOT 1
- CLPZ:monotonic: segfault
- CLPZ: Error: syntax error unexpected HOT 2
- segmentation fault in warehouse test HOT 5
- phrase/2 instantiation_error? HOT 1
- phrase/2 segfault HOT 1
- does this terminate, i.e. model finder HOT 8
- Application-specific Comparsion HOT 4
- Odd parser bug HOT 8
- Syntax error undetected
- op/3 Operator deactivation fault
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trealla.