I want to make a type alias string, but it doesn't seem to work when I want to use it as a typeclass constraint. see:
module Main where
import Prelude
type E = "what"
class TestThing f where
method :: f -> f
instance ttInt :: Fail E => TestThing Int where -- No type class instance was found for Prim.Fail E
-- instance ttInt :: Fail "inline works" => TestThing Int where -- this works
method a = a
foo :: Int
foo = method 0 -- fails with the above error
I want to make a type alias string, but it doesn't seem to work when I want to use it as a typeclass constraint. see: