Closed derrickbeining closed 6 years ago
Could you share the error message, @derrickbeining? I see => Identity { value: 42 }
as the output.
Quick response! Sorry, without thinking I edited that repl.it code and seem to have figured out the issue. I changed it back if you care to look again to see the error I was getting.
From skimming through the sanctuary-def README, it looks like
// IdentityType :: Type -> Type
const IdentityType = $.UnaryType(
Identity['@@type'],
'http://example.com/my-package#Identity',
x => type(x) === Identity['@@type'],
identity => [identity.value]
);
should be
const IdentityType = $.UnaryType
(Identity['@@type'])
('http://example.com/my-package#Identity')
(x => type(x) === Identity['@@type'])
(identity => [identity.value])
There were several breaking changes in sanctuary-def@0.15.0
. The most recent Sanctuary release depends on an older version of sanctuary-def:
$ npm view sanctuary version
0.14.1
$ npm view sanctuary dependencies.sanctuary-def
0.14.0
The readme is compatible with sanctuary-def@0.14.0
but not with more recent versions. I'll make sure that the readme is updated when I release sanctuary@0.15.0
(this weekend, hopefully).
I'm a newb to the ADT scene and was trying to get familiar with Sanctuary. I started with running the code from README.md#API#create here on REPL.it https://repl.it/@dbeining/sanctuary-js-create-env, and it threw a sanctuary type error. I'm assuming that's not the expected behavior, so wanted to see what's up.