packages feed

hint-nix (empty) → 0.1.0.0

raw patch · 3 files changed

+109/−0 lines, 3 filesdep +basedep +hintdep +include-env

Dependencies added: base, hint, include-env, relude

Files

+ LICENSE view
@@ -0,0 +1,21 @@+MIT License++Copyright (c) 2022 Sridhar Ratnakumar++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.
+ hint-nix.cabal view
@@ -0,0 +1,66 @@+cabal-version: 2.2++-- This file has been generated from package.yaml by hpack version 0.37.0.+--+-- see: https://github.com/sol/hpack++name:          hint-nix+version: 0.1.0.0+synopsis:      Helper for using hint with Nix package databases+description:   Provides convenience functions for running Haskell interpreter with proper Nix package database configuration+category:      Development+homepage:      https://github.com/juspay/vira+author:        Sridhar Ratnakumar+maintainer:    srid@srid.ca+copyright:     2025 Sridhar Ratnakumar+license:       AGPL-3.0-or-later+license-file:  LICENSE+build-type:    Simple++library+  exposed-modules:+      Language.Haskell.Hint.Nix+  other-modules:+      Paths_hint_nix+  autogen-modules:+      Paths_hint_nix+  hs-source-dirs:+      src+  default-extensions:+      DataKinds+      DeriveDataTypeable+      DeriveGeneric+      DeriveTraversable+      DerivingStrategies+      DerivingVia+      ExplicitForAll+      FlexibleContexts+      FlexibleInstances+      GeneralizedNewtypeDeriving+      ImportQualifiedPost+      LambdaCase+      MultiParamTypeClasses+      MultiWayIf+      NamedFieldPuns+      NoStarIsType+      NumericUnderscores+      OverloadedStrings+      ScopedTypeVariables+      StrictData+      TypeApplications+      TypeFamilies+      TypeOperators+      TypeSynonymInstances+      ViewPatterns+      TemplateHaskell+  ghc-options: -Wall -optP-Wno-nonportable-include-path -Wincomplete-record-updates -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Wunused-foralls -fprint-explicit-foralls -fprint-explicit-kinds+  build-depends:+      base ==4.*+    , hint+    , include-env+    , relude >=1.0+  mixins:+      base hiding (Prelude)+    , relude (Relude as Prelude, Relude.Container.One)+    , relude +  default-language: GHC2021
+ src/Language/Haskell/Hint/Nix.hs view
@@ -0,0 +1,22 @@+{-# LANGUAGE OverloadedRecordDot #-}+{-# LANGUAGE TemplateHaskell #-}++-- | Convenience for hint+Nix. See https://github.com/srid/hint-demo+module Language.Haskell.Hint.Nix where++import IncludeEnv.TH+import Language.Haskell.Interpreter+import Language.Haskell.Interpreter.Unsafe++$(includeEnv "HINT_GHC_LIB_DIR" "ghcLibDir")+ghcLibDir :: String++$(includeEnv "HINT_GHC_PACKAGE_PATH" "ghcPackagePath")+ghcPackagePath :: String++-- | Helper function to run interpreter with the proper package database in Nix+runInterpreterWithNixPackageDb :: InterpreterT IO a -> IO (Either InterpreterError a)+runInterpreterWithNixPackageDb =+  unsafeRunInterpreterWithArgsLibdir+    ["-package-db", ghcPackagePath]+    ghcLibDir