문제

Here's the type I have created to manipulate propositional formulas:

 type bexp = V of string
            |B of bool
            | Neg of bexp
            | And of bexp * bexp 
            | Or of bexp * bexp
            | Impl of bexp * bexp
            | Eqv of bexp * bexp

I need to manipulate a set of formulas but I get error of type when I try to create it:

module MyOwn = struct
    type =bexp 
  compare=compare
    end ;;
      Characters 30-31:
     type =bexp 

What did I got wrong, Can you help me,please?

도움이 되었습니까?

해결책

You need to say

type t = bexp

You just left out the type name t.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top