showHoge
はOrphan InstancesとなるClass.purs(hs)-- classの定義
module Class where
class MyShow a where
myShow :: a -> String
data.purs(hs)-- data型の定義
module Data where
data Hoge = Hoge
orphan.purs(hs)-- instanceの定義
module Orphan where
instance showHoge :: MyShow Hoge where
myShow _ = "hoge"
instance showHoge ..
の記述を、 Class
か Data
のいずれかに移せばOrphan Instanceではなくなり、errorは解消される