Open
Description
The signature passed to the created def
function is resolved regardless whether checkTypes
is true
or not, meaning there is currently a potential, unnecessary performance drain from resolving those signatures which are then subsequently discarded immediately in production environments.
import $ from 'sanctuary-def';
import {create} from 'hm-def';
const def = create ({
checkTypes: false,
env: $.env,
typeClasses: [],
});
const foo = def
// This signature will be parsed and resolved to an `Array Type`, regardless of `checkTypes` above.
('foo :: Boolean -> Boolean')
(x => !x);
The resolved signature is never used by sanctuary-def
's def
when checkTypes
is false
anyways.
<
3C85
/div>
Metadata
Metadata
Assignees
Labels
No labels