Skip to content

Allow existing-class for postulated type classes #373

@flupe

Description

@flupe

We should enable the existing-class pragma for postulated type classes:

postulate
  MyShow : Set -> Set
  myshow : {{ MyShow a }} -> a -> String
{-# COMPILE MyShow existing-class #-}

ok : {{ MyShow a }} -> a -> String
ok = myshow

Currently MyShow is not considered a class (since #284), and thus the instance arguments get turned into regular Haskell arguments and not class constraints:

ok : MyShow a -> a -> String
ok x = myshow x

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions