Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6716427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:43:57+00:00 2026-05-26T08:43:57+00:00

Here is the module – Number1.hs module Number1(isTriangle) where isTriangle x y z =

  • 0

Here is the module – Number1.hs

module Number1(isTriangle) where

isTriangle x y z = if x*x+y*y >= z*z then True
               else False

This is the main program Main1.hs

import System.Environment
import Number1

main = do
    args<-getArgs
    let a = args !! 0
    let b = args !! 1
    let c = args !! 2
    if (IsTriangle a b c) then return(True) 
    else return(False)

This error I get when ghc --make Main1.hs

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:43:57+00:00Added an answer on May 26, 2026 at 8:43 am

    When you call isTriangle in Main1.hs, you call it with a capital ‘I’.

    Make sure your capitalisation matches as Haskell is case sensitive, and make sure functions start with a lower case character as this is mandatory.

    Edit – rounding up other errors

    Main1.hs:

    import System.Environment
    import Number1
    
    main :: IO()
    main = do
             args<-getArgs
             {- Ideally you should check that there are at least 3 arguments
             before trying to read them, but that wasn't part of your
             question. -}
             let a = read (args !! 0) -- read converts [Char] to a number
             let b = read (args !! 1)
             let c = read (args !! 2)
             if (isTriangle a b c) then putStrLn "True"
               else putStrLn "False"
    

    Number1.hs:

    module Number1(isTriangle) where
    
    {- It's always best to specify the type of a function so that both you and
       the compiler understand what you're trying to achieve.  It'll help you
       no end. -}
    isTriangle       :: Int -> Int -> Int -> Bool
    isTriangle x y z =  if x*x+y*y >= z*z then True
                          else False
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is something similar to what's posted here: No Module named django.core To reiterate,
I'm writing a small program with IO actions in Haskell here is module StackQuestion
Basically, we have this here module that we offer to our users that want
Here is some bad code: Module test Sub Main() Console.WriteLine(1<2 = + cstr((1<2))) Console.WriteLine(2<1
Here is the full code so far: module clean #light open System open System.IO
Does anyone have experience using the URL Rewrite Module (see here )? Can it
here is the code <php? $id1 =1; $id2 = module 1 loaded; echo $var1=$id1,$var2=$id2;
python's time module seems a little haphazard. For example, here is a list of
Here is my custom module using hook, Assume if I want to pass argument
I have implemented a custom UrlAuthorization module as shown here The code is as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.