Last active
December 11, 2016 09:28
-
-
Save FrigoEU/bca55ad0d2a009c2ed5c0c6c5e437c7e to your computer and use it in GitHub Desktop.
Fail Instance without TypeString/TypeConcat
This file contains hidden or 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
module Main where | |
import Prelude | |
import Control.Monad.Eff.Console (log) | |
class Serialize a where | |
serialize :: a -> String | |
instance cannotSerializeFunctions | |
:: Fail ("Cannot serialize functions.") | |
=> Serialize (a -> b) where | |
serialize _ = "unreachable" | |
main = do | |
log (serialize ((+) 1)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment