{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} module Numeric.SVM.LibLinear.Types where import Foreign.Storable import Data.Vector.Unboxed.Deriving -- | An integer feature index newtype FeatureIdx = FeatureIdx Int deriving (Show, Read, Enum, Bounded, Ord, Eq, Storable) derivingUnbox "FeatureIdx" [t| FeatureIdx -> Int |] [| \(FeatureIdx i) -> i |] [| FeatureIdx |] -- | A class label in the case of classification or dependent variable in the -- case of regression. type Label = Double