Safe Haskell | None |
---|---|
Language | Haskell98 |
Core
Description
Minimal set of imports needed to support basic CodeWorld syntax. Many of these are not directly used by students, but are needed for desugaring with the RebindableSyntax extension.
Synopsis
- type Effect = IO ()
- data Number
- data Text
- type Truth = Bool
- data Bool
- fromInteger :: Integer -> Number
- fromRational :: Rational -> Number
- fromString :: String -> Text
- ifThenElse :: Truth -> a -> a -> a
- fail :: String -> a
Documentation
An effect is an operation that can be observed in the real world
A program ultimately needs to have an effect on the real world, such as showing a picture on a screen, or reacting when the user presses a key, taps on a pointer-sensitive display, or moves the mouse.
The type Effect
represents an action on the world outside
the internal memory of the computer. Entry points, such
as drawingOf
, will always produce effects, because a program
with no effect is useless. The word IO
is a shortcut for
Input/Output, given that effects can be thought as inputs from the
real world or outputs to the real world.
The type for numbers.
Numbers can be positive or negative, whole or fractional. For example, 5, 3.2, and -10 are all values of the type Number.
Instances
Enum Number # | |
Eq Number # | |
Floating Number # | |
Fractional Number # | |
Defined in Internal.Num | |
Num Number # | |
Ord Number # | |
Real Number # | |
Defined in Internal.Num Methods toRational :: Number -> Rational | |
RealFloat Number # | |
Defined in Internal.Num Methods floatRadix :: Number -> Integer floatDigits :: Number -> Int floatRange :: Number -> (Int, Int) decodeFloat :: Number -> (Integer, Int) encodeFloat :: Integer -> Int -> Number significand :: Number -> Number scaleFloat :: Int -> Number -> Number isInfinite :: Number -> Bool isDenormalized :: Number -> Bool isNegativeZero :: Number -> Bool | |
RealFrac Number # | |
Show Number # | |
Instances
Bounded Bool | |
Enum Bool | |
Eq Bool | |
Ord Bool | |
Read Bool | |
Show Bool | |
Ix Bool | |
Generic Bool | |
Lift Bool | |
Defined in Language.Haskell.TH.Syntax | |
Bits Bool | |
Defined in Data.Bits | |
FiniteBits Bool | |
Defined in Data.Bits Methods finiteBitSize :: Bool -> Int countLeadingZeros :: Bool -> Int countTrailingZeros :: Bool -> Int | |
Random Bool | |
Unbox Bool | |
Defined in Data.Vector.Unboxed.Base | |
IsAddEventListenerOptionsOrBool Bool | |
Defined in GHCJS.DOM.Types | |
IsEventListenerOptionsOrBool Bool | |
Defined in GHCJS.DOM.Types | |
SingKind Bool | |
Defined in GHC.Generics Associated Types type DemoteRep Bool :: Type | |
Vector Vector Bool | |
Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Bool -> m (Vector Bool) basicUnsafeThaw :: PrimMonad m => Vector Bool -> m (Mutable Vector (PrimState m) Bool) basicLength :: Vector Bool -> Int basicUnsafeSlice :: Int -> Int -> Vector Bool -> Vector Bool basicUnsafeIndexM :: Monad m => Vector Bool -> Int -> m Bool basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Bool -> Vector Bool -> m () | |
MVector MVector Bool | |
Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Bool -> Int basicUnsafeSlice :: Int -> Int -> MVector s Bool -> MVector s Bool basicOverlaps :: MVector s Bool -> MVector s Bool -> Bool basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Bool) basicInitialize :: PrimMonad m => MVector (PrimState m) Bool -> m () basicUnsafeReplicate :: PrimMonad m => Int -> Bool -> m (MVector (PrimState m) Bool) basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Bool -> Int -> m Bool basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Bool -> Int -> Bool -> m () basicClear :: PrimMonad m => MVector (PrimState m) Bool -> m () basicSet :: PrimMonad m => MVector (PrimState m) Bool -> Bool -> m () basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Bool -> MVector (PrimState m) Bool -> m () basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Bool -> MVector (PrimState m) Bool -> m () basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Bool -> Int -> m (MVector (PrimState m) Bool) | |
SingI False | |
Defined in GHC.Generics | |
SingI True | |
Defined in GHC.Generics | |
type Rep Bool | |
Defined in GHC.Generics | |
newtype Vector Bool | |
Defined in Data.Vector.Unboxed.Base | |
type DemoteRep Bool | |
Defined in GHC.Generics | |
data Sing (a :: Bool) | |
newtype MVector s Bool | |
Defined in Data.Vector.Unboxed.Base |
fromInteger :: Integer -> Number #
fromRational :: Rational -> Number #
fromString :: String -> Text #
ifThenElse :: Truth -> a -> a -> a #