Commit 8085e3b1 authored by Michael Hanus's avatar Michael Hanus
Browse files

Defaulting for Enum added

parent 4d8fcfe7
......@@ -589,9 +589,11 @@ defaultNumType(Type,Type).
removeDefaultedTypes(Type,Type) :- var(Type), !.
removeDefaultedTypes('FuncType'(AType,RType),DType) :-
classDict(AType,TVar,ModName,DictName),
ModName="Prelude",
member(DictName,["Eq","Ord","Read","Show"]),
nonvar(TVar), !,
ModName="Prelude", nonvar(TVar),
( member(DictName,["Eq","Ord","Read","Show"])
; DictName="Enum",
member(TVar,['TCons'('Prelude.Int',[]),'TCons'('Prelude.Float',[])])
), !,
removeDefaultedTypes(RType,DType).
removeDefaultedTypes('FuncType'(AType,RType),'FuncType'(AType,DType)) :- !,
removeDefaultedTypes(RType,DType).
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment