Skip to content

Instantly share code, notes, and snippets.

@orblivion
Created May 10, 2011 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orblivion/964573 to your computer and use it in GitHub Desktop.
Save orblivion/964573 to your computer and use it in GitHub Desktop.
data Purse a b c = Purse a b c
data Keys = Keys
data Phone = BlackBerry | IPhone | Android
data Wallet = LeatherWallet Float | MoneyClip Float
addKeys (Purse () b c) keys = Purse keys b c
addPhone (Purse a () c ) phone = Purse a phone c
addWallet (Purse a b ()) wallet = Purse a b wallet
emptyPurse = Purse () () ()
leaveHouse :: (Purse Keys Phone Wallet) -> ()
leaveHouse purse = ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment