
17 Aug
2009
17 Aug
'09
2:35 a.m.
Hello! I can't understand why the following dummy example doesn't work. {-# OPTIONS -XTypeSynonymInstances #-} {-# OPTIONS -XFlexibleInstances #-} module Main where import Data.Array.Unboxed class Particle p type ParticleC = (Double, Double, Double) instance Particle ParticleC class Configuration c where getParticleI :: (Particle p) => c -> Int -> p type Collection p = UArray (Int,Int) Double instance Configuration (Collection p) where getParticleI config i = (1,1,1) :: ParticleC