[Haskell-cafe] Type Directed Name Resolution

Albert Y. C. Lai trebla at vex.net
Wed Nov 10 13:05:05 EST 2010


Typed-directed name resolution brings Haskell closer to a write-only 
language; that is, an ambiguous phrase made total sense to the author 
when the author wrote it, but an independent reader will need 
extraordinary effort to disambiguate.

{-# LANGUAGE TypeDirectedNameResolution #-}

import EnglishMonad
import Cities(buffalo)
import Animals(buffalo)
import Verbs(buffalo,buffalo)

{- why two buffalo's from Verbs? because they are of different types: 
one is present verb type and the other is past participle verb type. 
ever heard of Type Directed Name Resolution? -}

buffalo = buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo

main = runEnglishMonad buffalo

{- 
http://en.wikipedia.org/wiki/Buffalo_buffalo_Buffalo_buffalo_buffalo_buffalo_Buffalo_buffalo 
-}


More information about the Haskell-Cafe mailing list