Commit 617094a8 authored by sof's avatar sof
Browse files

[project @ 1999-01-23 18:03:40 by sof]

h98 updates
parent ee08b71b
_interface_ Int10 1 400
_exports_
Int10 T1{C1} T2{T2C1 T2C2} T3{T3C1 T3C2 T3C3} T4{T4C1 T4C2 T4C3 T4C4} T5{T5C1 T5C2 T5C3 T5C4 T5C5} T6{T6C6} T7{T7C6 T7C7} ;
_declarations_
__interface Int10 1 0 where
__export Int10 T1{C1} T2{T2C1 T2C2} T3{T3C1 T3C2 T3C3} T4{T4C1 T4C2 T4C3 T4C4} T5{T5C1 T5C2 T5C3 T5C4 T5C5} T6{T6C6} T7{T7C6 T7C7} ;
1 data T1 a = C1 a;
1 data T2 a b = T2C1 a | T2C2 b ;
1 data T3 a b c = T3C1 a | T3C2 b | T3C3 c ;
......
......@@ -4,7 +4,7 @@ include $(TOP)/mk/should_compile.mk
SRC_HC_OPTS += -noC -dcore-lint
rn017_HC_OPTS = -hi
rn017_HC_OPTS = -hi -hi-with-exports
include $(TOP)/mk/target.mk
......
_interface_ Rn016 1 400
_exports_
Rn016 K{op1 op2};
_instances_
instance {K PrelBase.Int} = $d1;
instance {K PrelBase.Bool} = $d2;
instance _forall_ [a] => {K [a]} = $d3;
_declarations_
1 $d1 _:_ {K PrelBase.Int} ;;
1 $d2 _:_ {K PrelBase.Bool} ;;
1 $d3 _:_ _forall_ [a] {K PrelList.[a]} ;;
__interface Rn016 1 0 where
__export Rn016 K{op1 op2};
instance {K PrelBase.Int} = _f1;
instance {K PrelBase.Bool} = _f2;
instance __forall [a] => {K [a]} = _f3;
1 _f1 :: {K PrelBase.Int} ;
1 _f2 :: {K PrelBase.Bool} ;
1 _f3 :: __forall [a] => {K PrelList.[a]} ;
1 class K a :: (* -> *) where { op1 :: a -> a ; op2 :: a -> a } ;
_interface_ Rn017 1 400
_exports_
Rn017 a b c Wibble{MkWibble} Wobble ;
_declarations_
__interface Rn017 1 0 where
__export Rn017 a b c Wibble{MkWibble} Wobble ;
1 data Wibble = MkWibble Wobble ;
1 data Wobble ;
1 a _:_ Int -> Int ;;
1 b _:_ Int -> Int ;;
1 c _:_ Int -> Int ;;
1 a :: Int -> Int ;
1 b :: Int -> Int ;
1 c :: Int -> Int ;
......@@ -2,7 +2,7 @@ module Foo (f) where
-- export food
f x = x
--!!! weird patterns with no variables
-- !!! weird patterns with no variables
1 = f 1
[] = f []
1 = f (f 1)
......
--!!! rn005: simplest case: a few non-recursive bindings
-- !!! rn005: simplest case: a few non-recursive bindings
module Test where
......
--!!! rn006: two sets of mutually-recursive blobs:
--!!! f, g, h are mut rec
--!!! i, j, k are mut rec
-- !!! rn006: two sets of mutually-recursive blobs:
-- !!! f, g, h are mut rec
-- !!! i, j, k are mut rec
module Test where
......
NOTE: Simplifier still going after 4 iterations; bailing out.
--!!! Import an interface defining a class and some instances
-- !!! Import an interface defining a class and some instances
module Main where
......
--!! Rexporting
-- !! Rexporting
module Test ( module Test , module Rn017 ) where
import Rn017
......
ghc: module version changed to 1; reason: no old .hi file
_interface_ Test 1 400
_instance_modules_
IO PrelAddr PrelArr PrelBounded PrelCCall PrelForeign PrelIOBase PrelNum PrelNumExtra PrelTup
_usages_
PrelBase 1 :: $dEq0 1 $dEq1 1 $dEqBool0 1 $dEqChar0 1 $dEqInt0 1 $dEqInteger0 1 $dNumInt0 1 $dShow0 1 $dShow1 1 $dShow2 1 $dShowBool0 1 $dShowChar0 1 $dShowInt0 1 $m- 1 $m/= 1 $mfromInt 1 $mshowList 1 addr2Integer 1 foldr 1 int2Integer 1 integer_0 1 integer_1 1 integer_2 1 integer_m1 1 Eq 1 Num 1 Show 1 String 1;
PrelNum 1 :: $dNumInteger0 1 $dShowInteger0 1;
PrelNumExtra 1 :: $dEqDouble0 1 $dNumDouble0 1 $dShowDouble0 1;
PrelPack 1 :: packCString# 1 unpackAppendCString# 1 unpackCString# 1 unpackFoldrCString# 1 unpackNBytes# 1;
Rn017 1 ::;
_exports_
Rn017 a b c Wibble{MkWibble} Wobble;
Test f FOO{:FOO :FOO op} Foo{MkFoo};
_instances_
instance {FOO Foo} = $dFOOFoo0;
_declarations_
1 $dFOOFoo0 _:_ {FOO Foo} ;;
1 class FOO $r3I where {op :: $r3I -> PrelBase.Int} ;
1 data Foo = MkFoo ;
1 f _:_ _forall_ [$a] => $a -> $a ;;
__export Rn017 a b c Wibble{MkWibble} Wobble;
__export Test f FOO{op} Foo{MkFoo};
--!! This one is fine in Haskell 1.4
-- !! This one is fine in Haskell 1.4
--
module Foo ( Bar(..) ) where { data Bar = Bar X; data X = Y }
--!! This is fine in Haskell 1.4
-- !! This is fine in Haskell 1.4
--
module Foo ( Baz(..) ) where
......
--!!! 500 defns chained together at the top-level
-- !!! 500 defns chained together at the top-level
module Main(main) where
main = undefined
a000 = a001
......
--!!! 500 defns chained together with "where"s
-- !!! 500 defns chained together with "where"s
module Main(main) where
main = undefined
......
--!!! 500 defns, not chained together
-- !!! 500 defns, not chained together
module Main(main) where
main = undefined
......
......@@ -3,3 +3,4 @@ rnfail001.hs:3: Conflicting definitions for `x' in pattern
Compilation had errors
--!!! rn001: super-simple set of bindings,
--!!! incl wildcard pattern-bindings and *duplicates*
-- !!! rn001: super-simple set of bindings,
-- !!! incl wildcard pattern-bindings and *duplicates*
x = []
y = []
......
rnfail002.hs:4:
Conflicting definitions for `y'
Defined at rnfail002.hs:6
Defined at rnfail002.hs:5
Multiple declarations of `y'
defined at rnfail002.hs:5
defined at rnfail002.hs:6
Compilation had errors
--!!! split definition of f (error)
-- !!! split definition of f (error)
f [] = []
g x = x
f (x:xs) = []
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