-
-
Save JustinChristensen/d6f0c180899a1b03008dbf6b9007ec38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type family DataType t = s | s -> t where | |
DataType Int32 = "int" | |
DataType Text = "text" | |
asType :: Tagged t String | |
asType = Tagged $ symbolVal (Proxy :: Proxy (DataType t)) | |
{- | |
• No instance for (KnownSymbol (DataType t0)) | |
arising from a use of ‘symbolVal’ | |
• In the second argument of ‘($)’, namely | |
‘symbolVal (Proxy :: Proxy (DataType t))’ | |
In the expression: Tagged $ symbolVal (Proxy :: Proxy (DataType t)) | |
In an equation for ‘asType’: | |
asType = Tagged $ symbolVal (Proxy :: Proxy (DataType t)) | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment