ku-fpg / hermit-shell

HERMIT with GHCi shell
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Types of shell commands #26

Open andygill opened 9 years ago

andygill commented 9 years ago

We have a number of top-level shell commands.

display :: Shell ()
apply :: R a -> Shell ()
query :: T a b -> Shell b

I propose we add two principles.

The means we have the types

display :: Shell DocH
apply :: R a -> Shell DocH -- returns the current tree, after the rewrite.
query :: T a b -> Shell b

The GHCi pretty printer can handle DocH - I've make this change already.

Notes:

display = query status -- OR
display = query idR