{-# LANGUAGE TemplateHaskell, TypeFamilies, FlexibleInstances, UndecidableInstances #-}
module Overload.Example where

import Data.Maybe
import Overload

f1 :: Bool
f1 = True

f2 :: Int -> Int
f2 x = x + 1

f3 :: Num a => Maybe a
f3 = Just 0

overload "f" ['f1, 'f2, 'f3]

test :: IO ()
test = do
    print (f 1)
    print (f && True)
    print (fromMaybe 10 f)