jan27 - | |_| |/|_| GHC Interactive version 6.6 for Haskell...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
___ ___ _ / _ \ /\ /\/ __(_) / /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98. / /_\\/ __ / /___| | http://www.haskell.org/ghc/ \____/\/ /_/\____/|_| Type :? for help. Loading package base . .. linking . .. done. Prelude> :load "/Users/sueo/Desktop/cis252/jan27.hs" [1 of 1] Compiling Main ( /Users/sueo/Desktop/cis252/jan27.hs, interpreted ) Ok, modules loaded: Main. *Main> :type isPositive isPositive :: Int -> Bool *Main> :type contrived contrived :: Int -> Bool -> Int *Main> :type (isPositive 6) (isPositive 6) :: Bool *Main> :type (contrived 5) (contrived 5) :: Bool -> Int *Main> 2 + 5 7 *Main> 5 div 3 <interactive>:1:0: No instance for (Num ((a -> a -> a) -> t1 -> t)) arising from the literal `5' at <interactive>:1:0-6 Possible fix: add an instance declaration for (Num ((a -> a -> a) -> t1 -> t)) In the expression: 5 div 3 In the definition of `it': it = 5 div 3 *Main> div 5 3 1 *Main> mod 5 3 2 *Main> even 5 False *Main> even 16 True *Main> 5 `div` 3 1 *Main> (+) 5 16 21
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/19/2011 for the course CIS 325 taught by Professor Worden during the Spring '11 term at Syracuse.

Page1 / 2

jan27 - | |_| |/|_| GHC Interactive version 6.6 for Haskell...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online