File: add-Eq-constraint

package info (click to toggle)
haskell-hscurses 1.4.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 508 kB
  • sloc: haskell: 1,517; ansic: 77; makefile: 3
file content (26 lines) | stat: -rw-r--r-- 982 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: Add Eq constraings for GHC 7.4.1
Author: Joachim Breitner <nomeata@debian.org>


Index: haskell-hscurses-1.4.1.0/UI/HSCurses/Curses.hsc
===================================================================
--- haskell-hscurses-1.4.1.0.orig/UI/HSCurses/Curses.hsc	2012-02-07 23:29:29.000000000 +0100
+++ haskell-hscurses-1.4.1.0/UI/HSCurses/Curses.hsc	2012-02-07 23:30:24.000000000 +0100
@@ -241,7 +241,7 @@
 fi :: (Integral a, Num b) => a -> b
 fi = fromIntegral
 
-throwIfErr :: Num a => String -> IO a -> IO a
+throwIfErr :: (Show a, Eq a, Num a) => String -> IO a -> IO a
 --throwIfErr name act = do
 --    res <- act
 --    if res == (cERR)
@@ -249,7 +249,7 @@
 --        else return res
 throwIfErr s = throwIf (== (#const ERR)) (\a -> "Curses[" ++ show a ++ "]:"  ++ s)
 
-throwIfErr_ :: Num a => String -> IO a -> IO ()
+throwIfErr_ :: (Show a, Eq a, Num a) => String -> IO a -> IO ()
 throwIfErr_ name act = void $ throwIfErr name act
 
 errI :: IO CInt -> IO ()