Skip to content

Commit

Permalink
[ elab, minor ] Implement Functor for PiInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
buzden committed Jun 27, 2024
1 parent f561c78 commit 9b12bd4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libs/base/Language/Reflection/TT.idr
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,13 @@ public export
data PiInfo t = ImplicitArg | ExplicitArg | AutoImplicit | DefImplicit t
%name PiInfo pinfo

public export
Functor PiInfo where
map f ImplicitArg = ImplicitArg
map f ExplicitArg = ExplicitArg
map f AutoImplicit = AutoImplicit
map f $ DefImplicit x = DefImplicit $ f x

export
showPiInfo : Show a => {default True wrapExplicit : Bool} -> PiInfo a -> String -> String
showPiInfo ImplicitArg s = "{\{s}}"
Expand Down

0 comments on commit 9b12bd4

Please sign in to comment.