-
Notifications
You must be signed in to change notification settings - Fork 257
Closed
Labels
library-designstatus: won't-mergeDecided against merging the PR in.Decided against merging the PR in.
Description
Would it make sense to define a meta module Data
exporting a lot of the standard data structures? Because we can have a lot of functions with similar names in these various modules, it would only expose the type and its constructors (Agda can disambiguate them in a type-directed manner) and provide a short name to refer to the module itself.
For instance:
module Data where
import Data.Nat
import Data.Fin hiding (module Fin)
import Data.List
import Data.Vec hiding (module Vec)
module Nat = Data.Nat
open Nat using (ℕ ; zero ; suc) public
module Fin = Data.Fin
open Fin using (Fin ; zero ; suc) public
module List = Data.List
open List using (List ; [] ; _∷_) public
module Vec = Data.Vec
open Vec using (Vec ; [] ; _∷_) public
-- etc.
We can also think of defining e.g. a Prelude
module which would also re-export content Function
, Relation.Binary.PropositionalEquality
, etc. Basically all of the really useful modules.
This type of module which is purely re-exporting (potentially renamed) constants could also be relevant to #60: it'd be a way to provide saner naming conventions whilst maintaining backwards compatibility.
Metadata
Metadata
Assignees
Labels
library-designstatus: won't-mergeDecided against merging the PR in.Decided against merging the PR in.