File: Number.hs

package info (click to toggle)
haskell-minimorph 0.3.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 88 kB
  • sloc: haskell: 320; makefile: 6
file content (15 lines) | stat: -rw-r--r-- 270 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module NLP.Minimorph.Number where

-- | Singular and Plural.
data SingPlu a = SP
    { sg :: a
    , pl :: a
    }
  deriving (Show, Eq)

data Number = Singular | Plural
  deriving (Eq, Show)

fromSP :: Number -> SingPlu a -> a
fromSP Singular = sg
fromSP Plural   = pl