Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion "Incomplete term" error
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Alan Pogrebinschi  
View profile  
 More options Aug 10 2012, 3:19 pm
From: Alan Pogrebinschi <alan...@gmail.com>
Date: Fri, 10 Aug 2012 16:19:43 -0300
Local: Fri, Aug 10 2012 3:19 pm
Subject: Re: [Idris] "Incomplete term" error
Just writing to report the (ugly) workaround that I found for this.
However, it does seem to be a bug to me.

I was writing the VerifiedMonad and VerifiedFunctor typeclasses (you
can see my full code here: https://gist.github.com/3316784 ) . The
problem was initially with the identity Functor law, which would not
typecheck like this:

-- "Incomplete term" error
class Functor f => VerifiedFunctor (f : Set -> Set) where
  identity : (fa : f a) -> fmap id fa = fa

However, it did work like this:

class Functor f => VerifiedFunctor (f : Set -> Set) where
  identity : (fa : f a) -> fmapid fa = fa

-- Need this to avoid "Incomplete term" error
fmapid : Functor f => f a -> f a
fmapid = fmap id

I had the same issue with (>>= return) which was fixed similarly.

Regards,

Alan

On Wed, Aug 8, 2012 at 9:31 AM, Alan Pogrebinschi <alan...@gmail.com> wrote:

> Hi,

> I just started playing with Idris and got an error the I could isolate in this short repl session:

> Idris> fmap (+ 5) (Just 1)
> Just 6 : Maybe Int
> Idris> fmap id (Just 1)
> (input):0:Incomplete term fmap (id) (Just (fromInteger 1))

> This works fine in ghci. My original error is in a proper idris module, not in the repl.

> I'm using the latest github code.

> Any hint?

> Thanks,

> Alan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.