Commit 9a3798e7 authored by simonpj's avatar simonpj
Browse files

[project @ 1999-01-27 15:01:03 by simonpj]

Haskell 98 updates
parent 18976e61
--!!! Simple array creation
-- !!! Simple array creation
import Array
......
--!!! Array creation, (index,value) list with duplicates.
-- !!! Array creation, (index,value) list with duplicates.
--
-- Haskell library report 1.3 (and earlier) specifies
-- that `array' values created with lists containing dups,
......
--!!! Array creation, (index,value) list with out of bound index.
-- !!! Array creation, (index,value) list with out of bound index.
--
-- Haskell library report 1.3 (and earlier) specifies
-- that `array' values created with lists containing out-of-bounds indices,
......
--!!! Array - accessing undefined element
-- !!! Array - accessing undefined element
--
-- Sample Haskell implementation in the 1.3 Lib report defines
-- this as being undefined/error.
......
--!!! Array - recurrences
-- !!! Array - recurrences
--
-- array does not evaluate the elements.
--
......
--!!! Array - empty arrays
-- !!! Array - empty arrays
--
-- print a couple of them to try to expose empty arrays
-- to a GC or two.
......
--!!! Array - accessing empty arrays
-- !!! Array - accessing empty arrays
--
-- empty arrays are legal, but indexing them is undefined!
--
......
--!!! Array - out-of-range (index,value) pairs
-- !!! Array - out-of-range (index,value) pairs
--
-- supplying a list containing one or more pairs
-- with out-of-range index is undefined.
......
--!!! Array - derived ops
-- !!! Array - derived ops
--
-- testing the well-behavedness of
-- derived ops for empty and non-empty arrays
......
--!!! Array - accumulated arrays
-- !!! Array - accumulated arrays
--
--
module Main(main) where
......
--!!! Array - array difference operator
-- !!! Array - array difference operator
--
--
module Main(main) where
......
--!!! Array map operations
-- !!! Array map operations
--
--
module Main(main) where
......
{-# OPTIONS -fglasgow-exts #-}
--!!! multi-dimensional arrays
-- !!! multi-dimensional arrays
module Main ( main ) where
import GlaExts
......
--!!! cc001 -- ccall with standard boxed arguments and results
-- !!! cc001 -- ccall with standard boxed arguments and results
module ShouldCompile where
......
--!!! cc002 -- ccall with ambiguous result (should be defaulted to ())
-- !!! cc002 -- ccall with ambiguous result (should be defaulted to ())
module ShouldCompile where
a :: IO ()
......
--!!! cc003 -- ccall with unresolved polymorphism (should fail)
--!!! not anymore (as of 0.29, result type will default to ())
-- !!! cc003 -- ccall with unresolved polymorphism (should fail)
-- !!! not anymore (as of 0.29, result type will default to ())
module ShouldCompile where
fubar :: IO Int
......
--!!! cc006 -- ccall with non-standard boxed arguments and results
-- !!! cc006 -- ccall with non-standard boxed arguments and results
module Test where
......
--!!! cc002 -- ccall with ambiguous argument
-- !!! cc002 -- ccall with ambiguous argument
module Test where
f :: IO ()
......
--!!! cc002 -- ccall with non-standard boxed arguments and results
-- !!! cc002 -- ccall with non-standard boxed arguments and results
module Test where
......
--!!! cc004 -- ccall with synonyms, polymorphic type variables and user type variables.
-- !!! cc004 -- ccall with synonyms, polymorphic type variables and user type variables.
module Test where
-- Since I messed up the handling of polymorphism originally, I'll
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment