You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is a common style to use t to name a type that is of importance in a module in OCaml/Reason/etc.
However, when I try to do so in satysfi and combine it with inductive types, satysfi report a strange type error.
Namely, for the following code,
module Hoge : sig
type 'a t
end = struct
type 'a t = Hoge
end
module Fuga : sig
type 'a t
val get : 'a t -> 'a Hoge.t
end = struct
type 'a t = C of 'a Hoge.t
let-rec get (C r) = r % r should be of 'a Hoge.t but has 'a Fuga.t
end
I got an error saying
! [Type Error] at "crash2.satyh", line 7, character 0 to line 14, character 3:
The implementation of value 'get' has type
'#a Fuga.t -> '#a Fuga.t
which is inconsistent with the type required by the signature
'#a Fuga.t -> '#a Hoge.t
I think the type checker has a bug on handling type names.
When I changed the name of Fuga.t to Fuga.t1, the bug disappeared.
The text was updated successfully, but these errors were encountered:
(cf. #184)
It is a common style to use
t
to name a type that is of importance in a module in OCaml/Reason/etc.However, when I try to do so in satysfi and combine it with inductive types, satysfi report a strange type error.
Namely, for the following code,
I got an error saying
I think the type checker has a bug on handling type names.
When I changed the name of
Fuga.t
toFuga.t1
, the bug disappeared.The text was updated successfully, but these errors were encountered: