How to use the sanctuary-def.RecordType function in sanctuary-def

To help you get started, we’ve selected a few sanctuary-def examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xodio / hm-def / test / signature.spec.js View on Github external
it ('should resolve records', () => {
    const {types} = resolve ($) ([]) ($.env) ('foo :: { value :: Number } -> Number');
    assertTypePairs (S.zip (types) ([$.RecordType ({value: $.Number}), $.Number]));
  });
github fabioluz / fun-js / src / common / types / env.js View on Github external
import $ from 'sanctuary-def';

export const $Env = $.RecordType ({ 
  repositories: $.Object
});
github xodio / hm-def / src / index.js View on Github external
import $priv from 'sanctuary-def';
import * as Sig from './signature';

const def = $priv.create ({checkTypes: true, env: $priv.env});

const Parameters = $priv.RecordType ({
  $: $priv.Object,
  checkTypes: $priv.Boolean,
  env: $priv.Array ($priv.Type),
  typeClasses: $priv.Array ($priv.TypeClass),
});

export const create = def
  ('create')
  ({})
  ([
    Parameters,
    $priv.String,
    $priv.AnyFunction,
    $priv.AnyFunction,
  ])
  (({$, checkTypes, env, typeClasses}) => {