Skip to content

Instantly share code, notes, and snippets.

@FrigoEU
Last active December 11, 2016 09:28
Show Gist options
  • Save FrigoEU/bca55ad0d2a009c2ed5c0c6c5e437c7e to your computer and use it in GitHub Desktop.
Save FrigoEU/bca55ad0d2a009c2ed5c0c6c5e437c7e to your computer and use it in GitHub Desktop.
Fail Instance without TypeString/TypeConcat
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