Search Results

Search found 3 results on 1 pages for 'agda'.

Page 1/1 | 1 

  • "Strictly positive" in Agda

    - by Jason
    I'm trying to encode some denotational semantics into Agda based on a program I wrote in Haskell. data Value = FunVal (Value -> Value) | PriVal Int | ConVal Id [Value] | Error String In Agda, the direct translation would be; data Value : Set where FunVal : (Value -> Value) -> Value PriVal : N -> Value ConVal : String -> List Value -> Value Error : String -> Value but I get an error relating to the FunVal because; Value is not strictly positive, because it occurs to the left of an arrow in the type of the constructor FunVal in the definition of Value. What does this mean? Can I encode this in Agda? Am I going about it the wrong way? Thanks.

    Read the article

  • Do any languages other than haskell/agda have a hindley-milner type system and type classes?

    - by Jimmy Hoffa
    In pondering what gives Haskell such a layer of mental pain in becoming proficient the main thing I can think of are the Monads, Applicatives, Functors, and gaining an intuition to know how a list or maybe will behave in regards to sequence or alternate or bind etc. But why haven't other languages presented these same concepts given the usefulness of monads/applicatives/etc? It occurs to me, type classes are the key, so the question is: Have any languages other than Haskell/Agda actually implemented type classes in the same or similar way?

    Read the article

  • I'm working on Peano Axioms in Agda and I've hit a bit of a sticking point

    - by Schroedinger
    PA6 : ?{m n} -> m = n -> n = m is the axiom I am trying to solve and support, I've tried using a cong (from the core library) but am having troubles with the cong constructor PA6 = cong gets me nowhere, I know for cong I am required to supply a refl for equality and a type, but I'm, not sure what type I'm supposed to supply. Ideas? This is for a small assignment at University, so I'd rather someone demonstrate what I've missed rather than write the acutual answer, but I'd appreciate any degree of support.

    Read the article

1