Skip to content

Instantly share code, notes, and snippets.

@dramforever
Created August 4, 2018 10:29
Show Gist options
  • Save dramforever/be6e944c06442f17b6f2c55e7b445f06 to your computer and use it in GitHub Desktop.
Save dramforever/be6e944c06442f17b6f2c55e7b445f06 to your computer and use it in GitHub Desktop.
total test
Idris> :l total.idr
Type checking ./total.idr
total.idr:3:1-5:35:
|
3 | totalTest x with (decEq x 'a')
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...
Main.totalTest is possibly not total due to: with block in Main.totalTest
total
totalTest : (x : Char) -> Bool
totalTest x with (decEq x 'a')
totalTest 'a' | (Yes Refl) = True
totalTest x | (No contra) = False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment