Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Seems like the original solution was automaticly ported to a new GHC version, and that broke it. The code compiles fine with NoPolyKinds language extension set, so i propose enabling it

  • Custom User Avatar

    My solution passes sample tests, but fails to compile on submission

    test/ImperativeSpec.hs:216:1: error:
        • Uninferrable type variable k10 in
          the type synonym right-hand side:
          forall v st (s :: k10).
          HasValue st v b =>
          Var st a -> v -> Imperative @{k10} @{k10} st s s ()
        • In the type declaration for ‘Op’
        |
    216 | type Op a b = forall v st s. HasValue st v b => Var st a -> v -> Imperative st s s ()
        | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    

    Idk, it looks like an internal problem

  • Custom User Avatar

    Haskell GHC 9.2.5

    tan related tests should accept answers expressed with cos

    simple expressions

    f(x) = (tan x)
    f'(x) = (/ 1 (^ (cos x) 2))
    
     actual:   `"(/ 1 (^ (cos x) 2))"`,
     expected: `"(+ 1 (^ (tan x) 2))"`
    

    Nested expressions

    f(x) = (tan (* 2 x))
    f'(x) = (* 2 (/ 1 (^ (cos (* 2 x)) 2)))
    
      actual:   `"(* 2 (/ 1 (^ (cos (* 2 x)) 2)))"`,
      expected: `"(* 2 (+ 1 (^ (tan (* 2 x)) 2)))"`
    
  • Custom User Avatar

    now it works, thank you!

  • Custom User Avatar

    Scala tests are flawed, identical c# code works just fine