Re: [Haskell-cafe] Re: [Haskell] intent-typing

2010-11-19 Thread aditya siram
That was a great explanation of phantom types and type-families. I'm just getting started on understand type families and I was wondering why you didn't use data families in the truth table structure: type family Join a b type instance Join Safe Safe = Safe type instance Join Safe Unsafe = Unsafe

Re: [Haskell-cafe] Re: [Haskell] intent-typing

2010-11-16 Thread Brandon Moore
- Original Message > From: aditya siram > To: Haskell Café > Cc: hask...@haskell.org; Marcus Sundman > Sent: Tue, November 16, 2010 8:18:33 AM > Subject: Re: [Haskell-cafe] Re: [Haskell] intent-typing > > That was a great explanation of phantom types and type

[Haskell-cafe] Re: [Haskell] intent-typing

2010-11-16 Thread Tillmann Rendel
Hi, Marcus Sundman wrote: Hi, how would one go about implementing (or using if it's supported out-of-the-box) intent-typing* for haskell? A basic technique is to use newtype declarations to declare separate types for separate intents. module StringSafety ( SafeString ()

[Haskell-cafe] Re: [Haskell] intent-typing

2010-11-15 Thread Max Rabkin
I still don't understand what intent typing is, but this particular problem is discussed (with a type-based, statically checked solution) at http://blog.moertel.com/articles/2006/10/18/a-type-based-solution-to-the-strings-problem --Max On Mon, Nov 15, 2010 at 17:17, Marcus Sundman wrote: > Hi,