Skip to content

Commit

Permalink
S-expression S-implification
Browse files Browse the repository at this point in the history
  • Loading branch information
rktjmp committed Sep 14, 2021
1 parent 3434a70 commit 4f6bfd8
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions fnl/hotpot/searcher/module.fnl
Expand Up @@ -153,14 +153,12 @@
;; If stale or missing, complile and return a loader for the cached file
;; If the original modname was for a lua file, just return a loader for that.

;; TODO unsure about this double nested form but if feels problematic
(match (. package :preload modname)
module module
nil (match (modname-to-path modname)
;; modpath can be nil if no file is found for modname
nil nil
path (match (pcall create-loader! modname path)
(true loader) loader
(false errors) (create-error-loader modname path errors)))))
(or (. package :preload modname)
(match (modname-to-path modname)
;; modpath can be nil if no file is found for modname
nil nil
path (match (pcall create-loader! modname path)
(true loader) loader
(false errors) (create-error-loader modname path errors)))))

{: searcher}

0 comments on commit 4f6bfd8

Please sign in to comment.