From e42a30cd80ddf2202af0c690152b59350a4f1097 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 6 Jun 2016 02:45:41 +0200 Subject: MOAR generality --- src/Sequence/Types.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Sequence') diff --git a/src/Sequence/Types.hs b/src/Sequence/Types.hs index 480dfee..3d95b9a 100644 --- a/src/Sequence/Types.hs +++ b/src/Sequence/Types.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE FlexibleInstances, FlexibleContexts, MultiParamTypeClasses, TypeSynonymInstances, ViewPatterns, OverloadedStrings, TemplateHaskell, GeneralizedNewtypeDeriving, TypeOperators #-} +{-# LANGUAGE FlexibleInstances, FlexibleContexts, MultiParamTypeClasses, TypeSynonymInstances, ViewPatterns, OverloadedStrings, TemplateHaskell, GeneralizedNewtypeDeriving, TypeOperators, UndecidableInstances #-} module Sequence.Types ( GameState, gEntities, gEntityNames, gFocus, gNextId' @@ -78,8 +78,8 @@ instance Default Entity where , _eStats = def } -instance Stats :<: Entity where - ctx' = eStats +instance (Entity :<: a) => Stats :<: a where + ctx' = ctx' . eStats newtype EntityName = EntityName { _entityName :: CI String } deriving (Show, Eq, Ord) -- cgit v1.2.3