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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to