File: Types.hs

package info (click to toggle)
mighttpd2 4.0.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 192 kB
  • sloc: haskell: 1,382; makefile: 4; sh: 3
file content (15 lines) | stat: -rw-r--r-- 296 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE CPP #-}

module Program.Mighty.Types (Natural, naturalToInt) where

#ifdef DHALL
import GHC.Natural (Natural, naturalToWord)

naturalToInt :: Natural -> Int
naturalToInt = fromIntegral . naturalToWord
#else
type Natural = Int

naturalToInt :: Natural -> Int
naturalToInt = id
#endif