You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 12, 2017. It is now read-only.
The preprocessor should import qualified Text.Interpol to avoid conflicts with other (^-^) operators. The following code results in "ambiguous occurrence" errors:
{-# OPTIONS_GHC -F -pgmF interpol #-}
moduleBugwhere(^-^)::String->Int->String(^-^) s n = s ++"hello {n}"
As an aside, I think you should just add the import every time. The strstr "^-^" (prettyPrint m) check in the preprocessor is expensive and isn't even accurate (it matches strings containing "^-^" in addition to uses of the operator). To avoid unused import warnings, you can use the form import qualified Text.Interpol ().
The preprocessor should
import qualified Text.Interpolto avoid conflicts with other(^-^)operators. The following code results in "ambiguous occurrence" errors:{-# OPTIONS_GHC -F -pgmF interpol #-} module Bug where (^-^) :: String -> Int -> String (^-^) s n = s ++ "hello {n}"As an aside, I think you should just add the import every time. The
strstr "^-^" (prettyPrint m)check in the preprocessor is expensive and isn't even accurate (it matches strings containing"^-^"in addition to uses of the operator). To avoid unused import warnings, you can use the formimport qualified Text.Interpol ().