我不知道为什么PureScript无法匹配两个约束类型是,性格的性格,一样的!请参阅下面的错误消息。产生它立即给出下面的代码: -- We are using https://pursuit.purescript.org/packages/purescript-sized-vectors/1.0.0
import Data.Typelevel.Num (class Lt, class Nat,
有没有办法更优雅地编写以下函数? 我可以看到一些模式,但我不知道如何抽象它们或如何找到一种更简单的方法来编写函数。 type HasRemainder = Boolean
tomorrow :: Date -> Date
tomorrow date = unsafePartial $ canonicalDate y (fst m) (fst d)
where d :: Tuple