Commit 3df4b6f8 authored by Ian Lynagh's avatar Ian Lynagh

7.0 branch updates

parent cd307058
-- test :browse! functionality
:browse! *T
-- defined locally
T.length :: T.Integer
class N a
class S a
class C a b where
c1 :: N b => a -> b
c2 :: (N b, S b) => a -> b
c3 :: a1 -> b
c4 :: a1 -> b
c1 :: (C a b, N b) => a -> b
c2 :: (C a b, N b, S b) => a -> b
c3 :: C a b => forall a1. a1 -> b
c4 :: C a b => forall a1. a1 -> b
-- imported via Control.Monad
class Monad m => MonadPlus m where
mzero :: m a
mplus :: m a -> m a -> m a
mplus :: MonadPlus m => forall a. m a -> m a -> m a
mzero :: MonadPlus m => forall a. m a
-- imported via Control.Monad, Prelude
(>>) :: Monad m => forall a b. m a -> m b -> m b
(>>=) :: Monad m => forall a b. m a -> (a -> m b) -> m b
fail :: Monad m => forall a. GHC.Base.String -> m a
return :: Monad m => forall a. a -> m a
-- imported via Control.Monad, Prelude, T
class Monad m where
(>>=) :: m a -> (a -> m b) -> m b
(>>) :: m a -> m b -> m b
return :: a -> m a
fail :: GHC.Base.String -> m a
-- imported via Data.Maybe
catMaybes :: [Maybe a] -> [a]
fromJust :: Maybe a -> a
fromMaybe :: a -> Maybe a -> a
isJust :: Maybe a -> GHC.Bool.Bool
isNothing :: Maybe a -> GHC.Bool.Bool
listToMaybe :: [a] -> Maybe a
mapMaybe :: (a -> Maybe b) -> [a] -> [b]
maybe :: b -> (a -> b) -> Maybe a -> b
maybeToList :: Maybe a -> [a]
-- imported via Data.Maybe, Prelude
Just :: a -> Maybe a
data Maybe a = Nothing | Just a
Nothing :: Maybe a
-- imported via Prelude
(+) :: GHC.Num.Num a => a -> a -> a
(=<<) :: Monad m => (a -> m b) -> m a -> m b
class Eq a where
(GHC.Classes.==) :: a -> a -> GHC.Bool.Bool
(GHC.Classes./=) :: a -> a -> GHC.Bool.Bool
-- imported via Prelude, T
Prelude.length :: [a] -> GHC.Types.Int
-- imported via T
data T.Integer
= integer-gmp:GHC.Integer.Type.S# GHC.Prim.Int#
| integer-gmp:GHC.Integer.Type.J# GHC.Prim.Int# GHC.Prim.ByteArray#
T.length :: Data.ByteString.Internal.ByteString -> GHC.Types.Int
:browse! T
-- defined locally
T.length :: T.Integer
class N a
class S a
class C a b where
c1 :: N b => a -> b
c2 :: (N b, S b) => a -> b
c3 :: a1 -> b
c4 :: a1 -> b
c1 :: (C a b, N b) => a -> b
c2 :: (C a b, N b, S b) => a -> b
c3 :: C a b => forall a1. a1 -> b
c4 :: C a b => forall a1. a1 -> b
:browse! T -- with -fprint-explicit-foralls
-- defined locally
T.length :: T.Integer
class N a
class S a
class C a b where
c1 :: N b => a -> b
c2 :: (N b, S b) => a -> b
c3 :: forall a1. a1 -> b
c4 :: forall a1. a1 -> b
c1 :: forall a b. (C a b, N b) => a -> b
c2 :: forall a b. (C a b, N b, S b) => a -> b
c3 :: forall a b. C a b => forall a1. a1 -> b
c4 :: forall a b. C a b => forall a1. a1 -> b
-- test :browse! <target> relative to different contexts
:browse! C -- from *C>
-- defined locally
g :: forall a. Num a => a -> a
h :: forall a. Integral a => a -> a
-- imported via D
f :: forall a. Num a => a -> a
:browse! C -- from *B>, after :add B
-- imported via C
g :: forall a. Num a => a -> a
h :: forall a. Integral a => a -> a
f :: forall a. Num a => a -> a
:browse! C -- from *C>, after :m *C
-- defined locally
g :: forall a. Num a => a -> a
h :: forall a. Integral a => a -> a
-- imported via D
f :: forall a. Num a => a -> a
:browse! C -- from *D>, after :m *D
-- not currently imported
C.g :: forall a. Num a => a -> a
C.h :: forall a. Integral a => a -> a
-- defined locally
f :: forall a. Num a => a -> a
SimpleFail11b.hs:9:15:
Conflicting family instance declarations:
data instance C9 [a] Int -- Defined at SimpleFail11b.hs:9:15-16
data instance C9 [a] Int -- Defined at SimpleFail11b.hs:7:15-16
SimpleFail11b.hs:13:15:
Conflicting family instance declarations:
type instance D9 [a] Int -- Defined at SimpleFail11b.hs:13:15-16
type instance D9 [a] Int -- Defined at SimpleFail11b.hs:15:15-16
SimpleFail11c.hs:9:15:
Conflicting family instance declarations:
data instance C9 [Int] Int -- Defined at SimpleFail11c.hs:9:15-16
data instance C9 [a] Int -- Defined at SimpleFail11c.hs:7:15-16
SimpleFail11c.hs:15:15:
Conflicting family instance declarations:
type instance D9 [Int] Int -- Defined at SimpleFail11c.hs:15:15-16
type instance D9 [a] Int -- Defined at SimpleFail11c.hs:13:15-16
T4246.hs:8:9:
Conflicting family instance declarations:
type F a -- Defined at T4246.hs:8:9
type F Int -- Defined at T4246.hs:11:9
T4246.hs:14:15:
Conflicting family instance declarations:
type instance G Int -- Defined at T4246.hs:14:15
type instance G Int -- Defined at T4246.hs:15:15
setTestOpts(only_compiler_types(['ghc']))
test('base01',
[normalise_slashes,
[if_compiler_lt('ghc', '7.1', expect_fail),
normalise_slashes,
clean_cmd('$MAKE -s clean')],
run_command,
['$MAKE -s base01 --no-print-directory'])
......
==================== Tidy Core ====================
lvl :: GHC.Integer.Type.Integer
[GblId, Caf=NoCafRefs, Str=DmdType]
lvl = GHC.Integer.Type.S# 1
lvl1 :: GHC.Integer.Type.Integer
[GblId, Caf=NoCafRefs, Str=DmdType]
lvl1 = GHC.Integer.Type.S# 2
Rec {
T3717.$wfoo [Occ=LoopBreaker] :: GHC.Prim.Int# -> GHC.Prim.Int#
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType L]
T3717.$wfoo =
\ (ww :: GHC.Prim.Int#) ->
case ww of ds {
__DEFAULT ->
case case GHC.Prim.<# ds 5 of _ {
GHC.Bool.False -> lvl1; GHC.Bool.True -> lvl
}
of _ { __DEFAULT ->
T3717.$wfoo (GHC.Prim.-# ds 1)
};
0 -> 0
}
end Rec }
T3717.foo [InlPrag=INLINE[0]] :: GHC.Types.Int -> GHC.Types.Int
[GblId,
Arity=1,
Caf=NoCafRefs,
Str=DmdType U(L)m,
Unf=Unf{Src=Worker=T3717.$wfoo, TopLvl=True, Arity=1, Value=True,
ConLike=True, Cheap=True, Expandable=True,
Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False)
Tmpl= \ (w [Occ=Once!] :: GHC.Types.Int) ->
case w of _ { GHC.Types.I# ww [Occ=Once] ->
case T3717.$wfoo ww of ww1 { __DEFAULT -> GHC.Types.I# ww1 }
}}]
T3717.foo =
\ (w :: GHC.Types.Int) ->
case w of _ { GHC.Types.I# ww ->
case T3717.$wfoo ww of ww1 { __DEFAULT -> GHC.Types.I# ww1 }
}
==================== Tidy Core ====================
Rec {
xs :: GHC.Prim.Int# -> ()
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType L]
xs =
\ (m :: GHC.Prim.Int#) ->
case GHC.Prim.<=# m 1 of _ {
GHC.Bool.False -> xs (GHC.Prim.-# m 1);
GHC.Bool.True -> GHC.Unit.()
}
end Rec }
T3772.foo [InlPrag=NOINLINE] :: GHC.Types.Int -> ()
[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType U(L)]
T3772.foo =
\ (n :: GHC.Types.Int) ->
case n of _ { GHC.Types.I# n# ->
case GHC.Prim.<=# n# 0 of _ {
GHC.Bool.False -> xs n#; GHC.Bool.True -> GHC.Unit.()
}
}
......@@ -63,7 +63,8 @@ test('T4908', only_ways(['optc','optasm']),
compile,
['-O2 -ddump-simpl -dsuppress-uniques'])
test('T4930', only_ways(['optc','optasm']),
test('T4930', [if_compiler_lt('ghc', '7.1', expect_fail),
only_ways(['optc','optasm'])],
compile,
['-O -ddump-simpl -dsuppress-uniques'])
......
==================== Tidy Core ====================
Roman.foo2 :: GHC.Types.Int
[GblId,
Caf=NoCafRefs,
Str=DmdType m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True,
ConLike=True, Cheap=True, Expandable=True,
Guidance=IF_ARGS [] 1 2}]
Roman.foo2 = GHC.Types.I# 6
Roman.foo1 :: Data.Maybe.Maybe GHC.Types.Int
[GblId,
Caf=NoCafRefs,
Str=DmdType,
Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True,
ConLike=True, Cheap=True, Expandable=True,
Guidance=IF_ARGS [] 1 2}]
Roman.foo1 = Data.Maybe.Just @ GHC.Types.Int Roman.foo2
Roman.foo3 :: GHC.Types.Int
[GblId, Str=DmdType b]
Roman.foo3 =
Control.Exception.Base.patError
@ GHC.Types.Int "spec-inline.hs:(19,5)-(29,25)|function go"
Rec {
Roman.foo_$s$wgo [Occ=LoopBreaker]
:: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[GblId, Arity=2, Caf=NoCafRefs, Str=DmdType LL]
Roman.foo_$s$wgo =
\ (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#) ->
let {
a [Dmd=Just L] :: GHC.Prim.Int#
[LclId, Str=DmdType]
a =
GHC.Prim.+#
(GHC.Prim.+#
(GHC.Prim.+#
(GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# sc sc) sc) sc) sc)
sc)
sc } in
case GHC.Prim.<=# sc1 0 of _ {
GHC.Bool.False ->
case GHC.Prim.<# sc1 100 of _ {
GHC.Bool.False ->
case GHC.Prim.<# sc1 500 of _ {
GHC.Bool.False ->
Roman.foo_$s$wgo (GHC.Prim.+# a a) (GHC.Prim.-# sc1 1);
GHC.Bool.True -> Roman.foo_$s$wgo a (GHC.Prim.-# sc1 3)
};
GHC.Bool.True -> Roman.foo_$s$wgo sc (GHC.Prim.-# sc1 2)
};
GHC.Bool.True -> 0
}
end Rec }
Roman.$wgo
:: Data.Maybe.Maybe GHC.Types.Int
-> Data.Maybe.Maybe GHC.Types.Int
-> GHC.Prim.Int#
[GblId,
Arity=2,
Str=DmdType SS,
Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=2, Value=True,
ConLike=True, Cheap=True, Expandable=True,
Guidance=IF_ARGS [6 3] 37 0}]
Roman.$wgo =
\ (w :: Data.Maybe.Maybe GHC.Types.Int)
(w1 :: Data.Maybe.Maybe GHC.Types.Int) ->
case w1 of _ {
Data.Maybe.Nothing ->
Roman.foo3
`cast` (CoUnsafe GHC.Types.Int GHC.Prim.Int#
:: GHC.Types.Int ~ GHC.Prim.Int#);
Data.Maybe.Just x ->
case x of _ { GHC.Types.I# ipv ->
let {
a [Dmd=Just L] :: GHC.Prim.Int#
[LclId, Str=DmdType]
a =
GHC.Prim.+#
(GHC.Prim.+#
(GHC.Prim.+#
(GHC.Prim.+# (GHC.Prim.+# (GHC.Prim.+# ipv ipv) ipv) ipv) ipv)
ipv)
ipv } in
case w of _ {
Data.Maybe.Nothing -> Roman.foo_$s$wgo a 10;
Data.Maybe.Just n ->
case n of _ { GHC.Types.I# x2 ->
case GHC.Prim.<=# x2 0 of _ {
GHC.Bool.False ->
case GHC.Prim.<# x2 100 of _ {
GHC.Bool.False ->
case GHC.Prim.<# x2 500 of _ {
GHC.Bool.False ->
Roman.foo_$s$wgo (GHC.Prim.+# a a) (GHC.Prim.-# x2 1);
GHC.Bool.True -> Roman.foo_$s$wgo a (GHC.Prim.-# x2 3)
};
GHC.Bool.True -> Roman.foo_$s$wgo ipv (GHC.Prim.-# x2 2)
};
GHC.Bool.True -> 0
}
}
}
}
}
Roman.foo_go [InlPrag=INLINE[0]]
:: Data.Maybe.Maybe GHC.Types.Int
-> Data.Maybe.Maybe GHC.Types.Int
-> GHC.Types.Int
[GblId,
Arity=2,
Str=DmdType SSm,
Unf=Unf{Src=Worker=Roman.$wgo, TopLvl=True, Arity=2, Value=True,
ConLike=True, Cheap=True, Expandable=True,
Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False)
Tmpl= \ (w [Occ=Once] :: Data.Maybe.Maybe GHC.Types.Int)
(w1 [Occ=Once] :: Data.Maybe.Maybe GHC.Types.Int) ->
case Roman.$wgo w w1 of ww { __DEFAULT -> GHC.Types.I# ww }}]
Roman.foo_go =
\ (w :: Data.Maybe.Maybe GHC.Types.Int)
(w1 :: Data.Maybe.Maybe GHC.Types.Int) ->
case Roman.$wgo w w1 of ww { __DEFAULT -> GHC.Types.I# ww }
Roman.foo :: GHC.Types.Int -> GHC.Types.Int
[GblId,
Arity=1,
Caf=NoCafRefs,
Str=DmdType S(A)m,
Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True,
ConLike=True, Cheap=True, Expandable=True,
Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=False)
Tmpl= \ (n [Occ=Once!] :: GHC.Types.Int) ->
case n of n1 { GHC.Types.I# _ ->
Roman.foo_go (Data.Maybe.Just @ GHC.Types.Int n1) Roman.foo1
}}]
Roman.foo =
\ (n :: GHC.Types.Int) ->
case n of _ { GHC.Types.I# ipv ->
case Roman.foo_$s$wgo 6 ipv of ww { __DEFAULT -> GHC.Types.I# ww }
}
------ Local rules for imported ids --------
"SC:$wgo0" [ALWAYS]
forall {sc :: GHC.Prim.Int# sc1 :: GHC.Prim.Int#}
Roman.$wgo (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc1))
(Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc))
= Roman.foo_$s$wgo sc sc1
foo :: (GHC.Types.Int -> GHC.Bool.Bool) -> GHC.Bool.Bool
Markdown is supported
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