Skip to content

Add support for constructors #2

@paluh

Description

@paluh

We want to support constructors from the PS level. Let's introduce set of types and helpers:

foreign import data EffectConstructorFn2 :: Type -> Type -> Type -> EffectConstructorConstructorFn2

foreign import data runEffectConstructorFn2 ::
  forall a b obj. EffectFn3 (EffectConstructorFn2 a b obj) a b obj

Runners should use a referenced function and call new on function application - I mean usual stuff:

export function runEffectConstructorFn2(f, arg1, arg2) {
  return (new f(arg1, arg2));
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions