Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.
{-# language PolyKinds, DataKinds, AllowAmbiguousTypes, TypeApplications #-} class Test a where test :: Bool instance Test False where test = False value :: Bool value = test @False
works but
{-# language PolyKinds, DataKinds, AllowAmbiguousTypes, TypeApplications #-} class Test (a :: k) where -- changed test :: Bool instance Test False where test = False value :: Bool value = test @False
yields
• Expected a type, but ‘False’ has kind ‘Bool’ • In the type ‘False’ In the expression: test @False
. Is this crazy or am I going crazy?
the k is the first type parameter
k
do test @_ @False
test @_ @False
How can I thank you?
your happiness is thanks enough!
I am happy indeed.
works but
yields
. Is this crazy or am I going crazy?
the
k
is the first type parameterdo
test @_ @False
How can I thank you?
your happiness is thanks enough!
I am happy indeed.