Commit afc63092 authored by Alfredo Di Napoli's avatar Alfredo Di Napoli

Add traceAnythingId and traceAnything

Add functions reminiscent to the one in `recover-rtti` and `Debug.Trace`
in Haskell land, for debug troubleshooting.
parent 2fc0d89a
"use strict";
export function _traceAnythingId(a) {
console.log(a);
return a;
}
export function _traceAnything(a,b) {
console.log(a);
return b;
}
module Gargantext.Utils.Trace (
traceAnythingId
, traceAnything
) where
import Gargantext.Prelude
import Data.Function.Uncurried (Fn1, runFn1, Fn2, runFn2)
foreign import _traceAnythingId :: forall a. Fn1 a a
foreign import _traceAnything :: forall a b. Fn2 a b b
traceAnythingId :: forall a. a -> a
traceAnythingId a = runFn1 _traceAnythingId a
traceAnything :: forall a b. a -> b -> b
traceAnything a b = runFn2 _traceAnything a b
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment