Last active
January 7, 2018 23:24
-
-
Save liarokapisv/b4c5763747fa0f7e11ae7a7ab94ae233 to your computer and use it in GitHub Desktop.
Show implementation not total
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Test | |
%default total | |
data Box : Type -> Type where | |
MkBox : t -> Box t | |
data Test : Type where | |
T1 : Test | |
T2 : Box Test -> Test | |
mutual | |
(Show a) => Show (Box a) where | |
show (MkBox x) = show x | |
Show Test where | |
show (T1) = "t1" | |
show (T2 x) = show x | |
{- Errors: | |
Test.idr:17:3-11: | |
| | |
17 | Show Test where | |
| ~~~~~~~~~ | |
Test.Test implementation of Prelude.Show.Show is possibly not total due to recursive path Prelude.Show.Test.Test implementation of Prelude.Show.Show, method show --> Prelude.Show.Test.Test implementation of Prelude.Show.Show, method show | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment