hugs error

This is a discussion on hugs error within the Tech Board forums, part of the Community Boards category; First of all, sorry for posting this here...and second, does anyone know what error is the following...? I am using ...

  1. #1
    Registered User
    Join Date
    Aug 2010
    Posts
    230

    hugs error

    First of all, sorry for posting this here...and second, does anyone know what error is the following...? I am using hugs in haskell language and while i try to load the file i have this error... i forgot something guys?

    Code:
    Hugs> :load lab1.hs
    ERROR "lab1.hs":3 - Improperly terminated character constant
    thanks...

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    1,198
    without seeing code its really difficult to come up with an answer

  3. #3
    Registered User
    Join Date
    Aug 2010
    Posts
    230
    the code is very simple...
    but where is the mistake...notice that it is my first code in haskell...!
    Code:
    comb :: Int -> Int -> Int
    comb n 0 = 1
    comb n m = comb(n-1) (m-1)  *  n 'div' m
    thanks...

  4. #4
    Registered User
    Join Date
    Aug 2003
    Posts
    1,198
    you need to use `` instead of '' (it is kind of hard to see the difference but hopefully you should be able to spot it)

  5. #5
    Registered User
    Join Date
    Aug 2010
    Posts
    230
    now, how can i run it? i did a :load lab1.hs.
    it appeared main> and i tried to put eg.

    Code:
    5 6 <enter>

  6. #6
    Registered User
    Join Date
    Aug 2003
    Posts
    1,198
    comb 5 6

  7. #7
    Registered User
    Join Date
    Aug 2010
    Posts
    230
    thanks...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Winsock problem
    By Wolf` in forum Windows Programming
    Replies: 1
    Last Post: 05-01-2010, 04:55 PM
  2. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  3. Making C DLL using MSVC++ 2005
    By chico1st in forum C Programming
    Replies: 26
    Last Post: 05-28-2008, 01:17 PM
  4. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 09:33 AM
  5. Couple C questions :)
    By Divx in forum C Programming
    Replies: 5
    Last Post: 01-28-2003, 12:10 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21