Skip to content

Previously compiling example does not compile

The example in the testcase introduced in D1667 currently fails with,

ClassOperator.hs:12:3: error:
    • Could not deduce (a ><> b0)
      from the context: a ><> b
        bound by the type signature for:
                   (**>) :: (a ><> b) => a -> a -> ()
        at ClassOperator.hs:12:3-44
      The type variable ‘b0’ is ambiguous
    • In the ambiguity check for ‘**>’
      To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
      When checking the class method:
        (**>) :: forall a b. (a ><> b) => a -> a -> ()
      In the class declaration for ‘><>’

ClassOperator.hs:12:3: error:
    • Could not deduce (a ><> b0)
      from the context: a ><> b
        bound by the type signature for:
                   (**<) :: (a ><> b) => a -> a -> ()
        at ClassOperator.hs:12:3-44
      The type variable ‘b0’ is ambiguous
    • In the ambiguity check for ‘**<’
      To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
      When checking the class method:
        (**<) :: forall a b. (a ><> b) => a -> a -> ()
      In the class declaration for ‘><>’

ClassOperator.hs:12:3: error:
    • Could not deduce (a ><> b0)
      from the context: a ><> b
        bound by the type signature for:
                   (>**) :: (a ><> b) => a -> a -> ()
        at ClassOperator.hs:12:3-44
      The type variable ‘b0’ is ambiguous
    • In the ambiguity check for ‘>**’
      To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
      When checking the class method:
        (>**) :: forall a b. (a ><> b) => a -> a -> ()
      In the class declaration for ‘><>’

ClassOperator.hs:12:3: error:
    • Could not deduce (a ><> b0)
      from the context: a ><> b
        bound by the type signature for:
                   (<**) :: (a ><> b) => a -> a -> ()
        at ClassOperator.hs:12:3-44
      The type variable ‘b0’ is ambiguous
    • In the ambiguity check for ‘<**’
      To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
      When checking the class method:
        (<**) :: forall a b. (a ><> b) => a -> a -> ()
      In the class declaration for ‘><>’

This is a regression relative to 7.10.2, which accepts the program without error.

Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information