我试图用FFI导入下面的JavaScript函数到PureScript映射0参数的JavaScript函数: function getGreeting() {
return "Hi, welcome to the show."
}
,但我不知道该类型应该是什么。最近我得到的是这样的: foreign import getGreeting :: Unit -> String
我想
我正在使用purescript-halogen,并且当子组件的消息被捕获时我想滚动到div的底部。 但是,它似乎不存在,在卤素滚动行动控制。 所以,我怎么能 Scroll to bottom of div? 一个解决方案,我认为是在事件捕获的其他这一号召,不是卤素,过程从主。 我不确定这个解决方案不坏。
我与一个类型级权限的系统试验,我试图以禁止不从相同的“源”来源值的分配,即: data A = A { a :: Value, b :: Value }
modify :: A -> A
modify (A v) = A $ v { a = v.a } -- should work
modify (A v) = A $ v { a = v.b } -- should *NOT* work
我有以下purescript代码: class Node a where
parentNode :: forall b. (Node b) => a -> b
但是当编译这个我得到以下错误: A cycle appears in the definition of type synonym Node
Cycles are disallowed because they can le