Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ elab, minor ] Implement Functor for PiInfo #3334

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG_NEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ This CHANGELOG describes the merged but unreleased changes. Please see [CHANGELO

* `Decidable.Decidable.decison` is now `public export`.

* `Functor` is implemented for `PiInfo` from `Language.Reflection.TT`.

#### Contrib

* `Data.List.Lazy` was moved from `contrib` to `base`.
Expand Down
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
Loading