2020-03-12 20:19:14 +03:00
|
|
|
{-# LANGUAGE CPP, MagicHash, NoImplicitPrelude #-}
|
|
|
|
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
-- |
|
2020-03-12 20:49:35 +03:00
|
|
|
-- Module : Urbit.Atom.Simple
|
2020-03-12 20:19:14 +03:00
|
|
|
-- Copyright : (c) Ian Lynagh 2007-2012
|
|
|
|
-- License : BSD3
|
|
|
|
--
|
|
|
|
-- Maintainer : igloo@earth.li
|
|
|
|
-- Stability : internal
|
|
|
|
-- Portability : non-portable (GHC Extensions)
|
|
|
|
--
|
2020-03-12 20:49:35 +03:00
|
|
|
-- An simple definition of the 'Atom' type.
|
2020-03-12 20:19:14 +03:00
|
|
|
--
|
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#include "MachDeps.h"
|
|
|
|
|
2020-03-12 20:45:01 +03:00
|
|
|
module Urbit.Atom.Simple (
|
2020-03-12 20:49:35 +03:00
|
|
|
Atom, mkAtom,
|
|
|
|
smallAtom, wordToAtom, integerToWord, integerToInt,
|
2020-03-12 20:19:14 +03:00
|
|
|
#if WORD_SIZE_IN_BITS < 64
|
2020-03-12 20:49:35 +03:00
|
|
|
integerToWord64, word64ToAtom,
|
|
|
|
integerToInt64, int64ToAtom,
|
2020-03-12 20:19:14 +03:00
|
|
|
#endif
|
2020-03-12 20:49:35 +03:00
|
|
|
plusAtom, minusAtom, timesAtom, negateAtom,
|
|
|
|
eqAtom, neqAtom, absAtom, signumAtom,
|
|
|
|
leAtom, gtAtom, ltAtom, geAtom, compareAtom,
|
|
|
|
eqAtom#, neqAtom#,
|
|
|
|
leAtom#, gtAtom#, ltAtom#, geAtom#,
|
|
|
|
divAtom, modAtom,
|
|
|
|
divModAtom, quotRemAtom, quotAtom, remAtom,
|
|
|
|
encodeFloatAtom, decodeFloatAtom, floatFromAtom,
|
|
|
|
encodeDoubleAtom, decodeDoubleAtom, doubleFromAtom,
|
|
|
|
-- gcdAtom, lcmAtom, -- XXX
|
|
|
|
andAtom, orAtom, xorAtom, complementAtom,
|
|
|
|
shiftLAtom, shiftRAtom, testBitAtom,
|
|
|
|
hashAtom,
|
2020-03-12 20:19:14 +03:00
|
|
|
) where
|
|
|
|
|
2020-03-12 20:45:01 +03:00
|
|
|
import Urbit.Atom.Simple.Type
|
2020-03-12 20:19:14 +03:00
|
|
|
|