Opened 9 years ago

Last modified 22 months ago

#472 new feature request (None)

Supertyping of classes

Reported by: nobody Owned by:
Priority: normal Milestone:
Component: Compiler (Type checker) Version: None
Keywords: Cc: merehap@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: N/A Blocked By:
Blocking: Related Tickets:

Description (last modified by igloo)

see
Supertyping Suggestion for Haskell

example:

class Num a <= Group a where
	(+) :: a -> a -> a 
	negate :: a -> a

apart from multiple inheritance, it could work like this:

import Prelude hiding ((+),negate)
import qualified Prelude ((+),negate)

class Group a where
	(+) :: a -> a -> a 
	negate :: a -> a

instance Num a => Group a where
	(+) = (Prelude.+)
	negate = Prelude.negate
  • coeus_at_gmx_de

Change History (5)

comment:1 Changed 8 years ago by igloo

  • Architecture set to Unknown
  • Component changed from None to Compiler (Type checker)
  • Description modified (diff)
  • Difficulty set to Unknown
  • Milestone set to _|_
  • Operating System set to Unknown
  • Test Case set to N/A

comment:2 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:3 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple

comment:4 Changed 5 years ago by igloo

  • Owner nobody deleted
  • Status changed from assigned to new

comment:5 Changed 22 months ago by merehap

  • Cc merehap@… added
  • Type of failure set to None/Unknown
Note: See TracTickets for help on using tickets.