Commit a0fa6c37 authored by pcapriotti's avatar pcapriotti

Adapt tests to the removal of the MR in GHCi

parent 490e006f
......@@ -3,4 +3,3 @@ module Test2 where
f x = g x
g y = y
:seti -XMonomorphismRestriction
:l 2740.hs
:step f 1 2 3
:step
......
:l ../Test2
:b 3
:b 5
f 1
f (1 :: Integer)
:st
:st
:st
......
:l ../QSort
:st qsort [1,2]
:st qsort [1::Integer,2]
:step
seq left ()
:print left
:l ../Test3.hs
:st mymap (+1) [1,2,3]
:st mymap (+1) [1::Integer,2,3]
:st
:show bindings
f x -- should fail, unknown return type
......
:load break026
:step foldl (+) 0 [1..5]
:step foldl (+) 0 [1::Integer .. 5]
:step
:step
:step
......@@ -9,7 +9,7 @@
-- answer should be 1
:load break026
:step foldl (+) 0 [1..5]
:step foldl (+) 0 [1::Integer .. 5]
:step
:step
:step
......
:l ../QSort
:break qsort
qsort [3,2,1]
qsort [3::Integer,2,1]
:step
:i a
-- Printing of lists
let li = map Just [0..5]
let li = map Just [0::Integer .. 5]
:p li
head li
:p li
......@@ -9,4 +9,4 @@ length li
:sp li
li
:p li
:sp li
\ No newline at end of file
:sp li
......@@ -4,7 +4,7 @@ let a = False
:sp a
:p a
let b = map Just [1..4]
let b = map Just [1::Integer .. 4]
:p b
head b
:p b
......
......@@ -2,7 +2,7 @@
:l ../QSort
:break 5
qsort [8, 4]
qsort [8::Integer, 4]
:p right
seq right ()
......@@ -12,4 +12,4 @@ seq left ()
:p left
length left
:p left
:continue
\ No newline at end of file
:continue
......@@ -2,7 +2,7 @@
-- Testing collisions
let _t1 = "user value"
let li = map Just [1..4]
let li = map Just [1::Integer .. 4]
:p li
_t1
_t2
\ No newline at end of file
_t2
......@@ -3,7 +3,7 @@
:set -XGADTs -XRank2Types
:l ../GADT
let d = DictN 1
let d = DictN (1 :: Integer)
:p d
seq _t1 ()
:p d
......
......@@ -2,9 +2,9 @@
:set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving
:l ../Test
let a = map MkT [1..2]
let a = map MkT [1::Integer .. 2]
:p a
seq _t1 ()
:p a
seq _t2 ()
:p a
\ No newline at end of file
:p a
......@@ -2,7 +2,7 @@
:set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving
:l ../Test
let a = map (MkT2 . MkT) [1..2]
let a = map (MkT2 . MkT) [1::Integer .. 2]
:p a
seq _t1 ()
:p a
......
......@@ -3,6 +3,6 @@
:set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving
:l ../Test
let a = MkT [1..2]
let a = MkT [1::Integer .. 2]
seq a ()
:p a
......@@ -3,7 +3,7 @@
:set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving
:l ../Test
let a = MkT 1
let a = MkT (1 :: Integer)
seq a ()
:p a
a
......
:m + Data.IORef
let l = map Just [1..10]
let l = map Just [1::Integer .. 10]
:p l
head l
r <- newIORef l
:p r
:sp r
\ No newline at end of file
:sp r
α
let α = 4
let α = 4 :: Integer
α
4
:type α
let test = 0
let test = 0 :: Integer
:show bindings
:force test
:show bindings
......
:set -XScopedTypeVariables
(\(x :: a, y :: a) -> [x, "hi"])
let f = (\(x :: a, y :: a) -> [x, "hi"])
<interactive>:3:27:
Couldn't match expected type `a' with actual type `[Char]'
In the expression: "hi"
In the expression: [x, "hi"]
In the expression: (\ (x :: a, y :: a) -> [x, "hi"])
......@@ -2,7 +2,7 @@
data T = A {a :: Int}
:i A
:i a
let a = 3
let a = 3 :: Integer
:i a
a
data R = B {a :: Int}
......
let x=undefined
let y=3
let y=3 :: Integer
:force x
:show bindings
-- in 7.3 and earlier this used to print just "*** Exception:
......
......@@ -40,6 +40,7 @@ base language is: Haskell2010
with the following modifiers:
-XGADTs
-XGADTSyntax
-XNoMonomorphismRestriction
-XNoDatatypeContexts
-XNondecreasingIndentation
-XMonoLocalBinds
......
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