ListEx.hascasl.output revision 946f62de1b188898dde0c472f2a8a6fb86f4d2f5
var b : Type
var a : +Type
type List a
free type List a ::= Nil | Cons (head : a; tail : List a)
free type
free type
free type
free type Tree a ::= Leaf | Branch (head : Tree a; tail : Tree a)
generated type Tree1 a
::= Leaf | Branch (head : Tree a; tail : Tree1 a)
type Tree2 a ::= Leaf | Branch (head : Tree a; tail : Tree2 a)
free types
even a ::= rek (odd a);
odd a ::= rek (even a)
free type odd2 a ::= rek (even2 a)
types
List : +Type -> Type;
Tree : +Type -> Type;
Tree1 : +Type -> Type;
Tree2 : +Type -> Type;
even : +Type -> Type;
even2 : +Type -> Type;
odd : +Type -> Type;
odd2 : +Type -> Type
types
List
%[free type List(a : +Type) ::=
Cons (head : a; tail : List a) | Nil]%;
Tree
%[free type Tree(a : +Type) ::=
Branch (head : Tree a; tail : Tree a) | Leaf]%;
Tree1
%[generated type Tree1(a : +Type) ::=
Branch (head : Tree a; tail : Tree1 a) | Leaf]%;
Tree2
%[type Tree2(a : +Type) ::=
Branch (head : Tree a; tail : Tree2 a) | Leaf]%;
even %[free type even(a : +Type) ::= rek (odd a)]%;
even2 %(data type)%;
odd %[free type odd(a : +Type) ::= rek (even a)]%;
odd2 %[free type odd2(a : +Type) ::= rek (even2 a)]%
vars
a : +Type %(var_2)%;
b : Type %(var_1)%
op Branch : forall a : Type . Tree a * Tree a -> Tree a
%(constructor)%
op Branch : forall a : Type . Tree a * Tree1 a -> Tree1 a
%(constructor)%
op Branch : forall a : Type . Tree a * Tree2 a -> Tree2 a
%(constructor)%
op Cons : forall a : Type . a * List a -> List a %(constructor)%
op Leaf : forall a : Type . Tree a %(constructor)%
op Leaf : forall a : Type . Tree1 a %(constructor)%
op Leaf : forall a : Type . Tree2 a %(constructor)%
op Nil : forall a : Type . List a %(constructor)%
op head : forall a : Type . List a -> a
%(selector of constructor(s)
Cons : forall a : Type . a * List a -> List a)%
op head : forall a : Type . Tree a -> Tree a
%(selector of constructor(s)
Branch : forall a : Type . Tree a * Tree a -> Tree a)%
op head : forall a : Type . Tree1 a -> Tree a
%(selector of constructor(s)
Branch : forall a : Type . Tree a * Tree1 a -> Tree1 a)%
op head : forall a : Type . Tree2 a -> Tree a
%(selector of constructor(s)
Branch : forall a : Type . Tree a * Tree2 a -> Tree2 a)%
op rek : forall a : Type . even a -> odd a %(constructor)%
op rek : forall a : Type . even2 a -> odd2 a %(constructor)%
op rek : forall a : Type . odd a -> even a %(constructor)%
op tail : forall a : Type . List a -> List a
%(selector of constructor(s)
Cons : forall a : Type . a * List a -> List a)%
op tail : forall a : Type . Tree a -> Tree a
%(selector of constructor(s)
Branch : forall a : Type . Tree a * Tree a -> Tree a)%
op tail : forall a : Type . Tree1 a -> Tree1 a
%(selector of constructor(s)
Branch : forall a : Type . Tree a * Tree1 a -> Tree1 a)%
op tail : forall a : Type . Tree2 a -> Tree2 a
%(selector of constructor(s)
Branch : forall a : Type . Tree a * Tree2 a -> Tree2 a)%
forall a : +Type; x_1_1 : a; x_1_2 : List a
. (op head : forall a : Type . List a -> a) (Cons (x_1_1, x_1_2))
= x_1_1 %(ga_select_head)%
forall a : +Type; x_1_1 : a; x_1_2 : List a
. (op tail : forall a : Type . List a -> List a)
(Cons (x_1_1, x_1_2))
= x_1_2 %(ga_select_tail)%
free type List(a : +Type) ::= Cons (head : a; tail : List a) | Nil
%(ga_List)%
free type List(a : +Type) ::= Cons (head : a; tail : List a) | Nil
%(ga_List)%
free type List(a : +Type) ::= Cons (head : a; tail : List a) | Nil
%(ga_List)%
free type List(a : +Type) ::= Cons (head : a; tail : List a) | Nil
%(ga_List)%
forall a : +Type; x_1_1 : Tree a; x_1_2 : Tree a
. (op head : forall a : Type . Tree a -> Tree a)
((op Branch : forall a : Type . Tree a * Tree a -> Tree a)
(x_1_1, x_1_2))
= x_1_1 %(ga_select_head)%
forall a : +Type; x_1_1 : Tree a; x_1_2 : Tree a
. (op tail : forall a : Type . Tree a -> Tree a)
((op Branch : forall a : Type . Tree a * Tree a -> Tree a)
(x_1_1, x_1_2))
= x_1_2 %(ga_select_tail)%
free type Tree(a : +Type) ::=
Branch (head : Tree a; tail : Tree a) | Leaf %(ga_Tree)%
forall a : +Type; x_1_1 : Tree a; x_1_2 : Tree1 a
. (op head : forall a : Type . Tree1 a -> Tree a)
((op Branch : forall a : Type . Tree a * Tree1 a -> Tree1 a)
(x_1_1, x_1_2))
= x_1_1 %(ga_select_head)%
forall a : +Type; x_1_1 : Tree a; x_1_2 : Tree1 a
. (op tail : forall a : Type . Tree1 a -> Tree1 a)
((op Branch : forall a : Type . Tree a * Tree1 a -> Tree1 a)
(x_1_1, x_1_2))
= x_1_2 %(ga_select_tail)%
generated type Tree1(a : +Type) ::=
Branch (head : Tree a; tail : Tree1 a) | Leaf
%(ga_Tree1)%
forall a : +Type; x_1_1 : Tree a; x_1_2 : Tree2 a
. (op head : forall a : Type . Tree2 a -> Tree a)
((op Branch : forall a : Type . Tree a * Tree2 a -> Tree2 a)
(x_1_1, x_1_2))
= x_1_1 %(ga_select_head)%
forall a : +Type; x_1_1 : Tree a; x_1_2 : Tree2 a
. (op tail : forall a : Type . Tree2 a -> Tree2 a)
((op Branch : forall a : Type . Tree a * Tree2 a -> Tree2 a)
(x_1_1, x_1_2))
= x_1_2 %(ga_select_tail)%
type Tree2(a : +Type) ::=
Branch (head : Tree a; tail : Tree2 a) | Leaf %(ga_Tree2)%
free type even(a : +Type) ::= rek (odd a)
free type odd(a : +Type) ::= rek (even a) %(ga_even_odd)%
free type odd2(a : +Type) ::= rek (even2 a) %(ga_even2_odd2)%
### Hint 1.5, is type variable 'b'
### Hint 2.5, is type variable 'a'
### Hint 4.11, redeclared type 'List'
*** Error 5.50-5.55, unbound type variable(s)
b in 'List b'
*** Error 6.50-6.57, unexpected type argument 'b'
*** Error 7.50-7.61, illegal polymorphic recursion
expected: List a
found: List (List a)
*** Error 14.27-14.38, illegal polymorphic recursion
expected: odd2 a
found: odd2 (odd2 a)