在GHC 7.10.2中尝试以下示例时,我得到text_field = self.driver.find_element_by_css_selector('div.innerWrap [name="xhpc_message_text"]')
:
parse error on input ‘where’
Same question was asked two years ago about GHC 7.4.2
我今年使用GHC 7.6。*(不记得最后一位数字)的类型家庭。这是GHC 7.10.2的问题吗?
根据the User's Guide,可以使用类型系列。
我的GHC 7.10.2和cabal 1.22.6.0从this PPA安装。
答案 0 :(得分:8)
你不能混合这样的开放式和封闭式家庭语法,而且我不确定你从哪里得到这个想法。正确的语法是
type family F a :: * where
F (Maybe Int) = Int
F (Maybe Bool) = Bool
F (Maybe a) = String