[過去ログ] 関数型プログラミング言語Haskell Part33 (1002レス)
上下前次1-新
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん
このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
550(1): 2020/11/02(月)00:43 ID:TnMF05Pn(1/2) AAS
質問です
このサイトでNum instanceをDerivingする話が出てました
外部リンク:qiita.com
実際このページの次のコードはうちの環境でも通ります
Haskell Online Compiler [ghc-8.4.4]
Copyright (c) The University of Glasgow
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
newtype Quantity = Quantity Int
deriving (Eq, Ord, Num, Show)
省10
551: 2020/11/02(月)00:43 ID:TnMF05Pn(2/2) AAS
---- エラーメッセージ
Haskell Online Compiler [ghc-8.4.4]
Copyright (c) The University of Glasgow
Compiling your program...
[1 of 1] Compiling Main ( prog.hs, prog.o )
prog.hs:6:47: error:
• No instance for (Num (Parser Int))
arising from the 'deriving' clause of a data type declaration
Possible fix:
use a standalone 'deriving instance' declaration,
省5
上下前次1-新書関写板覧索設栞歴
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル
ぬこの手 ぬこTOP 0.041s