File: Types.hs

package info (click to toggle)
mighttpd2 4.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 212 kB
  • sloc: haskell: 1,287; ansic: 44; makefile: 4
file content (15 lines) | stat: -rw-r--r-- 296 bytes parent folder | download | duplicates (2)
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