1 2 3 4 5 6 7 8 9 10 11 12 13 14
{-# OPTIONS_GHC -XOverloadedStrings #-} module Main where import Data.String instance IsString Int where fromString x = 1337 f :: Int -> String f "hello" = "correct" f _ = "false" main = do print $ f 1337 print $ f 1338