Skip to content

Add support for constructors #2

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));
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions